]> git.pld-linux.org Git - packages/poldek.git/blame - poldek.spec
- cleanup db bconds and deps
[packages/poldek.git] / poldek.spec
CommitLineData
4117ae1a
ER
1# TODO
2# - fix config having escaped html entities:
3# # package A requires capability foo >= 1.0 while package B provides "foo"
4
de1099c4 5# Conditional build:
9fe14a3f 6%bcond_with static # don't use shared libraries
7%bcond_without imode # don't build interactive mode
58c31de0 8%bcond_without python # don't build python bindings
cf6c3a30 9%bcond_with snap # install configs for official Th snapshot
fc61ee66 10%bcond_with rpm4 # use rpm4 instead of rpm5
7000d724 11
e1015166 12# current snapshot name
0b18083b 13%define SNAP 2019
a584c5c5 14
373c6f03 15# required versions (forced to avoid SEGV with mixed db used by rpm and poldek)
fc61ee66
JR
16%if %{with rpm4}
17%define db_pkg db
18%define ver_db 5.3
19%define ver_db_rel 3
20%define ver_rpm 1:4.14
21%define ver_db_devel %(rpm -q --qf '%|E?{%{E}:}|%{V}-%{R}' --what-provides db-devel)
6e185c37 22%else
ff4e68af 23%define db_pkg db5.2
376a705c 24%define ver_db 5.2
19e679c6 25%define ver_db_rel 3
a17726b5 26%define ver_rpm 5.4.10
5fda028a 27%endif
7000d724 28
2ac70476 29%define rel 2
b44549bf 30Summary: RPM packages management helper tool
9c03ea8f 31Summary(hu.UTF-8): RPM csomagkezelést segítő eszköz
9faf625a 32Summary(pl.UTF-8): Pomocnicze narzędzie do zarządzania pakietami RPM
b44549bf 33Name: poldek
d7961a02 34Version: 0.40.0
9c1c2b52 35Release: %{rel}%{?with_snap:.%{SNAP}}
9f931ada 36License: GPL v2
8efee472 37Group: Applications/System
85398bac 38#Source0: http://poldek.pld-linux.org/download/snapshots/%{name}-%{version}-cvs%{snap}.tar.bz2
d7961a02 39Source0: https://launchpad.net/poldek/master/head/+download/%{name}-%{version}.tar.xz
40# Source0-md5: c88f3ada99799d0e1af78aeda428d041
911a8560 41Source1: %{name}.conf
b25cb9a7 42Source2: %{name}-multilib.conf
d9c7cedf 43Source3: %{name}-config.sh
2ccd5d66 44Source5: %{name}-aliases.conf
45Source6: %{name}.desktop
46Source7: %{name}.png
a97b47d4 47# Source7-md5: ee487abede50874e9eceb6495d5ee150
171e07f6 48Source8: %{name}-debuginfo.conf
652b5bc5 49Source9: %{name}-aidath.conf
50Source10: %{name}-multilib-aidath.conf
8db66c11 51Source11: %{name}-archive.conf
a584c5c5
JR
52Source100: %{name}-snap.conf
53Source101: %{name}-multilib-snap.conf
54Source102: %{name}-debuginfo-snap.conf
d7961a02 55Patch0: %{name}-config.patch
56Patch1: pm-hooks.patch
57Patch2: poldek-ext-down-enable.patch
58Patch3: multiple-options.patch
fc61ee66 59Patch4: rpm.org-system-db.patch
39ca2371 60URL: http://poldek.pld-linux.org/
340a1e21 61BuildRequires: %{db_pkg}-devel >= %{ver_db}-%{ver_db_rel}
a4268952 62BuildRequires: autoconf
4d0dcbcf 63BuildRequires: automake >= 1:1.11
373c6f03 64BuildRequires: bzip2-devel
065b86e0 65BuildRequires: check-devel
1d67e563 66BuildRequires: docbook-dtd412-xml
22329ccf 67BuildRequires: gettext-tools
0021c1c7 68BuildRequires: libgomp-devel
b25cb9a7
JB
69BuildRequires: libtool
70BuildRequires: libxml2-devel
cbc6f56b 71BuildRequires: openssl-devel >= 0.9.7d
13fd950e 72BuildRequires: pcre-devel
b3ea4b51 73BuildRequires: pkgconfig
13fd950e 74BuildRequires: popt-devel
58c31de0 75%{?with_python:BuildRequires: python-devel}
b25cb9a7 76BuildRequires: readline-devel >= 5.0
373c6f03 77BuildRequires: rpm-devel >= %{ver_rpm}
300927eb 78%{?with_python:BuildRequires: rpm-pythonprov}
340a1e21 79BuildRequires: tar >= 1:1.22
77cfda6e 80BuildRequires: xmlto
340a1e21 81BuildRequires: xz
96475e5e 82BuildRequires: zlib-devel
d7961a02 83BuildRequires: zstd-devel
373c6f03 84%if %{with static}
ff4e68af 85BuildRequires: %{db_pkg}-static >= %{ver_db}-%{ver_db_rel}
340a1e21 86BuildRequires: bzip2-static
2fac0b02 87BuildRequires: glibc-static
b25cb9a7 88BuildRequires: libxml2-static
373c6f03
JB
89BuildRequires: ncurses-static
90BuildRequires: openssl-static
91BuildRequires: pcre-static
92BuildRequires: popt-static
93BuildRequires: readline-static
94BuildRequires: rpm-static
95BuildRequires: zlib-static
d7961a02 96BuildRequires: zstd-static
373c6f03 97%endif
b25cb9a7 98Requires(triggerpostun): awk
168acc54 99Requires(triggerpostun): sed >= 4.0
fc61ee66
JR
100%if %{with rpm4}
101Requires: %{db_pkg} >= %{ver_db_devel}
102%else
ff4e68af 103Requires: %{db_pkg} >= %{ver_db}-%{ver_db_rel}
fc61ee66
JR
104Requires: rpm-db-ver = %{ver_db}
105%endif
340a1e21 106Requires: %{name}-libs = %{version}-%{release}
67e6053c 107Requires: /bin/run-parts
373c6f03 108Requires: rpm >= %{ver_rpm}
5fda028a 109Requires: rpm-lib >= %{ver_rpm}
e202a52a 110Requires: sed
c5d1808a 111Conflicts: etckeeper < 1.18-2
b44549bf 112BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
113
dcdcebb7
ER
114%define _libexecdir %{_prefix}/lib/%{name}
115
b44549bf 116%description
0fa0dc36 117poldek is an RPM package management tool which allows you to easily
118perform package verification, installation (including system
13fd950e 119installation from scratch), upgrading, and removal.
0fa0dc36 120
13fd950e
JB
121Program can be used in batch (like apt-get from Debian's APT) or
122interactive mode. The interactive mode puts you into a readline
123interface with command line autocompletion and history, similar to the
124shell mode of Perl's CPAN.
8efee472 125
9fe14a3f 126%{?with_static:This version is statically linked.}
d94b28a6 127
9fe14a3f 128%{!?with_imode:This version hasn't got interactive mode.}
7f07e487 129#'vim
1f84648f 130
9c03ea8f
ZU
131%description -l hu.UTF-8
132poldek egy RPM csomagkezelő eszköz, amely megkönnyíti a
133csomagellenőrzést, telepítést (beleértve a rendszertelepítést a
134nulláról), frissítést és eltávolítást.
135
136A program használható parancssorból (mint a Debian apt-get programja)
137vagy interaktív módban. Az interaktív mód egy readline környezetet
138jelent, parancskiegészítéssel és előzményekkel, hasonlóan a Perl CPAN
139shell módjához.
140
141%{?with_static:Ez a verzió statikusan linkelt.}
142
143%{!?with_imode:Ennek a verziónak nincs interaktív módja.}
144
caed9b36
JR
145%description -l pl.UTF-8
146poldek jest narzędziem linii poleceń służącym do weryfikacji,
147instalacji (włączając instalację systemu od zera), aktualizacji i
148usuwania pakietów.
56e1ab51 149
caed9b36 150Program może być używany w trybie wsadowym (jak debianowy apt-get) lub
d82a9cb2 151interaktywnym. Tryb interaktywny posiada interfejs readline z
caed9b36
JR
152dopełnianiem komend i historią, podobny do trybu shell perlowego
153modułu CPAN.
8efee472 154
9fe14a3f 155%{?with_static:Ta wersja jest konsolidowana statycznie.}
a611e0bc 156
9fe14a3f 157%{!?with_imode:Ta wersja nie posiada trybu interaktywnego.}
b44549bf 158
b25cb9a7 159%package libs
168acc54 160Summary: poldek libraries
9c03ea8f 161Summary(hu.UTF-8): A poldek könyvtárai
9faf625a 162Summary(pl.UTF-8): Biblioteki poldka
168acc54 163Group: Libraries
b25cb9a7
JB
164
165%description libs
166poldek libraries.
167
9c03ea8f
ZU
168%description libs -l hu.UTF-8
169A poldek könyvtárai.
170
caed9b36 171%description libs -l pl.UTF-8
b25cb9a7
JB
172Biblioteki poldka.
173
174%package devel
168acc54 175Summary: Header files for poldek libraries
9c03ea8f 176Summary(hu.UTF-8): A poldek könyvtár fejlesztői fájljai
9faf625a 177Summary(pl.UTF-8): Pliki nagłówkowe bibliotek poldka
168acc54 178Group: Development/Libraries
09d4c571 179Requires: %{name}-libs = %{version}-%{release}
b980560b 180Requires: rpm-devel >= %{ver_rpm}
b25cb9a7
JB
181
182%description devel
183Header files for poldek libraries.
184
9c03ea8f
ZU
185%description devel -l hu.UTF-8
186A poldek könyvtár fejlesztői fájljai.
187
caed9b36
JR
188%description devel -l pl.UTF-8
189Pliki nagłówkowe bibliotek poldka.
b25cb9a7
JB
190
191%package static
168acc54 192Summary: poldek static libraries
9c03ea8f 193Summary(hu.UTF-8): poldek statikus könyvtárak
9faf625a 194Summary(pl.UTF-8): Biblioteki statyczne poldka
168acc54 195Group: Development/Libraries
09d4c571 196Requires: %{name}-devel = %{version}-%{release}
b25cb9a7
JB
197
198%description static
199poldek static libraries.
200
9c03ea8f
ZU
201%description static -l hu.UTF-8
202poldek statikus könyvtárak.
203
caed9b36 204%description static -l pl.UTF-8
b25cb9a7
JB
205Biblioteki statyczne poldka.
206
58c31de0
JB
207%package -n python-poldek
208Summary: Python modules for poldek
9c03ea8f 209Summary(hu.UTF-8): Python modulok poldek-hez
9faf625a 210Summary(pl.UTF-8): Moduły języka Python dla poldka
58c31de0
JB
211Group: Libraries/Python
212Requires: %{name}-libs = %{version}-%{release}
340a1e21 213Requires: python-libs
58c31de0
JB
214
215%description -n python-poldek
216Python modules for poldek.
217
9c03ea8f
ZU
218%description -n python-poldek -l hu.UTF-8
219Python modulok poldek-hez.
220
caed9b36
JR
221%description -n python-poldek -l pl.UTF-8
222Moduły języka Python dla poldka.
58c31de0 223
03159b71 224%prep
a9c9446a 225%setup -q
85398bac 226%patch0 -p1
13aa6434 227%patch1 -p1
1cf9975a 228%patch2 -p1
b9e98057 229%patch3 -p1
fc61ee66 230%patch4 -p1
8dcb75fc 231
5e2c5cc3 232%{__rm} m4/libtool.m4 m4/lt*.m4
b44549bf 233
0579f9b7
ER
234# cleanup backups after patching
235find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
4fa2b79c 236chmod u+x ./configure ./doc/conf-xml2.sh
0579f9b7 237
b44549bf 238%build
5c81138a 239%{__gettextize}
bef9d2a3 240%{__libtoolize}
21a83253 241%{__aclocal} -I m4
d878a63c 242%{__autoheader}
21a83253
MM
243%{__autoconf}
244%{__automake}
f8e81a61 245cd tndb
313cd172 246%{__libtoolize}
5e2c5cc3
JB
247%{__aclocal}
248%{__autoheader}
249%{__autoconf}
250%{__automake}
f8e81a61 251cd ../trurlib
313cd172 252%{__libtoolize}
5e2c5cc3
JB
253%{__aclocal}
254%{__autoheader}
255%{__autoconf}
256%{__automake}
f8e81a61 257cd ..
b25cb9a7 258
62cdc799 259CPPFLAGS="%{rpmcppflags} -std=gnu99 -fgnu89-inline -D_GNU_SOURCE=1"
1f84648f 260%configure \
b25cb9a7 261 %{?with_static:--enable-static --disable-shared} \
9fe14a3f 262 %{!?with_imode:--disable-imode} \
dcdcebb7 263 --with-pkglibdir=%{_libexecdir} \
58c31de0
JB
264 --enable-nls \
265 %{?with_python:--with-python}
9fb594dc 266%{__make} -j1
a1f22296 267# --enable-trace
8efee472 268
9b77d5f3
JR
269%if %{with python}
270%{__make} -C python
271%endif
272
b44549bf 273%install
274rm -rf $RPM_BUILD_ROOT
c5d1808a 275install -d $RPM_BUILD_ROOT/var/cache/%{name}
8efee472 276
9fb594dc 277%{__make} install -j1 \
c8f7d829 278 DESTDIR=$RPM_BUILD_ROOT
de1099c4 279
d9c7cedf
ER
280install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/poldek-config
281
58c31de0 282%if %{with python}
9fb594dc 283%{__make} -C python -j1 install \
58c31de0 284 DESTDIR=$RPM_BUILD_ROOT \
9b77d5f3 285 py_sitedir=%{py_sitedir}
58c31de0
JB
286%endif
287
5e2c5cc3 288%{?with_static:%{__rm} $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
a49836bb 289
9639596f 290%ifarch i486 i686 ppc sparc alpha athlon
bd621c72 291 %define ftp_arch %{_target_cpu}
36004ea3 292%endif
9639596f 293%ifarch %{x8664}
bd621c72
ER
294 %define ftp_arch x86_64
295 %define ftp_alt_arch i686
296 %define ftp_alt2_arch x32
fabc4b40
JR
297%endif
298%ifarch x32
bd621c72
ER
299 %define ftp_arch x32
300 %define ftp_alt_arch x86_64
301 %define ftp_alt2_arch i686
36004ea3 302%endif
9639596f 303%ifarch i586
bd621c72 304 %define ftp_arch i486
58820d9b 305%endif
a49836bb 306%ifarch pentium2 pentium3 pentium4
bd621c72 307 %define ftp_arch i686
36004ea3 308%endif
a49836bb 309%ifarch sparcv9 sparc64
bd621c72
ER
310 %define ftp_arch sparc
311 %define ftp_arch %{_target_cpu}
b614e8f7 312 %ifarch sparc64
bd621c72 313 %define ftp_alt_arch sparcv9
23ead09a 314 %endif
652b5bc5 315%endif
32697bd0 316
b614e8f7
JR
317%define pld_conf %{SOURCE1}
318%define pld_debuginfo_conf %{SOURCE8}
319%define pld_archive_conf %{SOURCE11}
7c0e4fc5 320
fabc4b40 321%ifarch %{x8664} x32
b614e8f7 322 %define pld_multilib_conf %{SOURCE2}
fabc4b40 323 %define pld_multilib2_conf %{SOURCE2}
b614e8f7 324%endif
7c0e4fc5 325
b614e8f7
JR
326# aidath
327%ifarch sparcv9 sparc64
328 %define pld_conf %{SOURCE9}
329 %undefine pld_archive_conf
330%endif
331%ifarch sparc64
332 %define pld_multilib_conf %{SOURCE10}
7c0e4fc5 333%endif
23ead09a 334
bd621c72 335%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' < %{pld_conf} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld.conf
23ead09a 336
7c0e4fc5 337%if 0%{?pld_multilib_conf:1}
bd621c72 338 %{__sed} 's|%%ARCH%%|%{ftp_alt_arch}|g' < %{pld_multilib_conf} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{ftp_alt_arch}.conf
7c0e4fc5
ER
339%endif
340
fabc4b40 341%if 0%{?pld_multilib2_conf:1}
bd621c72 342 %{__sed} 's|%%ARCH%%|%{ftp_alt2_arch}|g' < %{pld_multilib_conf} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{ftp_alt2_arch}.conf
fabc4b40
JR
343%endif
344
7c0e4fc5 345%if 0%{?pld_debuginfo_conf:1}
bd621c72 346%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' < %{pld_debuginfo_conf} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-debuginfo.conf
652b5bc5 347%endif
b25cb9a7 348
8db66c11 349%if 0%{?pld_archive_conf:1}
bd621c72 350%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' < %{pld_archive_conf} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-archive.conf
8db66c11
ER
351%endif
352
7e5296f4 353# Always install snapshot configs
bd621c72 354%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' \
a584c5c5 355 -e 's|%%SNAP%%|%{SNAP}|g' < %{SOURCE100} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}.conf
bd621c72 356%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' \
a584c5c5 357 -e 's|%%SNAP%%|%{SNAP}|g' < %{SOURCE102} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-debuginfo.conf
fabc4b40 358%ifarch %{x8664} x32
bd621c72
ER
359 %{__sed} -e 's|%%ARCH%%|%{ftp_alt_arch}|g' \
360 -e 's|%%SNAP%%|%{SNAP}|g' < %{SOURCE101} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-%{ftp_alt_arch}.conf
361 %{__sed} -e 's|%%ARCH%%|%{ftp_alt2_arch}|g' \
362 -e 's|%%SNAP%%|%{SNAP}|g' < %{SOURCE101} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-%{ftp_alt2_arch}.conf
a584c5c5 363%endif
7e5296f4
JR
364
365%if %{with snap}
c88cf671 366%{__sed} -i -e 's|@@SNAP@@||g' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld.conf
7e5296f4 367%{__sed} -i '/@@SNAP@@.*/d' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}.conf
a584c5c5 368%else
7e5296f4 369%{__sed} -i -e 's|@@SNAP@@||g' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}.conf
c88cf671 370%{__sed} -i '/@@SNAP@@.*/d' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld.conf
a584c5c5
JR
371%endif
372
600f8dbc
ER
373# create "all" meta repo
374%if 0%{?ftp_alt_arch:1}%{?ftp_alt2_arch:1}
375cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-all.conf
376# group source for referring th+th-multiarch sources together, i.e poldek -n th-all
377[source]
378type = group
379name = th-all
380sources = th %{?ftp_alt_arch:th-%{ftp_alt_arch}} %{?ftp_alt2_arch:th-%{ftp_alt2_arch}}
381EOF
382%endif
383
8dbabc51 384# th-2014 snap does not exist for x32 yet
bd621c72 385%if "%{ftp_arch}" == "x32"
255ca68a
ER
386rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}.conf
387%endif
bd621c72 388%if "%{ftp_alt2_arch}" == "x32"
255ca68a
ER
389rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-x32.conf
390%endif
8dbabc51 391
27edf30a 392cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cli.conf
b25cb9a7 393
9e6ff4ef 394%if %{with imode}
395# add desktop file and icon
396install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
27edf30a
ER
397cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
398cp -p %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
9e6ff4ef 399%endif
400
b43abde7 401# sources we don't package
5e2c5cc3 402%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{rh,fedora,centos}-source.conf
b25cb9a7 403# include them in %doc
c88cf671 404%{__rm} -rf configs
b25cb9a7 405cp -a conf configs
c88cf671 406%{__rm} -f configs/Makefile*
b25cb9a7 407
62e80071 408%if %{with python}
58c31de0 409%py_postclean
9b77d5f3 410%{__rm} $RPM_BUILD_ROOT%{_libdir}/_poldekmod.{la,so}
62e80071 411%endif
58c31de0 412
b25cb9a7 413%find_lang %{name}
f373d903 414
b44549bf 415%clean
416rm -rf $RPM_BUILD_ROOT
417
daf0e7ce
ER
418%post
419[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
420if [ "$1" = "1" ]; then
421 # remove ignore = vserver-packages inside vserver on first install
422 {
423 while read f ctx; do
424 [ "$f" = "VxID:" -o "$f" = "s_context:" ] && break
425 done </proc/self/status
426 } 2>/dev/null
427 if [ -z "$ctx" -o "$ctx" = "0" ]; then
428 VSERVER=no
429 else
430 VSERVER=yes
431 fi
432 if [ "$VSERVER" = "yes" ]; then
433 %{__sed} -i -e '/^ignore/s/vserver-packages//' %{_sysconfdir}/%{name}/poldek.conf
434 fi
435fi
b25cb9a7 436
3896c8b1
ER
437%postun -p /sbin/postshell
438-/usr/sbin/fix-info-dir -c %{_infodir}
b25cb9a7
JB
439
440%post libs -p /sbin/ldconfig
441%postun libs -p /sbin/ldconfig
442
b43abde7
ER
443%triggerpostun -- poldek < 0.30-0.20080225.00.1
444if ! grep -q '^%%includedir repos.d' %{_sysconfdir}/%{name}/poldek.conf; then
445 %{__sed} -i -e '/^%%include source.conf/{
446 a
447 a# /etc/poldek/repos.d/*.conf
448 a%%includedir repos.d
449 }' %{_sysconfdir}/%{name}/poldek.conf
450fi
451
452%{__sed} -i -e '/%%include %%{_distro}-source.conf/d' %{_sysconfdir}/%{name}/poldek.conf
453%{__sed} -i -e '/%%include %%{_distro}-multilib-source.conf/d' %{_sysconfdir}/%{name}/poldek.conf
454
455if [ -f %{_sysconfdir}/%{name}/pld-source.conf.rpmsave ]; then
505460c5
JR
456 %{__mv} -f %{_sysconfdir}/%{name}/repos.d/pld.conf{,.rpmnew}
457 %{__mv} -v %{_sysconfdir}/%{name}/pld-source.conf.rpmsave %{_sysconfdir}/%{name}/repos.d/pld.conf
b43abde7
ER
458fi
459
460%ifarch %{x8664}
461if [ -f %{_sysconfdir}/%{name}/pld-multilib-source.conf.rpmsave ]; then
505460c5
JR
462 %{__mv} -f %{_sysconfdir}/%{name}/repos.d/pld-multilib.conf{,.rpmnew}
463 %{__mv} -v %{_sysconfdir}/%{name}/pld-multilib-source.conf.rpmsave %{_sysconfdir}/%{name}/repos.d/pld-multilib.conf
b43abde7
ER
464fi
465%endif
466
1bacc3e0
JR
467%triggerpostun -- poldek < 0.30.1-3
468if [ -f %{_sysconfdir}/%{name}/repos.d/pld-multilib.conf.rpmsave ]; then
bd621c72
ER
469 %{__mv} -f %{_sysconfdir}/%{name}/repos.d/pld-%{ftp_alt_arch}.conf{,.rpmnew}
470 %{__mv} -v %{_sysconfdir}/%{name}/repos.d/pld-multilib.conf.rpmsave %{_sysconfdir}/%{name}/repos.d/pld-%{ftp_alt_arch}.conf
1bacc3e0
JR
471fi
472if [ -f %{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-multilib.conf.rpmsave ]; then
bd621c72
ER
473 %{__mv} -f %{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-%{ftp_alt_arch}.conf{,.rpmnew}
474 %{__mv} -v %{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-multilib.conf.rpmsave %{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-%{ftp_alt_arch}.conf
1bacc3e0
JR
475fi
476
c5d1808a
ER
477%triggerpostun -- %{name} < 0.30.1-8
478if [ $1 -le 1 ]; then
479 # revert change on --downgrade
1e921240 480 %{__sed} -i -re 's,^pm command = %{_libexecdir}/pm-command.sh,#&,' %{_sysconfdir}/%{name}/%{name}.conf
c5d1808a
ER
481else
482 # setup pm command
1e921240 483 %{__sed} -i -re 's,#?(pm command =).*,\1 %{_libexecdir}/pm-command.sh,' %{_sysconfdir}/%{name}/%{name}.conf
c5d1808a
ER
484fi
485
767366b0 486%files -f %{name}.lang
b44549bf 487%defattr(644,root,root,755)
a9c9446a 488%doc ChangeLog README* NEWS TODO configs
b25cb9a7 489%dir %{_sysconfdir}/%{name}
c5d1808a
ER
490%dir %{_sysconfdir}/%{name}/pre-install.d
491%{_sysconfdir}/%{name}/pre-install.d/README
492%dir %{_sysconfdir}/%{name}/post-install.d
493%{_sysconfdir}/%{name}/post-install.d/README
08335479 494%dir %{_sysconfdir}/%{name}/repos.d
168acc54 495%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf
b43abde7 496%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/repos.d/*.conf
5e2c5cc3
JB
497%attr(755,root,root) %{_bindir}/ipoldek
498%attr(755,root,root) %{_bindir}/poldek
d9c7cedf 499%attr(755,root,root) %{_bindir}/poldek-config
5e2c5cc3 500%attr(755,root,root) %{_bindir}/rpmvercmp
dcdcebb7 501%dir %{_libexecdir}
c5d1808a 502%attr(755,root,root) %{_libexecdir}/pm-command.sh
36b5e8a1
ER
503%attr(755,root,root) %{_libexecdir}/poldekuser-setup.sh
504%attr(755,root,root) %{_libexecdir}/vfcompr
505%attr(755,root,root) %{_libexecdir}/vfjuggle
506%attr(755,root,root) %{_libexecdir}/vfsmb
507%attr(755,root,root) %{_libexecdir}/zlib-in-rpm.sh
5e2c5cc3 508%{_mandir}/man1/%{name}*.1*
d8826405 509%lang(pl) %{_mandir}/pl/man1/%{name}*
b25cb9a7 510%{_infodir}/poldek.info*
9e6ff4ef 511%if %{with imode}
512%{_desktopdir}/%{name}.desktop
513%{_pixmapsdir}/%{name}.png
514%endif
27edf30a 515%dir /var/cache/%{name}
b25cb9a7 516
b43abde7 517%if %{without static}
b25cb9a7
JB
518%files libs
519%defattr(644,root,root,755)
d8aeff9a
MB
520%attr(755,root,root) %{_libdir}/libpoclidek.so.*.*.*
521%attr(755,root,root) %{_libdir}/libpoldek.so.*.*.*
522%attr(755,root,root) %{_libdir}/libtndb.so.*.*.*
523%attr(755,root,root) %{_libdir}/libtrurl.so.*.*.*
524%attr(755,root,root) %{_libdir}/libvfile.so.*.*.*
525%attr(755,root,root) %ghost %{_libdir}/libpoclidek.so.0
526%attr(755,root,root) %ghost %{_libdir}/libpoldek.so.2
527%attr(755,root,root) %ghost %{_libdir}/libtndb.so.0
528%attr(755,root,root) %ghost %{_libdir}/libtrurl.so.0
529%attr(755,root,root) %ghost %{_libdir}/libvfile.so.0
b25cb9a7
JB
530%endif
531
532%files devel
533%defattr(644,root,root,755)
5e2c5cc3
JB
534%if %{without static}
535%attr(755,root,root) %{_libdir}/libpoclidek.so
536%attr(755,root,root) %{_libdir}/libpoldek.so
537%attr(755,root,root) %{_libdir}/libtndb.so
538%attr(755,root,root) %{_libdir}/libtrurl.so
539%attr(755,root,root) %{_libdir}/libvfile.so
540%endif
541%{_libdir}/libpoclidek.la
542%{_libdir}/libpoldek.la
543%{_libdir}/libtndb.la
544%{_libdir}/libtrurl.la
545%{_libdir}/libvfile.la
546%{_includedir}/poldek
547%{_includedir}/tndb
548%{_includedir}/trurl
549%{_includedir}/vfile
550%{_pkgconfigdir}/tndb.pc
c9a1a81d 551%{_pkgconfigdir}/trurlib.pc
b25cb9a7
JB
552
553%files static
554%defattr(644,root,root,755)
5e2c5cc3
JB
555%{_libdir}/libtndb.a
556%{_libdir}/libtrurl.a
58c31de0
JB
557
558%if %{with python}
559%files -n python-poldek
560%defattr(644,root,root,755)
561%attr(755,root,root) %{py_sitedir}/_poldekmod.so
562%{py_sitescriptdir}/poldek.py[co]
563%{py_sitescriptdir}/poldekmod.py[co]
564%endif
This page took 0.169106 seconds and 4 git commands to generate.