%bcond_without python %bcond_without sharp %define major 4 %define libname %mklibname gpod %{major} %define libnamedev %mklibname -d gpod %define api 1.0 Summary: Library to access an iPod audio player Name: libgpod Version: 0.8.2 Release: %mkrel 4 Source0: http://prdownloads.sourceforge.net/gtkpod/%{name}-%{version}.tar.bz2 License: LGPLv2+ Group: System/Libraries Url: http://www.gtkpod.org/ BuildRequires: gtk+2-devel BuildRequires: udev-devel BuildRequires: dbus-glib-devel BuildRequires: libsgutils-devel BuildRequires: taglib-devel BuildRequires: libxml2-devel BuildRequires: libsqlite3-devel BuildRequires: libusb1-devel BuildRequires: libimobiledevice-devel 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} Suggests: %{name}-sharp = %{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 python-gpod Group: Development/Python Summary: Python module for iPod access BuildRequires: python-gobject-devel BuildRequires: python-devel BuildRequires: mutagen BuildRequires: swig Requires: mutagen Requires: %{libname} = %{version}-%{release} %description -n python-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 binding for libgpod. %endif %if %{with sharp} %package sharp Group: Development/Other Summary: Mono binding to libgpod for iPod access BuildRequires: mono-devel BuildRequires: gtk-sharp2 BuildRequires: gtk-sharp2-devel 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 %apply_patches %build %configure2_5x \ --disable-static \ --enable-udev \ --without-hal %make %install %makeinstall_std #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 /lib/udev/iphone-set-info /lib/udev/ipod-set-info /lib/udev/rules.d/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 %{_libdir}/pkgconfig/%{name}-sharp.pc %{_includedir}/gpod-%{api}/ %if %{with python} %files -n python-gpod %{py_platsitedir}/gpod/ %endif %if %{with sharp} %files sharp %{_libdir}/pkgconfig/%{name}-sharp.pc %dir %{_libdir}/%{name} %{_libdir}/%{name}/%{name}-sharp* %endif