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