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