%bcond_with python %ifnarch %mips %bcond_without sharp %endif %define major 4 %define api 1.0 %define libname %mklibname gpod %{major} %define libnamedev %mklibname gpod -d Summary: Library to access an iPod audio player Name: libgpod Version: 0.8.3 Release: %mkrel 23 License: LGPLv2+ Group: System/Libraries Url: http://www.gtkpod.org/ Source0: http://prdownloads.sourceforge.net/gtkpod/%{name}-%{version}.tar.bz2 Patch0: libgpod-fixswig.patch Patch1: libgpod-0.8.3-mono4.patch Patch2: libgpod-0.8.3-disable-tests.patch Patch3: libgpod-0.8.3-fix-segfault-and-some-typos.patch Patch5: 0001-configure.ac-Add-support-for-libplist-2.2.patch BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(dbus-glib-1) BuildRequires: libsgutils-devel BuildRequires: pkgconfig(taglib) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(libusb-1.0) BuildRequires: pkgconfig(libimobiledevice-1.0) BuildRequires: pkgconfig(libplist-2.0) >= 2.2.0 BuildRequires: gtk-doc BuildRequires: eject BuildRequires: intltool %description libgpod is a library meant to abstract access to an iPod content. It provides an easy to use API to retrieve the list of files and playlist stored on an iPod, to modify them and to save them back to the iPod. %package -n %{libname} Group: System/Libraries Summary: Library to access an iPod audio player Requires: eject Requires: %{name} >= %{version}-%{release} %description -n %{libname} libgpod is a library meant to abstract access to an iPod content. It provides an easy to use API to retrieve the list of files and playlist stored on an iPod, to modify them and to save them back to the iPod. %package -n %{libnamedev} Group: Development/C Summary: Library to access an iPod audio player Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Obsoletes: %mklibname -d gpod 2 %description -n %{libnamedev} libgpod is a library meant to abstract access to an iPod content. It provides an easy to use API to retrieve the list of files and playlist stored on an iPod, to modify them and to save them back to the iPod. %if %{with python} %package -n python3-gpod Group: Development/Python Summary: Python 3 module for iPod access BuildRequires: pkgconfig(pygobject-3.0) BuildRequires: pkgconfig(python3) BuildRequires: python3dist(mutagen) BuildRequires: swig Requires: python3dist(mutagen) Requires: %{libname} = %{version}-%{release} Obsoletes: python-gpod < 0.8.3-15 Provides: python-gpod = %{version}-%{release} %description -n python3-gpod libgpod is a library meant to abstract access to an iPod content. It provides an easy to use API to retrieve the list of files and playlist stored on an iPod, to modify them and to save them back to the iPod. This is a Python 3 binding for libgpod. %endif %if %{with sharp} %package sharp Group: Development/Other Summary: Mono binding to libgpod for iPod access BuildRequires: pkgconfig(mono) BuildRequires: gtk-sharp2 BuildRequires: pkgconfig(gapi-2.0) Requires: %{libname} = %{version}-%{release} %description sharp libgpod is a library meant to abstract access to an iPod content. It provides an easy to use API to retrieve the list of files and playlist stored on an iPod, to modify them and to save them back to the iPod. This is a Mono binding for libgpod. %endif %prep %setup -q %autopatch -p1 %build autoreconf -fi %configure \ --disable-static \ --enable-udev \ --with-udev-dir=%{_prefix}/lib/udev \ --without-hal %make_build %install %make_install #we don't want these find %{buildroot} -name "*.la" -delete %if !%{with sharp} rm -f %{buildroot}/%{_libdir}/pkgconfig/%{name}-sharp.pc %endif %find_lang %{name} %files -f %{name}.lang %doc README* AUTHORS %{_bindir}/ipod-read-sysinfo-extended %{_prefix}/lib/udev/iphone-set-info %{_prefix}/lib/udev/ipod-set-info %{_udevrulesdir}/90-libgpod.rules %files -n %{libname} %{_libdir}/%{name}.so.%{major}{,.*} %files -n %{libnamedev} %doc ChangeLog %doc %{_datadir}/gtk-doc/html/%{name} %{_libdir}/%{name}.so %{_libdir}/pkgconfig/%{name}-%{api}.pc %{_includedir}/gpod-%{api}/ %if %{with python} %files -n python3-gpod %{python3_sitearch}/gpod/ %endif %if %{with sharp} %files sharp %{_libdir}/pkgconfig/%{name}-sharp.pc %dir %{_libdir}/%{name} %{_libdir}/%{name}/%{name}-sharp* %endif