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