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