%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.3.27-1
-%define ver_rpm 4.3-0.20040107.34
+%define ver_db 4.2.50-1
+%define ver_rpm 4.4.1
Summary: RPM packages management helper tool
Summary(pl): Pomocnicze narzêdzie do zarz±dzania pakietami RPM
Name: poldek
-Version: 0.18.8
-Release: 4%{?with_distver:+distver}
+Version: 0.18.9
+Release: 1
License: GPL v2
Group: Applications/System
Source0: http://team.pld.org.pl/~mis/poldek/download/%{name}-%{version}.tar.bz2
-# Source0-md5: f7e2978c7f8b35b0b07d0278dd299881
+# Source0-md5: c49eb9086a7ee77e50c527f9c95e41aa
Source1: %{name}.conf
Patch0: %{name}-etc_dir.patch
Patch1: %{name}-retr_term.patch
Patch2: %{name}-simplestatic.patch
-Patch3: %{name}-gcc4.patch
-Patch12: %{name}-distver.patch
+Patch3: %{name}-prereq.patch
+Patch4: %{name}-vf_append.patch
URL: http://team.pld.org.pl/~mis/poldek/
BuildRequires: automake
BuildRequires: autoconf
BuildRequires: bzip2-devel
%{?with_curl:BuildRequires: curl-devel >= 7.8}
-BuildRequires: db4.3-devel >= %{ver_db}
+BuildRequires: db-devel >= %{ver_db}
BuildRequires: gettext-autopoint
BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: pcre-devel
+BuildRequires: perl-tools-pod
BuildRequires: popt-devel
BuildRequires: readline-devel
BuildRequires: rpm-devel >= %{ver_rpm}
BuildRequires: zlib-devel
-BuildRequires: perl-tools-pod
%if %{with static}
BuildRequires: bzip2-static
%{?with_curl:BuildRequires: curl-static}
-BuildRequires: db4.3-static >= %{ver_db}
+BuildRequires: db-static >= %{ver_db}
BuildRequires: glibc-static
BuildRequires: libselinux-static
BuildRequires: ncurses-static
BuildRequires: rpm-static
BuildRequires: zlib-static
%endif
-Requires: db4.3 >= %{ver_db}
-Requires: ed
+Requires(triggerpostun): sed >= 4.0
+Requires: db >= %{ver_db}
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)
%{!?with_imode:This version hasn't got interactive mode.}
+#' vim
+
%description -l pl
poldek jest narzêdziem linii poleceñ s³u¿±cym do weryfikacji,
instalacji (w³±czaj±c instalacjê systemu od zera), aktualizacji i
%patch1 -p1
%patch2 -p0
%patch3 -p1
-%{?with_distver:%patch12 -p1}
+%patch4 -p0
%build
%{__autopoint}
%find_lang %{name}
+# no poldek-{devel,static}
+rm -rf $RPM_BUILD_ROOT%{_includedir}
+rm -rf $RPM_BUILD_ROOT%{_libdir}/lib*.a
+rm -rf $RPM_BUILD_ROOT%{_libdir}/libtrurl.so.0.4.0
+rm -rf $RPM_BUILD_ROOT%{_libdir}/libtrurl.la
+
%clean
rm -rf $RPM_BUILD_ROOT
%triggerpostun -- poldek <= 0.18.3-5
-if grep -q '^promoteepoch.*yes' %{_sysconfdir}/poldek.conf ; then
- echo -e ',s:^promoteepoch:# promoteepoch:g\n,w' | ed -s %{_sysconfdir}/poldek.conf
-fi
+sed -i -e '/^promoteepoch:.*yes/s/^/#/' %{_sysconfdir}/poldek.conf
# otherwise don't touch
%ifarch i386 i586 i686 ppc sparc alpha amd64 athlon
%triggerpostun -- poldek <= 0.18.7-1
-echo -e ',s://ftp.pld-linux.org://ftp.%{_target_cpu}.ac.pld-linux.org:g\n,w' |\
- ed -s /etc/poldek.conf ||:
+sed -i -e 's://ftp.pld-linux.org://ftp.%{_target_cpu}.ac.pld-linux.org:g' /etc/poldek.conf
%endif
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc README* NEWS TODO *sample* conf/poldekrc*
-%attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
%attr(755,root,root) %{_bindir}/*
%{_mandir}/man1/%{name}*
%lang(pl) %{_mandir}/pl/man1/%{name}*