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