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