3 %bcond_without imode # don't build interactive mode
4 %bcond_without curl # don't link curl
5 %bcond_with static # don't use shared libraries
7 Summary: RPM packages management helper tool
8 Summary(pl): Pomocnicze narzêdzie do zarz±dzania pakietami RPM
13 Group: Applications/System
14 Source0: http://team.pld.org.pl/~mis/poldek/download/%{name}-%{version}.tar.gz
15 # Source0-md5: 99d118c986e8102e11b81768499ec0bd
17 Patch0: %{name}-retr_term.patch
18 Patch1: %{name}-simplestatic.patch
19 Patch2: %{name}-pkgorder.patch
20 Patch3: %{name}-sigsegv.patch
21 Patch4: %{name}-caplookup.patch
22 Patch5: %{name}-progress2.patch
23 URL: http://team.pld.org.pl/~mis/poldek/
24 BuildRequires: /usr/bin/pod2man
25 BuildRequires: autoconf
26 BuildRequires: automake
27 BuildRequires: bzip2-devel
28 %{?with_static:BuildRequires: bzip2-static}
29 %{?with_curl:BuildRequires: curl-devel >= 7.8}
30 %{?with_curl:%{?with_static:BuildRequires: curl-static}}
31 %{?with_static:BuildRequires: db1-static}
32 %{?with_static:BuildRequires: db3-static}
33 BuildRequires: openssl-devel >= 0.9.6m
34 %{?with_static:BuildRequires: openssl-static}
35 BuildRequires: pcre-devel
36 %{?with_static:BuildRequires: pcre-static}
37 BuildRequires: popt-devel
38 %{?with_static:BuildRequires: popt-static}
39 BuildRequires: readline-devel
40 BuildRequires: rpm-devel >= 4.0.2-62
41 %{?with_static:BuildRequires: rpm-static}
42 BuildRequires: zlib-devel
43 %{?with_static:BuildRequires: zlib-static}
44 Requires: rpm >= 4.0.2-62
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 poldek is an RPM package management tool which allows you to easily
50 perform package verification, installation (including system
51 installation from scratch), upgrading, and removal.
53 Program can be used in batch (like apt-get from Debian's APT) or
54 interactive mode. The interactive mode puts you into a readline
55 interface with command line autocompletion and history, similar to the
56 shell mode of Perl's CPAN.
58 %{?with_static:This version is statically linked.}
60 %{!?with_imode:This version hasn't got interactive mode.}
63 poldek jest narzêdziem linii poleceñ s³u¿±cym do weryfikacji,
64 instalacji (w³±czaj±c instalacjê systemu od zera), aktualizacji
67 Program mo¿e byæ u¿ywany w trybie wsadowym (jak debianowy apt-get)
68 lub interaktywnym. Tryb interaktywny posiada interfejs readline
69 z dope³nianiem komend i histori±, podobny do trybu shell perlowego
72 %{?with_static:Ta wersja jest konsolidowana statycznie.}
74 %{!?with_imode:Ta wersja nie posiada trybu interaktywnego.}
86 if ! grep -q AM_GNU_GETTEXT_VERSION configure.in ; then
87 cp configure.in configure.in.orig
88 sed -e 's/AM_GNU_GETTEXT\(.*\)/AM_GNU_GETTEXT\1\
89 AM_GNU_GETTEXT_VERSION(0.10.40)/' \
90 -e 's=po/Makefile.in=po/Makefile.in intl/Makefile=' \
91 configure.in.orig >configure.in
98 %{?with_static:--enable-static} \
99 %{!?with_imode:--disable-imode} \
100 %{?with_curl:--with-curl}
104 rm -rf $RPM_BUILD_ROOT
105 install -d $RPM_BUILD_ROOT%{_sysconfdir}
107 # no strip cause program's beta stage and core may be useful
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/etc/%{name}.conf
117 rm -rf $RPM_BUILD_ROOT
119 %triggerpostun -- poldek <= 0.18.3-1
120 if ! grep -q promoteepoch /etc/poldek.conf ; then
121 echo promoteepoch = yes >>/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}*