]> git.pld-linux.org Git - packages/poldek.git/blame - poldek.spec
This commit was manufactured by cvs2git to create tag 'auto-ac-poldek-
[packages/poldek.git] / poldek.spec
CommitLineData
a7d09531 1# Conditional build:
2%bcond_with static # don't use shared libraries
3%bcond_without imode # don't build interactive mode
4%bcond_without python # don't build python bindings
5#
6# required versions (forced to avoid SEGV with mixed db used by rpm and poldek)
7%define ver_db 4.2.50-1
53559754 8%define ver_rpm 4.4.9-31
dd5c3473 9%define snap 20070703.00
53559754 10%define rel 11
a7d09531 11Summary: RPM packages management helper tool
12Summary(pl.UTF-8): Pomocnicze narzędzie do zarządzania pakietami RPM
13Name: poldek
ac5b976e 14Version: 0.21
dd5c3473 15Release: 0.%{snap}.%{rel}
a7d09531 16License: GPL v2
17Group: Applications/System
dd5c3473 18Source0: http://poldek.pld-linux.org/download/snapshots/%{name}-%{version}-cvs%{snap}.tar.bz2
55fcd157 19# Source0-md5: dae23dec560fad954abf157fd250e4c3
a7d09531 20Source1: %{name}.conf
21Source2: %{name}-multilib.conf
22Source3: %{name}-aliases.conf
23Patch1: %{name}-vserver-packages.patch
24Patch2: %{name}-config.patch
25Patch3: %{name}-multilib.patch
9e651e85 26Patch4: %{name}-ndie_fix.patch
a6fe12ac
ER
27Patch5: %{name}-uri-escape-fix.patch
28Patch6: %{name}-install-dist.patch
29Patch7: %{name}-nohold-fix.patch
b2dde539 30Patch8: %{name}-dir-dot.patch
56b258f4 31Patch9: %{name}-suggests-one-package.patch
dd5c3473 32Patch10: %{name}-dirdeps.patch
a7d09531 33URL: http://poldek.pld-linux.org/
34BuildRequires: autoconf
35BuildRequires: automake
36BuildRequires: bzip2-devel
37BuildRequires: check
38BuildRequires: db-devel >= %{ver_db}
39BuildRequires: gettext-autopoint
40BuildRequires: libtool
41BuildRequires: libxml2-devel
42BuildRequires: openssl-devel >= 0.9.7d
43BuildRequires: pcre-devel
44BuildRequires: perl-tools-pod
bdba0a51 45BuildRequires: pkgconfig
a7d09531 46BuildRequires: popt-devel
47%{?with_python:BuildRequires: python-devel}
48BuildRequires: readline-devel >= 5.0
49BuildRequires: rpm-devel >= %{ver_rpm}
50%{?with_python:BuildRequires: rpm-pythonprov}
51BuildRequires: sed >= 4.0
52BuildRequires: xmlto
53BuildRequires: zlib-devel
54%if %{with static}
55BuildRequires: bzip2-static
56BuildRequires: db-static >= %{ver_db}
57BuildRequires: glibc-static
58BuildRequires: libselinux-static
59BuildRequires: libxml2-static
60BuildRequires: ncurses-static
61BuildRequires: openssl-static
62BuildRequires: pcre-static
63BuildRequires: popt-static
64BuildRequires: readline-static
65BuildRequires: rpm-static
66BuildRequires: zlib-static
67%endif
68Requires(triggerpostun): awk
69Requires(triggerpostun): sed >= 4.0
70Requires: %{name}-libs = %{version}-%{release}
71Requires: db >= %{ver_db}
72Requires: openssl >= 0.9.7d
73Requires: rpm >= %{ver_rpm}
7fe46a22 74Requires: rpm-lib = %(rpm -q --qf '%{V}' rpm-lib)
dd48d890
ER
75# vf* scripts use sed
76Requires: sed
a7d09531 77BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
78
79%description
80poldek is an RPM package management tool which allows you to easily
81perform package verification, installation (including system
82installation from scratch), upgrading, and removal.
83
84Program can be used in batch (like apt-get from Debian's APT) or
85interactive mode. The interactive mode puts you into a readline
86interface with command line autocompletion and history, similar to the
87shell mode of Perl's CPAN.
88
89%{?with_static:This version is statically linked.}
90
91%{!?with_imode:This version hasn't got interactive mode.}
92#'vim
93
94%description -l pl.UTF-8
95poldek jest narzędziem linii poleceń służącym do weryfikacji,
96instalacji (włączając instalację systemu od zera), aktualizacji i
97usuwania pakietów.
98
99Program może być używany w trybie wsadowym (jak debianowy apt-get) lub
100interaktywnym. Tryb interaktywny posiada interfejs readline z
101dopełnianiem komend i historią, podobny do trybu shell perlowego
102modułu CPAN.
103
104%{?with_static:Ta wersja jest konsolidowana statycznie.}
105
106%{!?with_imode:Ta wersja nie posiada trybu interaktywnego.}
107
108%package libs
109Summary: poldek libraries
110Summary(pl.UTF-8): Biblioteki poldka
111Group: Libraries
112
113%description libs
114poldek libraries.
115
116%description libs -l pl.UTF-8
117Biblioteki poldka.
118
119%package devel
120Summary: Header files for poldek libraries
121Summary(pl.UTF-8): Pliki nagłówkowe bibliotek poldka
122Group: Development/Libraries
123Requires: %{name}-libs = %{version}-%{release}
124
125%description devel
126Header files for poldek libraries.
127
128%description devel -l pl.UTF-8
129Pliki nagłówkowe bibliotek poldka.
130
131%package static
132Summary: poldek static libraries
133Summary(pl.UTF-8): Biblioteki statyczne poldka
134Group: Development/Libraries
135Requires: %{name}-devel = %{version}-%{release}
136
137%description static
138poldek static libraries.
139
140%description static -l pl.UTF-8
141Biblioteki statyczne poldka.
142
143%package -n python-poldek
144Summary: Python modules for poldek
145Summary(pl.UTF-8): Moduły języka Python dla poldka
146Group: Libraries/Python
147Requires: %{name}-libs = %{version}-%{release}
148%pyrequires_eq python-libs
149
150%description -n python-poldek
151Python modules for poldek.
152
153%description -n python-poldek -l pl.UTF-8
154Moduły języka Python dla poldka.
155
156%prep
dd5c3473 157%setup -q -n %{name}-%{version}%{?snap:-cvs%{snap}}
a7d09531 158%patch1 -p1
159%patch2 -p1
160%ifarch %{x8664}
161%patch3 -p1
162%endif
dd48d890 163%patch4 -p0
905ab661 164%patch5 -p0
a6fe12ac
ER
165%patch6 -p1
166%patch7 -p1
b2dde539 167%patch8 -p1
56b258f4 168%patch9 -p1
dd5c3473 169%patch10 -p1
a7d09531 170
4a82896e
ER
171# cleanup backups after patching
172find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
173
a7d09531 174%build
175%{__autopoint}
176%{__aclocal} -I m4
177%{__autoconf}
178%{__automake}
179cp -f config.sub trurlib
180
181%configure \
182 %{?with_static:--enable-static --disable-shared} \
183 %{!?with_imode:--disable-imode} \
184 --enable-nls \
185 %{?with_python:--with-python}
186%{__make}
187
188%install
189rm -rf $RPM_BUILD_ROOT
190install -d $RPM_BUILD_ROOT%{_sysconfdir}
191
192%{__make} install \
193 DESTDIR=$RPM_BUILD_ROOT
194
195%if %{with python}
196%{__make} -C python install \
197 DESTDIR=$RPM_BUILD_ROOT \
198 libdir=%{py_sitedir}
199%endif
200
201%{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
202
203%ifarch i386 i586 i686 ppc sparc alpha athlon
204%define _ftp_arch %{_target_cpu}
205%else
206%ifarch %{x8664}
207%define _ftp_arch amd64
208%define _ftp_alt_arch i686
209%else
210%ifarch i486
211%define _ftp_arch i386
212%else
213%ifarch pentium2 pentium3 pentium4
214%define _ftp_arch i686
215%else
216%ifarch sparcv9 sparc64
217%define _ftp_arch sparc
218%endif
219%endif
220%endif
221%endif
222%endif
223
224%{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
225
226sed -e '
227 s|%%ARCH%%|%{_ftp_arch}|g
228' < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pld-source.conf
229
230%ifarch %{x8664}
231sed '
232 s|%%ARCH%%|%{_ftp_alt_arch}|g
233' < %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pld-multilib-source.conf
234%endif
235
236install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/aliases.conf
237
238# get rid of non-pld sources
239rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{rh,fedora}-source.conf
240# include them in %doc
241rm -rf configs
242cp -a conf configs
243rm -f configs/Makefile*
244
245%if %{with python}
246%py_postclean
247rm -f $RPM_BUILD_ROOT%{py_sitedir}/_poldekmod.la
248%endif
249
250%find_lang %{name}
251
252%clean
253rm -rf $RPM_BUILD_ROOT
254
255%post
256[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
257
258%postun
259[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
260
261%post libs -p /sbin/ldconfig
262%postun libs -p /sbin/ldconfig
263
a7d09531 264%triggerpostun -- poldek < 0.19.0-1.20050613.22.0
265if [ -f /etc/poldek.conf.rpmsave ]; then
266 awk '/^source/ {
267 name = $3;
268 path = $4;
269 auto = "yes";
270 autoup = "yes";
271 type = "pdir";
272 pri = "";
273
274 if (sub(",noauto", "", name)) {
275 auto = "no";
276 }
277
278 # process pri=\d+
279 if (match(name, /,pri=[0-9]+/)) {
280 pri = substr(name, RSTART + 5, RLENGTH - 5);
281 name = substr(name, 1, RSTART - 1) substr(name, RSTART + RLENGTH);
282 }
283
284 # skip ac sources. already in new config.
285 if (name !~ /^ac(-(ready|test|supported|updates-(general|security)))?$/) {
286 print "";
287 print "[source]";
288 print "name = " name;
289 print "type = " type;
290 print "path = " path;
291 print "auto = " auto;
292 print "autoup = " autoup;
293 if (pri) {
294 print "pri = " pri;
295 }
296 }
297
298 }' < /etc/poldek.conf.rpmsave >> /etc/poldek/source.conf
299 echo "Converted old custom sources from /etc/poldek.conf.rpmsave to new poldek format in /etc/poldek/source.conf"
300
301 # copy hold=
302 hold=$(grep ^hold /etc/poldek.conf.rpmsave)
303 if [ "$hold" ]; then
304 sed -i -e "/^#hold =/s/^.*/$hold/" /etc/poldek/poldek.conf
305 fi
306fi
307
308%files -f %{name}.lang
309%defattr(644,root,root,755)
310%doc README* NEWS TODO configs/
311%dir %{_sysconfdir}/%{name}
312%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf
313%attr(755,root,root) %{_bindir}/*
314%dir %{_libdir}/%{name}
315%attr(755,root,root) %{_libdir}/%{name}/*
316%{_mandir}/man1/%{name}*
317%lang(pl) %{_mandir}/pl/man1/%{name}*
318%{_infodir}/poldek.info*
319
320%if !%{with static}
321%files libs
322%defattr(644,root,root,755)
323%attr(755,root,root) %{_libdir}/lib*.so.*.*.*
324%endif
325
326%files devel
327%defattr(644,root,root,755)
328%{!?with_static:%attr(755,root,root) %{_libdir}/lib*.so}
329%{_libdir}/lib*.la
330%{_includedir}/*
331
332%files static
333%defattr(644,root,root,755)
334%{_libdir}/lib*.a
335
336%if %{with python}
337%files -n python-poldek
338%defattr(644,root,root,755)
339%attr(755,root,root) %{py_sitedir}/_poldekmod.so
340%{py_sitescriptdir}/poldek.py[co]
341%{py_sitescriptdir}/poldekmod.py[co]
342%endif
This page took 0.058463 seconds and 4 git commands to generate.