]> git.pld-linux.org Git - packages/poldek.git/blobdiff - poldek.spec
- new snap
[packages/poldek.git] / poldek.spec
index 57505e3b9d3f7f7f431287e2dbc174d44e1cd267..7ead1a71876ff7927c690d47b13712346099c921 100644 (file)
@@ -2,19 +2,21 @@
 # Conditional build:
 %bcond_with    static  # don't use shared libraries
 %bcond_without imode   # don't build interactive mode
+%bcond_without python  # don't build python bindings
 #
 # required versions (forced to avoid SEGV with mixed db used by rpm and poldek)
 %define        ver_db  4.3.27-1
 %define        ver_rpm 4.4.3
+%define snap 20060822.17
 Summary:       RPM packages management helper tool
 Summary(pl):   Pomocnicze narzêdzie do zarz±dzania pakietami RPM
 Name:          poldek
-Version:       0.20
-Release:       6
+Version:       0.20.1
+Release:       0.%{snap}.1
 License:       GPL v2
 Group:         Applications/System
-Source0:       http://poldek.pld-linux.org/download/%{name}-%{version}.tar.bz2
-# Source0-md5: 61c0c03ee4a9de36339fc943b6901266
+Source0:       http://poldek.pld-linux.org/download/snapshots/%{name}-%{version}-cvs%{snap}.tar.bz2
+# Source0-md5: ffb8bc1927cf8678c64805fb833152b1
 Source1:       %{name}.conf
 Source2:       %{name}-multilib.conf
 Source3:       %{name}-aliases.conf
@@ -22,15 +24,9 @@ Source3:     %{name}-aliases.conf
 #PatchX:       %{name}-etc_dir.patch
 # drop?
 #PatchX:       %{name}-retr_term.patch
-# is still needed?
-#Patch2:       %{name}-simplestatic.patch
-Patch0:                %{name}-cvs-fixes.patch
-Patch1:                %{name}-ask-abort.patch
-Patch2:                %{name}-obsoletes.patch
-Patch3:                %{name}-rpm_4_4_3.patch
-Patch4:                %{name}-cli-hist.patch
 Patch5:                %{name}-vserver-packages.patch
 Patch6:                %{name}-config.patch
+Patch7:                %{name}-multilib.patch
 URL:           http://poldek.pld-linux.org/
 BuildRequires: autoconf
 BuildRequires: automake
@@ -44,8 +40,10 @@ BuildRequires:       openssl-devel >= 0.9.7d
 BuildRequires: pcre-devel
 BuildRequires: perl-tools-pod
 BuildRequires: popt-devel
+%{?with_python:BuildRequires:  python-devel}
 BuildRequires: readline-devel >= 5.0
 BuildRequires: rpm-devel >= %{ver_rpm}
+BuildRequires: xmlto
 BuildRequires: zlib-devel
 %if %{with static}
 BuildRequires: bzip2-static
@@ -133,15 +131,26 @@ poldek static libraries.
 %description static -l pl
 Biblioteki statyczne poldka.
 
+%package -n python-poldek
+Summary:       Python modules for poldek
+Summary(pl):   Modu³y jêzyka Python dla poldka
+Group:         Libraries/Python
+Requires:      %{name}-libs = %{version}-%{release}
+%pyrequires_eq python-libs
+
+%description -n python-poldek
+Python modules for poldek.
+
+%description -n python-poldek -l pl
+Modu³y jêzyka Python dla poldka.
+
 %prep
-%setup -q
-%patch0 -p2
-%patch1 -p0
-%patch2 -p0
-%patch3 -p0
-%patch4 -p2
+%setup -q -n %{name}-%{version}%{?snap:-cvs%{snap}}
 %patch5 -p1
 %patch6 -p1
+%ifarch %{x8664}
+%patch7 -p1
+%endif
 
 %build
 %{__autopoint}
@@ -153,7 +162,8 @@ cp -f config.sub trurlib
 %configure \
        %{?with_static:--enable-static --disable-shared} \
        %{!?with_imode:--disable-imode} \
-       --enable-nls
+       --enable-nls \
+       %{?with_python:--with-python}
 %{__make}
 
 %install
@@ -163,6 +173,12 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+%if %{with python}
+%{__make} -C python install \
+       DESTDIR=$RPM_BUILD_ROOT \
+       libdir=%{py_sitedir}
+%endif
+
 %{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
 
 %ifarch i486 i686 ppc sparc alpha athlon
@@ -188,16 +204,14 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}
 
 %{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
 
-sed -e "s|%%ARCH%%|%{_ftp_arch}|g" \
-%ifarch %{x8664}
-       -e "s|%%ALT_ARCH%%|%{_ftp_alt_arch}|g" \
-%else
-       -e '/%%ALT_ARCH%%/d' \
-%endif
-       < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pld-source.conf
+sed -e '
+       s|%%ARCH%%|%{_ftp_arch}|g
+' < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pld-source.conf
 
 %ifarch %{x8664}
-sed "s|%%ARCH%%|%{_ftp_alt_arch}|g" < %{SOURCE2} >> $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pld-source.conf
+sed '
+       s|%%ARCH%%|%{_ftp_alt_arch}|g
+' < %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pld-multilib-source.conf
 %endif
 
 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/aliases.conf
@@ -209,6 +223,11 @@ rm -rf configs
 cp -a conf configs
 rm -f configs/Makefile*
 
+%if %{with python}
+%py_postclean
+rm -f $RPM_BUILD_ROOT%{py_sitedir}/_poldekmod.la
+%endif
+
 %find_lang %{name}
 
 %clean
@@ -307,3 +326,11 @@ fi
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/lib*.a
+
+%if %{with python}
+%files -n python-poldek
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/_poldekmod.so
+%{py_sitescriptdir}/poldek.py[co]
+%{py_sitescriptdir}/poldekmod.py[co]
+%endif
This page took 0.074715 seconds and 4 git commands to generate.