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