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