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