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