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