]> git.pld-linux.org Git - packages/poldek.git/blob - poldek.spec
- cosmetics.
[packages/poldek.git] / poldek.spec
1 #
2 # Conditional build:
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
6 #
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
12 Name:           poldek
13 Version:        0.18.5
14 Release:        5
15 License:        GPL v2
16 Group:          Applications/System
17 Source0:        http://team.pld.org.pl/~mis/poldek/download/%{name}-%{version}.tar.gz
18 # Source0-md5:  33f5dccfdcc368e197e1f2e7d403879e
19 Source1:        %{name}.conf
20 Patch0:         %{name}-etc_dir.patch
21 Patch1:         %{name}-retr_term.patch
22 Patch2:         %{name}-simplestatic.patch
23 Patch3:         %{name}-broken-progressbar-width.patch
24 Patch4:         %{name}-pkgset.patch
25 Patch5:         %{name}-obsoletes-fix.patch
26 Patch6:         %{name}-obsoletes-fix2.patch
27 URL:            http://team.pld.org.pl/~mis/poldek/
28 BuildRequires:  automake
29 BuildRequires:  autoconf
30 BuildRequires:  bzip2-devel
31 %{?with_curl:BuildRequires:     curl-devel >= 7.8}
32 BuildRequires:  db-devel >= %{ver_db}
33 BuildRequires:  gettext-autopoint
34 BuildRequires:  openssl-devel >= 0.9.7d
35 BuildRequires:  pcre-devel
36 BuildRequires:  popt-devel
37 BuildRequires:  readline-devel
38 BuildRequires:  rpm-devel >= %{ver_rpm}
39 BuildRequires:  zlib-devel
40 BuildRequires:  perl-tools-pod
41 %if %{with static}
42 BuildRequires:  bzip2-static
43 %{?with_curl:BuildRequires:     curl-static}
44 BuildRequires:  db-static >= %{ver_db}
45 BuildRequires:  glibc-static
46 BuildRequires:  libselinux-static
47 BuildRequires:  ncurses-static
48 BuildRequires:  openssl-static
49 BuildRequires:  pcre-static
50 BuildRequires:  popt-static
51 BuildRequires:  readline-static
52 BuildRequires:  rpm-static
53 BuildRequires:  zlib-static
54 %endif
55 Requires:       db >= %{ver_db}
56 Requires:       ed
57 Requires:       rpm >= %{ver_rpm}
58 Requires:       sed
59 Requires:       openssl >= 0.9.7c
60 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62 %description
63 poldek is an RPM package management tool which allows you to easily
64 perform package verification, installation (including system
65 installation from scratch), upgrading, and removal.
66
67 Program can be used in batch (like apt-get from Debian's APT) or
68 interactive mode. The interactive mode puts you into a readline
69 interface with command line autocompletion and history, similar to the
70 shell mode of Perl's CPAN.
71
72 %{?with_static:This version is statically linked.}
73
74 %{!?with_imode:This version hasn't got interactive mode.}
75
76 %description -l pl
77 poldek jest narzêdziem linii poleceñ s³u¿±cym do weryfikacji,
78 instalacji (w³±czaj±c instalacjê systemu od zera), aktualizacji i
79 usuwania pakietów.
80
81 Program mo¿e byæ u¿ywany w trybie wsadowym (jak debianowy apt-get) lub
82 interaktywnym. Tryb interaktywny posiada interfejs readline z
83 dope³nianiem komend i histori±, podobny do trybu shell perlowego
84 modu³u CPAN.
85
86 %{?with_static:Ta wersja jest konsolidowana statycznie.}
87
88 %{!?with_imode:Ta wersja nie posiada trybu interaktywnego.}
89
90 %prep
91 %setup -q
92 %patch0 -p1
93 %patch1 -p1
94 %patch2 -p0
95 %patch3 -p0
96 %patch4 -p0
97 %patch5 -p2
98 %patch6 -p0
99
100 %build
101 %{__autopoint}
102 %{__aclocal} -I m4
103 %{__autoconf}
104 %{__automake}
105 cp -f config.sub trurlib
106 %configure \
107         %{?with_static:--enable-static} \
108         %{!?with_imode:--disable-imode} \
109         %{?with_curl:--with-curl}
110 %{__make}
111
112 %install
113 rm -rf $RPM_BUILD_ROOT
114 install -d $RPM_BUILD_ROOT%{_sysconfdir}
115
116 %{__make} install \
117         DESTDIR=$RPM_BUILD_ROOT
118
119 %{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
120 sed "s|/i686/|/%{_target_cpu}/|g" < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
121
122 %find_lang %{name}
123
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %triggerpostun -- poldek <= 0.18.3-5
128 if grep -q '^promoteepoch.*yes' /etc/poldek.conf ; then
129         echo -e ',s:^promoteepoch:# promoteepoch:g\n,w' | ed -s /etc/poldek.conf
130 fi
131
132 %files -f %{name}.lang
133 %defattr(644,root,root,755)
134 %doc README* NEWS TODO *sample* conf/poldekrc*
135 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}.conf
136 %attr(755,root,root) %{_bindir}/*
137 %{_mandir}/man1/%{name}*
138 %lang(pl) %{_mandir}/pl/man1/%{name}*
This page took 0.033125 seconds and 3 git commands to generate.