Name:		libusbmuxd
Version:	1.0.10
Release:	1%{?_dist_release}
Summary: 	Client library USB multiplex daemon for Apple's iOS devices

Group:         	System Environment/Libraries
License:       	LGPLv2+
URL:           	http://www.libimobiledevice.org/
Source0:       	http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar.bz2

BuildRequires: libplist-devel >= 1.11
Conflicts:     usbmuxd < 1.0.9

%description
libusbmuxd is the client library used for communicating with Apple's iPod Touch,
iPhone, iPad and Apple TV devices. It allows multiple services on the device 
to be accessed simultaneously.

%package utils
Summary: 	Utilities for communicating with Apple's iOS devices
Group: 		Applications/System
License: 	GPLv2+
Requires: 	%{name} = %{version}-%{release}
Conflicts: 	usbmuxd < 1.0.9

%description utils
Utilities for Apple's iOS devices

%package devel
Summary:	Development package for %{name}
Summary(ja):	%{name} の開発用パッケージ
Group: 		Development/Libraries
Requires: 	%{name} = %{version}-%{release}
Conflicts: 	usbmuxd-devel < 1.0.9

%description devel
Files for development with %{name}.

%prep
%setup -q

%build
%configure --disable-static

sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

make %{?_smp_mflags} V=1

%install
make install DESTDIR=%{buildroot} INSTALL='install -p'

#Remove libtool archives.
find %{buildroot} -name '*.la' -exec rm -f {} ';'

%check
make check

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README
%{_libdir}/libusbmuxd.so.*

%files utils
%defattr(-,root,root,-)
%{_bindir}/iproxy

%files devel
%defattr(-,root,root,-)
%{_includedir}/usbmuxd*
%{_libdir}/pkgconfig/libusbmuxd.pc
%{_libdir}/libusbmuxd.so

%changelog
* Thu May 21 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 1.0.10-1
- new upstream release

* Tue Jul 08 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 1.0.9-1
- initial build for Vine Linux

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Mar 22 2014 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.9-1
- Initial package
