]> git.pld-linux.org Git - packages/libgpod.git/blobdiff - libgpod.spec
add bcond for python; group bcond BRs
[packages/libgpod.git] / libgpod.spec
index bdeba9fbd17f2fd99e24d8c78ad52fe57f140a7d..a90513c942d1bc57203e3d174d6b5c802b91e7d4 100644 (file)
@@ -1,33 +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.UTF-8):     Biblioteka współdzielona do dostępu do zawartości iPodów
 Name:          libgpod
-Version:       0.6.0
-Release:       4
+Version:       0.8.3
+Release:       0.1
 License:       GPL v2
 Group:         Libraries
-Source0:       http://dl.sourceforge.net/gtkpod/%{name}-%{version}.tar.gz
-# Source0-md5: b44d8aee3f6610370b6faf61770c5f3c
-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.30
-BuildRequires: gettext-devel
-BuildRequires: gtk+2-devel >= 2.0
+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: hal-devel < 0.6
-BuildRequires: hal-devel >= 0.5.7.1
 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: sg3_utils-devel
 BuildRequires: swig-python >= 1.3.24
-# for noinst test only
-#BuildRequires:        taglib-devel
-Suggests:      hal-libgpod = %{version}-%{release}
+%endif
+Suggests:      udev-libgpod = %{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -41,28 +76,28 @@ 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 hal-libgpod
-Summary:       HAL callout program for iPod devices
-Summary(pl.UTF-8):     Program wywoływany przez HAL dla urządzeń iPod
+%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}
-Requires:      hal >= 0.5
+Obsoletes:     hal-libgpod
 
-%description -n hal-libgpod
-HAL callout program to initialize iPod devices for libgpod library.
+%description -n udev-libgpod
+UDEV rules and programs to initialize iPod devices for libgpod
+library.
 
-%description -n hal-libgpod -l pl.UTF-8
-Program wywoływany przez HAL do przygotowywania urządzeń iPod do
-użytku z biblioteką libgpod.
+%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.UTF-8):     Pliki nagłówkowe biblioteki libgpod
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      dbus-glib-devel >= 0.30
-Requires:      gtk+2-devel >= 2.0
-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.
@@ -95,21 +130,55 @@ libgpod API documentation.
 Dokumentacja API biblioteki libgpod.
 
 %package -n python-gpod
-Summary:       Libraries for libgpod access from Python
-Summary(pl.UTF-8):     Biblioteki Pythona umożliwiające korzystanie z 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} = %{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.UTF-8
-Biblioteki umożliwiające korzystanie z libgpod z poziomu Pythona.
+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}
@@ -121,19 +190,32 @@ Biblioteki umożliwiające korzystanie z libgpod z poziomu Pythona.
 %{__autoheader}
 %{__automake}
 %configure \
+       --disable-silent-rules \
+       --enable-gtk-doc \
+       --enable-mono%{!?with_dotnet:=no} \
        --with-html-dir=%{_gtkdocdir} \
-       --with-python=yes
+       --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 -f $RPM_BUILD_ROOT%{py_sitedir}/gpod/*.{la,a}
+%{__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
 
@@ -148,17 +230,19 @@ rm -rf $RPM_BUILD_ROOT
 %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.3
+%attr(755,root,root) %ghost %{_libdir}/libgpod.so.4
+%dir %{_localstatedir}/run/%{name}
+%{systemdtmpfilesdir}/%{name}.conf
 
-%files -n hal-libgpod
+%files -n udev-libgpod
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/hal/libgpod-callout
-%{_datadir}/hal/fdi/policy/20thirdparty/20-libgpod-sysinfo-extended.fdi
+%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)
 %attr(755,root,root) %{_libdir}/libgpod.so
-%{_libdir}/libgpod.la
 %{_pkgconfigdir}/libgpod-1.0.pc
 %{_includedir}/gpod-1.0
 
@@ -170,8 +254,25 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{_gtkdocdir}/libgpod
 
+%if %{with python}
 %files -n python-gpod
 %defattr(644,root,root,755)
 %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.041216 seconds and 4 git commands to generate.