%bcond_with static # don't use shared libraries
%bcond_without imode # don't build interactive mode
%bcond_with curl # link with curl
+%bcond_with distver # enable distversion patch
#
# required versions (forced to avoid SEGV with mixed db used by rpm and poldek)
%define ver_db 4.2.50-1
-%define ver_rpm 4.3-0.20030610.29
+%define ver_rpm 4.3-0.20040107.34
Summary: RPM packages management helper tool
Summary(pl): Pomocnicze narzêdzie do zarz±dzania pakietami RPM
Name: poldek
-Version: 0.18.1
-Release: 16
+Version: 0.18.7
+Release: 0.1%{?with_distver:+distver}
License: GPL v2
Group: Applications/System
Source0: http://team.pld.org.pl/~mis/poldek/download/%{name}-%{version}.tar.bz2
-# Source0-md5: 8af8090d401254939911e456e2f09e60
+# Source0-md5: 42830ed55809e41059771b87131a84fd
Source1: %{name}.conf
-Patch0: %{name}-static.patch
-Patch1: %{name}-etc_dir.patch
-Patch2: %{name}-rpm4.2.patch
-Patch3: %{name}-rpm4.1-fix.patch
-Patch4: %{name}-retr_term.patch
-Patch5: %{name}-deps-fix.patch
-Patch6: %{name}-broken-rpmdb.patch
-Patch7: %{name}-epoch0.patch
-Patch8: %{name}-ldb4.patch
+Patch0: %{name}-etc_dir.patch
+Patch1: %{name}-retr_term.patch
+Patch2: %{name}-simplestatic.patch
+Patch6: %{name}-progress2.patch
+Patch7: %{name}-po.patch
+Patch8: %{name}-deps-fix.patch
+Patch9: %{name}-obsoletes_provides.patch
+Patch10: %{name}-rev-promote.patch
+Patch11: %{name}-sigsegv2.patch
+Patch12: %{name}-distver.patch
URL: http://team.pld.org.pl/~mis/poldek/
BuildRequires: automake
BuildRequires: autoconf
%{?with_curl:BuildRequires: curl-devel >= 7.8}
BuildRequires: db-devel >= %{ver_db}
BuildRequires: gettext-autopoint
-BuildRequires: openssl-devel >= 0.9.7c
+BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: pcre-devel
BuildRequires: popt-devel
BuildRequires: readline-devel
BuildRequires: rpm-devel >= %{ver_rpm}
BuildRequires: zlib-devel
-BuildRequires: /usr/bin/pod2man
+BuildRequires: perl-tools-pod
%if %{with static}
BuildRequires: bzip2-static
%{?with_curl:BuildRequires: curl-static}
BuildRequires: db-static >= %{ver_db}
+BuildRequires: glibc-static
+BuildRequires: libselinux-static
BuildRequires: ncurses-static
BuildRequires: openssl-static
BuildRequires: pcre-static
BuildRequires: readline-static
BuildRequires: rpm-static
BuildRequires: zlib-static
-BuildRequires: glibc-static
%endif
Requires: db >= %{ver_db}
+Requires: ed
Requires: rpm >= %{ver_rpm}
+%{?with_distver:Requires: rpm-lib(distver)}
Requires: sed
Requires: openssl >= 0.9.7c
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%prep
%setup -q
-%patch0 -p1
+%patch0 -p1
%patch1 -p1
-%patch2 -p1
-%patch3 -p0
-%patch4 -p1
-%patch5 -p0
+%patch2 -p0
%patch6 -p1
%patch7 -p1
-%patch8 -p1
+%patch8 -p0
+%patch9 -p0
+%patch10 -p0
+%patch11 -p1
+%{?with_distver:%patch12 -p1}
%build
%{__autopoint}
%{__aclocal} -I m4
%{__autoconf}
%{__automake}
+cp -f config.sub trurlib
%configure \
%{?with_static:--enable-static} \
%{!?with_imode:--disable-imode} \
%clean
rm -rf $RPM_BUILD_ROOT
+%triggerpostun -- poldek <= 0.18.3-5
+if grep -q '^promoteepoch.*yes' /etc/poldek.conf ; then
+ echo -e ',s:^promoteepoch:# promoteepoch:g\n,w' | ed -s /etc/poldek.conf
+fi
+
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc README* NEWS TODO *sample* conf/poldekrc*