]> git.pld-linux.org Git - packages/libgpod.git/blobdiff - libgpod.spec
add bcond for python; group bcond BRs
[packages/libgpod.git] / libgpod.spec
index 95083b3de951129f4114f5ccdc3895702de105e3..a90513c942d1bc57203e3d174d6b5c802b91e7d4 100644 (file)
@@ -1,25 +1,68 @@
+# TODO
+# check: http://fred.uwcs.co.uk/diff (from http://www.fredemmott.co.uk/blog_121)
+# some warning at doc build:
+#warning: failed to load external entity "../../docs/reference/xml/*.xml"
+#unable to parse ../../docs/reference/xml/*.xml
+#make[3]: [gpod_doc.i] Error 6 (ignored)
+# - mountdir perms?: %dir %{_localstatedir}/run/%{name}
+#
+# Conditional build:
+%bcond_without dotnet  # without .NET support
+%bcond_without python  # without Python bindings
+
+%ifarch x32
+%undefine      with_dotnet
+%endif
+
+%{?with_dotnet:%include        /usr/lib/rpm/macros.mono}
 Summary:       Shared library to access the contents of an iPod
-Summary(pl):   Biblioteka wspó³dzielona do dostêpu do zawarto¶ci iPodów
+Summary(pl.UTF-8):     Biblioteka współdzielona do dostępu do zawartości iPodów
 Name:          libgpod
-Version:       0.4.0
-Release:       1
+Version:       0.8.3
+Release:       0.1
 License:       GPL v2
 Group:         Libraries
-Source0:       http://dl.sourceforge.net/gtkpod/%{name}-%{version}.tar.gz
-# Source0-md5: e427e0409b0cb2d7e76b17915b1396fa
-URL:           http://www.gtkpod.org/libgpod.html
+Source0:       http://downloads.sourceforge.net/gtkpod/%{name}-%{version}.tar.bz2
+# Source0-md5: f8a0b7a34e768e33a708e8dd172bd6f8
+Source1:       %{name}.tmpfiles
+Patch0:                %{name}-gcc43.patch
+Patch1:                %{name}-monodir.patch
+URL:           http://www.gtkpod.org/libgpod/
 BuildRequires: autoconf >= 2.52
 BuildRequires: automake
-BuildRequires: dbus-glib-devel >= 0.71
-BuildRequires: gettext-devel
-BuildRequires: gtk+2-devel >= 2:2.10.1
-BuildRequires: gtk-doc
-BuildRequires: hal-devel < 0.6
-BuildRequires: hal-devel >= 0.5.7.1
+BuildRequires: docbook-dtd412-xml
+BuildRequires: gdk-pixbuf2-devel >= 2.6.0
+BuildRequires: gettext-tools
+BuildRequires: glib2-devel >= 1:2.16.0
+BuildRequires: gtk-doc >= 1.0
 BuildRequires: intltool >= 0.35
+BuildRequires: libimobiledevice-devel >= 1.1.5
+BuildRequires: libplist-devel >= 1.0.0
+BuildRequires: libsmbios-devel
 BuildRequires: libtool
+BuildRequires: libusb-devel
+BuildRequires: libxml2-devel
 BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.647
+BuildRequires: sg3_utils-devel >= 1.26
+BuildRequires: sqlite3-devel
+BuildRequires: zlib-devel
+# for noinst test only
+#BuildRequires:        taglib-devel
+%if %{with dotnet}
+BuildRequires: dotnet-gtk-sharp2-devel >= 2.12.0
+BuildRequires: mono-devel >= 1.9.1
+BuildRequires: rpmbuild(monoautodeps)
+%endif
+%if %{with python}
+BuildRequires: python-devel >= 2.1.1
 BuildRequires: python-eyeD3 >= 0.6.6
+BuildRequires: python-mutagen >= 1.8
+BuildRequires: python-pygobject-devel >= 2.8.0
+BuildRequires: rpm-pythonprov
+BuildRequires: swig-python >= 1.3.24
+%endif
+Suggests:      udev-libgpod = %{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -27,56 +70,115 @@ 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.
 
-%description -l pl
-libgpod to biblioteka maj±ca na celu wyabstrahowanie dostêpu do
-zawarto¶ci iPodów. Udostêpnia ³atwe w u¿yciu API do pobierania listy
-plików i playlist zapisanych na iPodzie, modyfikowania ich i
+%description -l pl.UTF-8
+libgpod to biblioteka mająca na celu wyabstrahowanie dostępu do
+zawartości iPodów. Udostępnia łatwe w użyciu API do pobierania listy
+plików i playlist zapisanych na iPodzie, modyfikowania ich i
 zapisywania z powrotem na iPoda.
 
+%package -n udev-libgpod
+Summary:       UDEV rules and programs for iPod devices
+Summary(pl.UTF-8):     Reguły i programy używane przez UDEV dla urządzeń iPod
+Group:         Applications/System
+Requires:      %{name} = %{version}-%{release}
+Obsoletes:     hal-libgpod
+
+%description -n udev-libgpod
+UDEV rules and programs to initialize iPod devices for libgpod
+library.
+
+%description -n udev-libgpod -l pl.UTF-8
+Reguły i program dla UDEV do przygotowywania urządzeń iPod do użytku z
+biblioteką libgpod.
+
 %package devel
 Summary:       Header files for libgpod library
-Summary(pl):   Pliki nag³ówkowe biblioteki libgpod
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki libgpod
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      dbus-glib-devel >= 0.71
-Requires:      gtk+2-devel >= 2:2.10.1
-Requires:      hal-devel >= 0.5.7.1
+Requires:      gdk-pixbuf2-devel >= 2.6.0
+Requires:      glib2-devel >= 1:2.16.0
 
 %description devel
 This is the package containing the header files for libgpod library.
 
-%description devel -l pl
-Ten pakiet zawiera pliki nag³ówkowe biblioteki libgpod.
+%description devel -l pl.UTF-8
+Ten pakiet zawiera pliki nagłówkowe biblioteki libgpod.
 
 %package static
 Summary:       Static libgpod library
-Summary(pl):   Statyczna biblioteka libgpod
+Summary(pl.UTF-8):     Statyczna biblioteka libgpod
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 Static libgpod library.
 
-%description static -l pl
+%description static -l pl.UTF-8
 Statyczna biblioteka libgpod.
 
+%package apidocs
+Summary:       libgpod API documentation
+Summary(pl.UTF-8):     Dokumentacja API biblioteki libgpod
+Group:         Documentation
+Requires:      gtk-doc-common
+
+%description apidocs
+libgpod API documentation.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki libgpod.
+
 %package -n python-gpod
-Summary:       Libraries for libgpod access from Python
-Summary(pl):   Biblioteki Pythona dla biblioteki libgpod
+Summary:       Module for libgpod access from Python
+Summary(pl.UTF-8):     Moduł Pythona umożliwiający korzystanie z biblioteki libgpod
 Group:         Development/Languages/Python
-Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      %{name} = %{version}-%{release}
 Requires:      python-eyeD3 >= 0.6.6
-%pyrequires_eq python-libs
+Requires:      python-libs
 
 %description -n python-gpod
 This is the libgpod Python support package.
 
-%description -n python-gpod -l pl
-Biblioteki umo¿liwiaj±ce korzystanie z libgpod z poziomu
+%description -n python-gpod -l pl.UTF-8
+Moduł umożliwiający korzystanie z biblioteki libgpod z poziomu
 Pythona.
 
+%package -n dotnet-%{name}-sharp
+Summary:       C#/.NET library to access iPod content
+Summary(pl.UTF-8):     Biblioteka C#/.NET pozwalajaca na dostęp do iPoda
+Group:         Development/Languages
+Requires:      %{name} = %{version}-%{release}
+
+%description -n dotnet-%{name}-sharp
+C#/.NET library to access iPod content. Provides bindings to the
+libgpod library.
+
+%description -n dotnet-%{name}-sharp -l pl.UTF-8
+Biblioteka C#/.NET pozwalająca na dostęp do iPoda. Udostępnia wiązania
+do biblioteki libgpod.
+
+%package -n dotnet-%{name}-sharp-devel
+Summary:       Development files for libgpod-sharp
+Summary(pl.UTF-8):     Development files for libgpod-sharp
+Group:         Development/Languages
+Requires:      dotnet-%{name}-sharp = %{version}-%{release}
+Requires:      pkgconfig
+
+%description -n dotnet-%{name}-sharp-devel
+C#/.NET library to access iPod content. Provides bindings to the
+libgpod library.
+
+This package contains the files required to develop programs that will
+use dotnet-libgpod-sharp.
+
+%description -n dotnet-%{name}-sharp-devel -l pl.UTF-8
+Pliki programistyczne biblioteki C#/.NET libgpod-sharp.
+
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %build
 %{__gtkdocize}
@@ -88,17 +190,33 @@ Pythona.
 %{__autoheader}
 %{__automake}
 %configure \
-       --with-eject-command="/usr/bin/eject" \
-       --with-unmount-command="/bin/umount" \
-       --with-python=yes
+       --disable-silent-rules \
+       --enable-gtk-doc \
+       --enable-mono%{!?with_dotnet:=no} \
+       --with-html-dir=%{_gtkdocdir} \
+       --with-temp-mount-dir=%{_localstatedir}/run/%{name} \
+       --with-python=%{!?with_python:no}%{?with_python:yes} \
+       --without-hal \
+       --enable-udev
+
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libgpod.la
+
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
+
+%if %{with python}
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gpod/*.la
+%py_postclean
+%endif
+
 %find_lang %{name} --all-name
 
 %clean
@@ -110,11 +228,20 @@ rm -rf $RPM_BUILD_ROOT
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog README
+%attr(755,root,root) %{_bindir}/ipod-read-sysinfo-extended
 %attr(755,root,root) %{_libdir}/libgpod.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgpod.so.4
+%dir %{_localstatedir}/run/%{name}
+%{systemdtmpfilesdir}/%{name}.conf
+
+%files -n udev-libgpod
+%defattr(644,root,root,755)
+%attr(755,root,root) /lib/udev/iphone-set-info
+%attr(755,root,root) /lib/udev/ipod-set-info
+/lib/udev/rules.d/90-libgpod.rules
 
 %files devel
 %defattr(644,root,root,755)
-%{_libdir}/libgpod.la
 %attr(755,root,root) %{_libdir}/libgpod.so
 %{_pkgconfigdir}/libgpod-1.0.pc
 %{_includedir}/gpod-1.0
@@ -123,6 +250,29 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{_libdir}/libgpod.a
 
+%files apidocs
+%defattr(644,root,root,755)
+%{_gtkdocdir}/libgpod
+
+%if %{with python}
 %files -n python-gpod
 %defattr(644,root,root,755)
-%{py_sitescriptdir}/*
+%dir %{py_sitedir}/gpod
+%{py_sitedir}/gpod/*.py[co]
+%attr(755,root,root) %{py_sitedir}/gpod/_gpod.so
+%endif
+
+%if %{with dotnet}
+%files -n dotnet-%{name}-sharp
+%defattr(644,root,root,755)
+%dir %{_prefix}/lib/libgpod
+%{_prefix}/lib/libgpod/libgpod-sharp-test.exe
+%{_prefix}/lib/libgpod/libgpod-sharp-test.exe.mdb
+%{_prefix}/lib/libgpod/libgpod-sharp.dll
+%{_prefix}/lib/libgpod/libgpod-sharp.dll.config
+%{_prefix}/lib/libgpod/libgpod-sharp.dll.mdb
+
+%files -n dotnet-%{name}-sharp-devel
+%defattr(644,root,root,755)
+%{_pkgconfigdir}/libgpod-sharp.pc
+%endif
This page took 0.0348 seconds and 4 git commands to generate.