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.3.27-1
9 %define ver_rpm 4.3-0.20040107.34
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.bz2
18 # Source0-md5: f7e2978c7f8b35b0b07d0278dd299881
20 Patch0: %{name}-etc_dir.patch
21 Patch1: %{name}-retr_term.patch
22 Patch2: %{name}-simplestatic.patch
23 Patch3: %{name}-gcc4.patch
24 Patch4: %{name}-cookie.patch
25 URL: http://team.pld.org.pl/~mis/poldek/
26 BuildRequires: automake
27 BuildRequires: autoconf
28 BuildRequires: bzip2-devel
29 %{?with_curl:BuildRequires: curl-devel >= 7.8}
30 BuildRequires: db-devel >= %{ver_db}
31 BuildRequires: gettext-autopoint
32 BuildRequires: openssl-devel >= 0.9.7d
33 BuildRequires: pcre-devel
34 BuildRequires: popt-devel
35 BuildRequires: readline-devel
36 BuildRequires: rpm-devel >= %{ver_rpm}
37 BuildRequires: zlib-devel
38 BuildRequires: perl-tools-pod
40 BuildRequires: bzip2-static
41 %{?with_curl:BuildRequires: curl-static}
42 BuildRequires: db-static >= %{ver_db}
43 BuildRequires: glibc-static
44 BuildRequires: libselinux-static
45 BuildRequires: ncurses-static
46 BuildRequires: openssl-static
47 BuildRequires: pcre-static
48 BuildRequires: popt-static
49 BuildRequires: readline-static
50 BuildRequires: rpm-static
51 BuildRequires: zlib-static
53 Requires: db >= %{ver_db}
55 Requires: rpm >= %{ver_rpm}
57 Requires: openssl >= 0.9.7c
58 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61 poldek is an RPM package management tool which allows you to easily
62 perform package verification, installation (including system
63 installation from scratch), upgrading, and removal.
65 Program can be used in batch (like apt-get from Debian's APT) or
66 interactive mode. The interactive mode puts you into a readline
67 interface with command line autocompletion and history, similar to the
68 shell mode of Perl's CPAN.
70 %{?with_static:This version is statically linked.}
72 %{!?with_imode:This version hasn't got interactive mode.}
75 poldek jest narzêdziem linii poleceñ s³u¿±cym do weryfikacji,
76 instalacji (w³±czaj±c instalacjê systemu od zera), aktualizacji i
79 Program mo¿e byæ u¿ywany w trybie wsadowym (jak debianowy apt-get) lub
80 interaktywnym. Tryb interaktywny posiada interfejs readline z
81 dope³nianiem komend i histori±, podobny do trybu shell perlowego
84 %{?with_static:Ta wersja jest konsolidowana statycznie.}
86 %{!?with_imode:Ta wersja nie posiada trybu interaktywnego.}
102 cp -f config.sub trurlib
104 %{?with_static:--enable-static} \
105 %{!?with_imode:--disable-imode} \
106 %{?with_curl:--with-curl}
110 rm -rf $RPM_BUILD_ROOT
111 install -d $RPM_BUILD_ROOT%{_sysconfdir}
114 DESTDIR=$RPM_BUILD_ROOT
116 %{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
119 # CHANGE IT WHEN SWITCHING poldek.conf FROM AC TO TH !!!
121 %ifarch i386 i586 i686 ppc sparc alpha amd64 athlon
122 %define _ftp_arch %{_target_cpu}
125 %define _ftp_arch i386
127 %ifarch pentium2 pentium3 pentium4
128 %define _ftp_arch i686
130 %ifarch sparcv9 sparc64
131 %define _ftp_arch sparc
137 sed "s|%%ARCH%%|%{_ftp_arch}|g" < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
142 rm -rf $RPM_BUILD_ROOT
144 %triggerpostun -- poldek <= 0.18.3-5
145 if grep -q '^promoteepoch.*yes' %{_sysconfdir}/poldek.conf ; then
146 echo -e ',s:^promoteepoch:# promoteepoch:g\n,w' | ed -s %{_sysconfdir}/poldek.conf
149 # otherwise don't touch
150 %ifarch i386 i586 i686 ppc sparc alpha amd64 athlon
151 %triggerpostun -- poldek <= 0.18.7-1
152 echo -e ',s://ftp.pld-linux.org://ftp.%{_target_cpu}.ac.pld-linux.org:g\n,w' |\
153 ed -s /etc/poldek.conf ||:
156 %files -f %{name}.lang
157 %defattr(644,root,root,755)
158 %doc README* NEWS TODO *sample* conf/poldekrc*
159 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
160 %attr(755,root,root) %{_bindir}/*
161 %{_mandir}/man1/%{name}*
162 %lang(pl) %{_mandir}/pl/man1/%{name}*