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