3 %bcond_with static # don't use shared libraries
4 %bcond_without imode # don't build interactive mode
5 %bcond_with curl # link with curl
7 # required versions (forced to avoid SEGV with mixed db used by rpm and poldek)
8 %define ver_db 4.2.50-1
9 %define ver_rpm 4.3-0.20030610.29
10 Summary: RPM packages management helper tool
11 Summary(pl): Pomocnicze narzêdzie do zarz±dzania pakietami RPM
16 Group: Applications/System
17 Source0: http://team.pld.org.pl/~mis/poldek/download/%{name}-%{version}.tar.gz
18 # Source0-md5: 33f5dccfdcc368e197e1f2e7d403879e
20 Patch0: %{name}-etc_dir.patch
21 Patch1: %{name}-retr_term.patch
22 Patch2: %{name}-simplestatic.patch
23 URL: http://team.pld.org.pl/~mis/poldek/
24 BuildRequires: automake
25 BuildRequires: autoconf
26 BuildRequires: bzip2-devel
27 %{?with_curl:BuildRequires: curl-devel >= 7.8}
28 BuildRequires: db-devel >= %{ver_db}
29 BuildRequires: gettext-autopoint
30 BuildRequires: openssl-devel >= 0.9.7d
31 BuildRequires: pcre-devel
32 BuildRequires: popt-devel
33 BuildRequires: readline-devel
34 BuildRequires: rpm-devel >= %{ver_rpm}
35 BuildRequires: zlib-devel
36 BuildRequires: perl-tools-pod
38 BuildRequires: bzip2-static
39 %{?with_curl:BuildRequires: curl-static}
40 BuildRequires: db-static >= %{ver_db}
41 BuildRequires: glibc-static
42 buildRequires: libselinux-static
43 BuildRequires: ncurses-static
44 BuildRequires: openssl-static
45 BuildRequires: pcre-static
46 BuildRequires: popt-static
47 BuildRequires: readline-static
48 BuildRequires: rpm-static
49 BuildRequires: zlib-static
51 Requires: db >= %{ver_db}
53 Requires: rpm >= %{ver_rpm}
55 Requires: openssl >= 0.9.7c
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59 poldek is an RPM package management tool which allows you to easily
60 perform package verification, installation (including system
61 installation from scratch), upgrading, and removal.
63 Program can be used in batch (like apt-get from Debian's APT) or
64 interactive mode. The interactive mode puts you into a readline
65 interface with command line autocompletion and history, similar to the
66 shell mode of Perl's CPAN.
68 %{?with_static:This version is statically linked.}
70 %{!?with_imode:This version hasn't got interactive mode.}
73 poldek jest narzêdziem linii poleceñ s³u¿±cym do weryfikacji,
74 instalacji (w³±czaj±c instalacjê systemu od zera), aktualizacji i
77 Program mo¿e byæ u¿ywany w trybie wsadowym (jak debianowy apt-get) lub
78 interaktywnym. Tryb interaktywny posiada interfejs readline z
79 dope³nianiem komend i histori±, podobny do trybu shell perlowego
82 %{?with_static:Ta wersja jest konsolidowana statycznie.}
84 %{!?with_imode:Ta wersja nie posiada trybu interaktywnego.}
97 cp -f config.sub trurlib
99 %{?with_static:--enable-static} \
100 %{!?with_imode:--disable-imode} \
101 %{?with_curl:--with-curl}
105 rm -rf $RPM_BUILD_ROOT
106 install -d $RPM_BUILD_ROOT%{_sysconfdir}
109 DESTDIR=$RPM_BUILD_ROOT
111 %{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
112 sed "s|/i686/|/%{_target_cpu}/|g" < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
117 rm -rf $RPM_BUILD_ROOT
119 %triggerpostun -- poldek <= 0.18.3-5
120 if grep -q '^promoteepoch.*yes' /etc/poldek.conf ; then
121 echo -e ',s:^promoteepoch:# promoteepoch:g\n,w' | ed -s /etc/poldek.conf
124 %files -f %{name}.lang
125 %defattr(644,root,root,755)
126 %doc README* NEWS TODO *sample* conf/poldekrc*
127 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}.conf
128 %attr(755,root,root) %{_bindir}/*
129 %{_mandir}/man1/%{name}*
130 %lang(pl) %{_mandir}/pl/man1/%{name}*