#
# 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.9
-%define snap 20070617.23
+%define ver_rpm 4.4.9-1
+#
+%define snap 20070703.00
+%define rel 13
Summary: RPM packages management helper tool
Summary(pl.UTF-8): Pomocnicze narzędzie do zarządzania pakietami RPM
Name: poldek
-Version: 0.20.1
-Release: 0.20070617.23
+Version: 0.21
+Release: 0.%{snap}.%{rel}
License: GPL v2
Group: Applications/System
Source0: http://poldek.pld-linux.org/download/snapshots/%{name}-%{version}-cvs%{snap}.tar.bz2
-# Source0-md5: baab95e1ea787d2b97f47194982bb58e
+# Source0-md5: dae23dec560fad954abf157fd250e4c3
Source1: %{name}.conf
Source2: %{name}-multilib.conf
Source3: %{name}-aliases.conf
+%if %{with imode}
+Source4: %{name}.desktop
+Source5: %{name}.png
+%endif
Patch1: %{name}-vserver-packages.patch
Patch2: %{name}-config.patch
Patch3: %{name}-multilib.patch
-Patch4: %{name}-desc_in_utf8.patch
+Patch4: %{name}-ndie_fix.patch
+Patch5: %{name}-uri-escape-fix.patch
+Patch6: %{name}-install-dist.patch
+Patch7: %{name}-nohold-fix.patch
+Patch8: %{name}-dir-dot.patch
+Patch9: %{name}-suggests-one-package.patch
URL: http://poldek.pld-linux.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: pcre-devel
BuildRequires: perl-tools-pod
+BuildRequires: pkgconfig
BuildRequires: popt-devel
%{?with_python:BuildRequires: python-devel}
BuildRequires: readline-devel >= 5.0
Requires: %{name}-libs = %{version}-%{release}
Requires: db >= %{ver_db}
Requires: rpm >= %{ver_rpm}
+Requires: rpm-lib = %(rpm -q --qf '%{V}' rpm-lib)
+# vf* scripts use sed
Requires: sed
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%ifarch %{x8664}
%patch3 -p1
%endif
-%patch4 -p1
+%patch4 -p0
+%patch5 -p0
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+
+# cleanup backups after patching
+find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
%build
%{__autopoint}
install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/aliases.conf
+%if %{with imode}
+# add desktop file and icon
+install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
+install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
+install %{SOURCE5} $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
+%endif
+
# get rid of non-pld sources
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{rh,fedora}-source.conf
# include them in %doc
%clean
rm -rf $RPM_BUILD_ROOT
-%post
-[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+%post -p /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
-%postun
-[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+%postun -p /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
-%triggerpostun -- poldek <= 0.18.3-5
-if [ -f /etc/poldek.conf ]; then
- sed -i -e '/^promoteepoch:.*yes/s/^/#/' /etc/poldek.conf
-fi
-
-# otherwise don't touch
-%ifarch i386 i586 i686 ppc sparc alpha amd64 athlon
-%triggerpostun -- poldek <= 0.18.7-1
-if [ -f /etc/poldek.conf ]; then
- sed -i -e 's://ftp.pld-linux.org://ftp.ac.pld-linux.org:g' /etc/poldek.conf
-fi
-%endif
-
%triggerpostun -- poldek < 0.19.0-1.20050613.22.0
if [ -f /etc/poldek.conf.rpmsave ]; then
awk '/^source/ {
%{_mandir}/man1/%{name}*
%lang(pl) %{_mandir}/pl/man1/%{name}*
%{_infodir}/poldek.info*
+%if %{with imode}
+%{_desktopdir}/%{name}.desktop
+%{_pixmapsdir}/%{name}.png
+%endif
%if !%{with static}
%files libs