]> git.pld-linux.org Git - packages/poldek.git/blame - poldek.spec
- added -missing-symbol.patch
[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)
5486bf2e
ER
8%define ver_db 4.3.27-1
9%define ver_rpm 4.4.9-1
10#
24ad8b8d 11%define snap 20080225.00
97108ac6 12%define rel 0.3
b44549bf 13Summary: RPM packages management helper tool
9faf625a 14Summary(pl.UTF-8): Pomocnicze narzędzie do zarządzania pakietami RPM
b44549bf 15Name: poldek
24ad8b8d 16Version: 0.30
78b0cd64 17Release: 0.%{snap}.%{rel}
9f931ada 18License: GPL v2
8efee472 19Group: Applications/System
7b350490 20Source0: http://poldek.pld-linux.org/download/snapshots/%{name}-%{version}-cvs%{snap}.tar.bz2
24ad8b8d 21# Source0-md5: 22b2cfb19cebd123e8d8148fb6ca27de
911a8560 22Source1: %{name}.conf
b25cb9a7
JB
23Source2: %{name}-multilib.conf
24Source3: %{name}-aliases.conf
9e6ff4ef 25Source4: %{name}.desktop
26Source5: %{name}.png
13aa6434
AM
27Patch1: %{name}-vserver-packages.patch
28Patch2: %{name}-config.patch
29Patch3: %{name}-multilib.patch
533cf0f6 30Patch4: %{name}-bug117hack.patch
d8aeff9a 31Patch5: %{name}-missing-symbol.patch
39ca2371 32URL: http://poldek.pld-linux.org/
a4268952 33BuildRequires: autoconf
b25cb9a7 34BuildRequires: automake
373c6f03 35BuildRequires: bzip2-devel
b25cb9a7 36BuildRequires: check
b1928c7a 37BuildRequires: db-devel >= %{ver_db}
c0d8905a 38BuildRequires: gettext-autopoint
b25cb9a7
JB
39BuildRequires: libtool
40BuildRequires: libxml2-devel
cbc6f56b 41BuildRequires: openssl-devel >= 0.9.7d
13fd950e 42BuildRequires: pcre-devel
f373d903 43BuildRequires: perl-tools-pod
b3ea4b51 44BuildRequires: pkgconfig
13fd950e 45BuildRequires: popt-devel
58c31de0 46%{?with_python:BuildRequires: python-devel}
b25cb9a7 47BuildRequires: readline-devel >= 5.0
373c6f03 48BuildRequires: rpm-devel >= %{ver_rpm}
300927eb 49%{?with_python:BuildRequires: rpm-pythonprov}
282cfaec 50BuildRequires: xmlto
96475e5e 51BuildRequires: zlib-devel
373c6f03
JB
52%if %{with static}
53BuildRequires: bzip2-static
b1928c7a 54BuildRequires: db-static >= %{ver_db}
2fac0b02 55BuildRequires: glibc-static
acb26797 56BuildRequires: libselinux-static
b25cb9a7 57BuildRequires: libxml2-static
373c6f03
JB
58BuildRequires: ncurses-static
59BuildRequires: openssl-static
60BuildRequires: pcre-static
61BuildRequires: popt-static
62BuildRequires: readline-static
63BuildRequires: rpm-static
64BuildRequires: zlib-static
373c6f03 65%endif
b25cb9a7 66Requires(triggerpostun): awk
168acc54 67Requires(triggerpostun): sed >= 4.0
09d4c571 68Requires: %{name}-libs = %{version}-%{release}
b1928c7a 69Requires: db >= %{ver_db}
373c6f03 70Requires: rpm >= %{ver_rpm}
78b0cd64 71Requires: rpm-lib = %(rpm -q --qf '%{V}' rpm-lib)
e202a52a
ER
72# vf* scripts use sed
73Requires: sed
b44549bf 74BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
75
76%description
0fa0dc36 77poldek is an RPM package management tool which allows you to easily
78perform package verification, installation (including system
13fd950e 79installation from scratch), upgrading, and removal.
0fa0dc36 80
13fd950e
JB
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.
8efee472 85
9fe14a3f 86%{?with_static:This version is statically linked.}
d94b28a6 87
9fe14a3f 88%{!?with_imode:This version hasn't got interactive mode.}
7f07e487 89#'vim
1f84648f 90
caed9b36
JR
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.
56e1ab51 95
caed9b36 96Program może być używany w trybie wsadowym (jak debianowy apt-get) lub
d82a9cb2 97interaktywnym. Tryb interaktywny posiada interfejs readline z
caed9b36
JR
98dopełnianiem komend i historią, podobny do trybu shell perlowego
99modułu CPAN.
8efee472 100
9fe14a3f 101%{?with_static:Ta wersja jest konsolidowana statycznie.}
a611e0bc 102
9fe14a3f 103%{!?with_imode:Ta wersja nie posiada trybu interaktywnego.}
b44549bf 104
b25cb9a7 105%package libs
168acc54 106Summary: poldek libraries
9faf625a 107Summary(pl.UTF-8): Biblioteki poldka
168acc54 108Group: Libraries
b25cb9a7
JB
109
110%description libs
111poldek libraries.
112
caed9b36 113%description libs -l pl.UTF-8
b25cb9a7
JB
114Biblioteki poldka.
115
116%package devel
168acc54 117Summary: Header files for poldek libraries
9faf625a 118Summary(pl.UTF-8): Pliki nagłówkowe bibliotek poldka
168acc54 119Group: Development/Libraries
09d4c571 120Requires: %{name}-libs = %{version}-%{release}
b25cb9a7
JB
121
122%description devel
123Header files for poldek libraries.
124
caed9b36
JR
125%description devel -l pl.UTF-8
126Pliki nagłówkowe bibliotek poldka.
b25cb9a7
JB
127
128%package static
168acc54 129Summary: poldek static libraries
9faf625a 130Summary(pl.UTF-8): Biblioteki statyczne poldka
168acc54 131Group: Development/Libraries
09d4c571 132Requires: %{name}-devel = %{version}-%{release}
b25cb9a7
JB
133
134%description static
135poldek static libraries.
136
caed9b36 137%description static -l pl.UTF-8
b25cb9a7
JB
138Biblioteki statyczne poldka.
139
58c31de0
JB
140%package -n python-poldek
141Summary: Python modules for poldek
9faf625a 142Summary(pl.UTF-8): Moduły języka Python dla poldka
58c31de0
JB
143Group: Libraries/Python
144Requires: %{name}-libs = %{version}-%{release}
145%pyrequires_eq python-libs
146
147%description -n python-poldek
148Python modules for poldek.
149
caed9b36
JR
150%description -n python-poldek -l pl.UTF-8
151Moduły języka Python dla poldka.
58c31de0 152
03159b71 153%prep
78b0cd64 154%setup -q -n %{name}-%{version}%{?snap:-cvs%{snap}}
13aa6434
AM
155%patch1 -p1
156%patch2 -p1
3375120c 157%ifarch %{x8664}
13aa6434 158%patch3 -p1
3375120c 159%endif
533cf0f6 160%patch4 -p0
d8aeff9a 161%patch5 -p1
b44549bf 162
0579f9b7
ER
163# cleanup backups after patching
164find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
165
b44549bf 166%build
df3bea74 167%{__autopoint}
21a83253
MM
168%{__aclocal} -I m4
169%{__autoconf}
170%{__automake}
63bd61a7 171cp -f config.sub trurlib
b25cb9a7 172
97ecf213 173CPPFLAGS="-std=gnu99"
1f84648f 174%configure \
b25cb9a7 175 %{?with_static:--enable-static --disable-shared} \
9fe14a3f 176 %{!?with_imode:--disable-imode} \
58c31de0
JB
177 --enable-nls \
178 %{?with_python:--with-python}
03159b71 179%{__make}
8efee472 180
b44549bf 181%install
182rm -rf $RPM_BUILD_ROOT
23749bce 183install -d $RPM_BUILD_ROOT%{_sysconfdir}
8efee472 184
c8f7d829 185%{__make} install \
186 DESTDIR=$RPM_BUILD_ROOT
de1099c4 187
58c31de0
JB
188%if %{with python}
189%{__make} -C python install \
190 DESTDIR=$RPM_BUILD_ROOT \
191 libdir=%{py_sitedir}
192%endif
193
9fe14a3f 194%{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
a49836bb 195
9639596f 196%ifarch i486 i686 ppc sparc alpha athlon
a49836bb 197%define _ftp_arch %{_target_cpu}
198%else
9639596f 199%ifarch %{x8664}
590302c4 200%define _ftp_arch x86_64
b25cb9a7
JB
201%define _ftp_alt_arch i686
202%else
9639596f
PS
203%ifarch i586
204%define _ftp_arch i486
a49836bb 205%else
206%ifarch pentium2 pentium3 pentium4
207%define _ftp_arch i686
208%else
209%ifarch sparcv9 sparc64
210%define _ftp_arch sparc
211%endif
212%endif
213%endif
214%endif
b25cb9a7 215%endif
a49836bb 216
b25cb9a7 217%{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
32697bd0 218
7adf66ff
ER
219sed -e '
220 s|%%ARCH%%|%{_ftp_arch}|g
221' < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pld-source.conf
b44549bf 222
590302c4 223%ifarch %{x8664}
7adf66ff
ER
224sed '
225 s|%%ARCH%%|%{_ftp_alt_arch}|g
226' < %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pld-multilib-source.conf
b25cb9a7
JB
227%endif
228
229install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/aliases.conf
230
9e6ff4ef 231%if %{with imode}
232# add desktop file and icon
233install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
234install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
235install %{SOURCE5} $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
236%endif
237
b25cb9a7
JB
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
62e80071 245%if %{with python}
58c31de0
JB
246%py_postclean
247rm -f $RPM_BUILD_ROOT%{py_sitedir}/_poldekmod.la
62e80071 248%endif
58c31de0 249
b25cb9a7 250%find_lang %{name}
f373d903 251
b44549bf 252%clean
253rm -rf $RPM_BUILD_ROOT
254
3896c8b1
ER
255%post -p /sbin/postshell
256-/usr/sbin/fix-info-dir -c %{_infodir}
b25cb9a7 257
3896c8b1
ER
258%postun -p /sbin/postshell
259-/usr/sbin/fix-info-dir -c %{_infodir}
b25cb9a7
JB
260
261%post libs -p /sbin/ldconfig
262%postun libs -p /sbin/ldconfig
263
b25cb9a7
JB
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";
f154dd55 272 pri = "";
b25cb9a7
JB
273
274 if (sub(",noauto", "", name)) {
275 auto = "no";
276 }
277
f154dd55
ER
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
b25cb9a7
JB
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;
f154dd55
ER
293 if (pri) {
294 print "pri = " pri;
295 }
b25cb9a7
JB
296 }
297
298 }' < /etc/poldek.conf.rpmsave >> /etc/poldek/source.conf
19cae196 299 echo "Converted old custom sources from /etc/poldek.conf.rpmsave to new poldek format in /etc/poldek/source.conf"
b25cb9a7
JB
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
767366b0 308%files -f %{name}.lang
b44549bf 309%defattr(644,root,root,755)
b25cb9a7
JB
310%doc README* NEWS TODO configs/
311%dir %{_sysconfdir}/%{name}
168acc54 312%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf
8efee472 313%attr(755,root,root) %{_bindir}/*
b25cb9a7
JB
314%dir %{_libdir}/%{name}
315%attr(755,root,root) %{_libdir}/%{name}/*
b44549bf 316%{_mandir}/man1/%{name}*
d8826405 317%lang(pl) %{_mandir}/pl/man1/%{name}*
b25cb9a7 318%{_infodir}/poldek.info*
9e6ff4ef 319%if %{with imode}
320%{_desktopdir}/%{name}.desktop
321%{_pixmapsdir}/%{name}.png
322%endif
b25cb9a7 323
f8c7c6b5 324%if !%{with static}
b25cb9a7
JB
325%files libs
326%defattr(644,root,root,755)
d8aeff9a
MB
327%attr(755,root,root) %{_libdir}/libpoclidek.so.*.*.*
328%attr(755,root,root) %{_libdir}/libpoldek.so.*.*.*
329%attr(755,root,root) %{_libdir}/libtndb.so.*.*.*
330%attr(755,root,root) %{_libdir}/libtrurl.so.*.*.*
331%attr(755,root,root) %{_libdir}/libvfile.so.*.*.*
332%attr(755,root,root) %ghost %{_libdir}/libpoclidek.so.0
333%attr(755,root,root) %ghost %{_libdir}/libpoldek.so.2
334%attr(755,root,root) %ghost %{_libdir}/libtndb.so.0
335%attr(755,root,root) %ghost %{_libdir}/libtrurl.so.0
336%attr(755,root,root) %ghost %{_libdir}/libvfile.so.0
b25cb9a7
JB
337%endif
338
339%files devel
340%defattr(644,root,root,755)
341%{!?with_static:%attr(755,root,root) %{_libdir}/lib*.so}
342%{_libdir}/lib*.la
343%{_includedir}/*
344
345%files static
346%defattr(644,root,root,755)
347%{_libdir}/lib*.a
58c31de0
JB
348
349%if %{with python}
350%files -n python-poldek
351%defattr(644,root,root,755)
352%attr(755,root,root) %{py_sitedir}/_poldekmod.so
353%{py_sitescriptdir}/poldek.py[co]
354%{py_sitescriptdir}/poldekmod.py[co]
355%endif
This page took 0.139757 seconds and 4 git commands to generate.