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 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.bz2
15 # Source0-md5: 8af8090d401254939911e456e2f09e60
17 Patch0: %{name}-static.patch
18 Patch1: %{name}-etc_dir.patch
19 Patch2: %{name}-rpm4.2.patch
20 Patch3: %{name}-rpm4.1-fix.patch
21 Patch4: %{name}-retr_term.patch
22 Patch5: %{name}-deps-fix.patch
23 Patch6: %{name}-broken-rpmdb.patch
24 Patch7: %{name}-epoch0.patch
25 Patch8: %{name}-ldb4.patch
26 URL: http://team.pld.org.pl/~mis/poldek/
27 BuildRequires: bzip2-devel
28 %{?with_curl:BuildRequires: curl-devel >= 7.8}
29 BuildRequires: automake
30 BuildRequires: autoconf
31 BuildRequires: gettext-autopoint
32 BuildRequires: openssl-devel >= 0.9.7c
33 BuildRequires: pcre-devel
34 BuildRequires: popt-devel
35 BuildRequires: readline-devel
36 BuildRequires: rpm-devel >= 4.2.1
37 BuildRequires: zlib-devel
38 BuildRequires: /usr/bin/pod2man
39 %{?with_static:BuildRequires: bzip2-static}
40 %{?with_curl:%{?with_static:BuildRequires: curl-static}}
41 %{?with_static:BuildRequires: ncurses-static}
42 %{?with_static:BuildRequires: openssl-static}
43 %{?with_static:BuildRequires: pcre-static}
44 %{?with_static:BuildRequires: popt-static}
45 %{?with_static:BuildRequires: readline-static}
46 %{?with_static:BuildRequires: rpm-static}
47 %{?with_static:BuildRequires: zlib-static}
48 %{?with_static:BuildRequires: glibc-static}
49 Requires: rpm >= 4.2.1
51 Requires: openssl >= 0.9.7c
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 poldek is an RPM package management tool which allows you to easily
56 perform package verification, installation (including system
57 installation from scratch), upgrading, and removal.
59 Program can be used in batch (like apt-get from Debian's APT) or
60 interactive mode. The interactive mode puts you into a readline
61 interface with command line autocompletion and history, similar to the
62 shell mode of Perl's CPAN.
64 %{?with_static:This version is statically linked.}
66 %{!?with_imode:This version hasn't got interactive mode.}
69 poldek jest narzêdziem linii poleceñ s³u¿±cym do weryfikacji,
70 instalacji (w³±czaj±c instalacjê systemu od zera), aktualizacji i
73 Program mo¿e byæ u¿ywany w trybie wsadowym (jak debianowy apt-get) lub
74 interaktywnym. Tryb interaktywny posiada interfejs readline z
75 dope³nianiem komend i histori±, podobny do trybu shell perlowego
78 %{?with_static:Ta wersja jest konsolidowana statycznie.}
80 %{!?with_imode:Ta wersja nie posiada trybu interaktywnego.}
100 %{?with_static:--enable-static} \
101 %{!?with_imode:--disable-imode} \
102 %{?with_curl:--with-curl}
106 rm -rf $RPM_BUILD_ROOT
107 install -d $RPM_BUILD_ROOT%{_sysconfdir}
110 DESTDIR=$RPM_BUILD_ROOT
112 %{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
113 sed "s|/i686/|/%{_target_cpu}/|g" < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
118 rm -rf $RPM_BUILD_ROOT
120 %files -f %{name}.lang
121 %defattr(644,root,root,755)
122 %doc README* NEWS TODO *sample* conf/poldekrc*
123 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}.conf
124 %attr(755,root,root) %{_bindir}/*
125 %{_mandir}/man1/%{name}*
126 %lang(pl) %{_mandir}/pl/man1/%{name}*