1 %define with_python_subpackage @WITH_PYTHON_SUBPACKAGE@%{nil}
2 %define with_python_version @WITH_PYTHON_VERSION@%{nil}
3 %define with_bzip2 @WITH_BZIP2@%{nil}
4 %define with_apidocs @WITH_APIDOCS@%{nil}
6 # XXX legacy requires './' payload prefix to be omitted from rpm packages.
7 %define _noPayloadPrefix 1
10 %{?!_lib: %define _lib lib}
11 %{expand: %%define __share %(if [ -d %{__prefix}/share/man ]; then echo /share ; else echo %%{nil} ; fi)}
13 %define __bindir %{__prefix}/bin
14 %define __includedir %{__prefix}/include
15 %define __libdir %{__prefix}/%{_lib}
16 %define __mandir %{__prefix}%{__share}/man
18 Summary: The RPM package management system.
20 %define version @VERSION@
22 %{expand: %%define rpm_version %{version}}
24 Group: System Environment/Base
25 Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
27 Conflicts: patch < 2.5
29 Prereq: fileutils shadow-utils
32 Obsoletes: rpm-perl < %{version}
34 # XXX necessary only to drag in /usr/lib/libelf.a, otherwise internal elfutils.
35 BuildRequires: elfutils-libelf
37 BuildRequires: zlib-devel
39 # XXX Red Hat 5.2 has not bzip2 or python
41 BuildRequires: bzip2 >= 0.9.0c-2
43 %if %{with_python_subpackage}
44 BuildRequires: python-devel >= %{with_python_version}
47 BuildRoot: %{_tmppath}/%{name}-root
50 The RPM Package Manager (RPM) is a powerful command line driven
51 package management system capable of installing, uninstalling,
52 verifying, querying, and updating software packages. Each software
53 package consists of an archive of files along with information about
54 the package like its version, a description, etc.
57 Summary: Development files for manipulating RPM packages.
58 Group: Development/Libraries
59 Requires: rpm = %{rpm_version}
62 This package contains the RPM C library and header files. These
63 development files will simplify the process of writing programs that
64 manipulate RPM packages and databases. These files are intended to
65 simplify the process of creating graphical package managers or any
66 other tools that need an intimate knowledge of RPM packages in order
69 This package should be installed if you want to develop programs that
70 will manipulate RPM packages and databases.
73 Summary: Scripts and executable programs used to build packages.
74 Group: Development/Tools
75 Requires: rpm = %{rpm_version}, patch >= 2.5, file
76 Provides: rpmbuild(VendorConfig) = 4.1-1
79 The rpm-build package contains the scripts and executable programs
80 that are used to build packages using the RPM Package Manager.
82 %if %{with_python_subpackage}
84 Summary: Python bindings for apps which will manipulate RPM packages.
85 Group: Development/Libraries
86 Requires: rpm = %{rpm_version}
87 Requires: python >= %{with_python_version}
88 Requires: elfutils >= 0.55
91 The rpm-python package contains a module that permits applications
92 written in the Python programming language to use the interface
93 supplied by RPM Package Manager libraries.
95 This package should be installed if you want to develop Python
96 programs that will manipulate RPM packages and databases.
100 Summary: A C library for parsing command line parameters.
101 Group: Development/Libraries
105 Popt is a C library for parsing command line parameters. Popt was
106 heavily influenced by the getopt() and getopt_long() functions, but it
107 improves on them by allowing more powerful argument expansion. Popt
108 can parse arbitrary argv[] style arrays and automatically set
109 variables based on command line arguments. Popt allows command line
110 arguments to be aliased via configuration files and includes utility
111 functions for parsing arbitrary strings into argv[] arrays using
119 # XXX rpm needs functioning nptl for configure tests
120 unset LD_ASSUME_KERNEL || :
122 %if %{with_python_subpackage}
123 WITH_PYTHON="--with-python=%{with_python_version}"
125 WITH_PYTHON="--without-python"
129 %ifarch x86_64 s390 s390x
130 CFLAGS="$RPM_OPT_FLAGS -fPIC"; export CFLAGS
132 CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
134 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix} --sysconfdir=/etc \
135 --localstatedir=/var --infodir='${prefix}%{__share}/info' \
136 --mandir='${prefix}%{__share}/man' \
137 $WITH_PYTHON --without-javaglue
139 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix} $WITH_PYTHON \
146 # XXX rpm needs functioning nptl for configure tests
147 unset LD_ASSUME_KERNEL || :
149 rm -rf $RPM_BUILD_ROOT
151 make DESTDIR="$RPM_BUILD_ROOT" install
155 # Save list of packages through cron
156 mkdir -p ${RPM_BUILD_ROOT}/etc/cron.daily
157 install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}/etc/cron.daily/rpm
159 mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d
160 install -m 644 scripts/rpm.log ${RPM_BUILD_ROOT}/etc/logrotate.d/rpm
162 mkdir -p $RPM_BUILD_ROOT/etc/rpm
164 mkdir -p $RPM_BUILD_ROOT/var/spool/repackage
165 mkdir -p $RPM_BUILD_ROOT/var/lib/rpm
167 Basenames Conflictname Dirnames Group Installtid Name Packages \
168 Providename Provideversion Requirename Requireversion Triggername \
169 Filemd5s Pubkeys Sha1header Sigmd5 \
170 __db.001 __db.002 __db.003 __db.004 __db.005 __db.006 __db.007 \
173 touch $RPM_BUILD_ROOT/var/lib/rpm/$dbi
179 gzip -9n apidocs/man/man*/* || :
182 # Get rid of unpackaged files
184 rm -rf .%{__includedir}/beecrypt
185 rm -f .%{__libdir}/libbeecrypt.{a,la,so.2.2.0}
186 rm -f .%{__prefix}/lib/rpm/{Specfile.pm,cpanflute,cpanflute2,rpmdiff,rpmdiff.cgi,sql.prov,sql.req,tcl.req}
187 rm -rf .%{__mandir}/{fr,ko}
191 rm -rf $RPM_BUILD_ROOT
195 if [ -f /var/lib/rpm/packages.rpm ]; then
197 You have (unsupported)
198 /var/lib/rpm/packages.rpm db1 format installed package headers
199 Please install rpm-4.0.4 first, and do
201 to convert your database from db1 to db3 format.
205 /usr/sbin/groupadd -g 37 @RPMGROUP@ > /dev/null 2>&1
206 /usr/sbin/useradd -r -d /var/lib/rpm -u 37 -g 37 @RPMUSER@ > /dev/null 2>&1
213 /bin/chown @RPMUSER@.@RPMGROUP@ /var/lib/rpm/[A-Z]*
221 /usr/sbin/userdel rpm
222 /usr/sbin/groupdel rpm
226 %post devel -p /sbin/ldconfig
227 %postun devel -p /sbin/ldconfig
229 %post -n popt -p /sbin/ldconfig
230 %postun -n popt -p /sbin/ldconfig
233 %if %{with_python_subpackage}
234 %post python -p /sbin/ldconfig
235 %postun python -p /sbin/ldconfig
238 %define rpmattr %attr(0755, @RPMUSER@, @RPMGROUP@)
241 %defattr(-,root,root)
242 %doc RPM-PGP-KEY RPM-GPG-KEY BETA-GPG-KEY CHANGES GROUPS doc/manual/[a-z]*
243 # XXX comment these lines out if building with rpm that knows not %pubkey attr
247 %attr(0755, @RPMUSER@, @RPMGROUP@) /bin/rpm
250 %config(noreplace,missingok) /etc/cron.daily/rpm
251 %config(noreplace,missingok) /etc/logrotate.d/rpm
253 #%config(noreplace,missingok) /etc/rpm/macros.*
254 %attr(0755, @RPMUSER@, @RPMGROUP@) %dir /var/lib/rpm
255 %attr(0755, @RPMUSER@, @RPMGROUP@) %dir /var/spool/repackage
257 %define rpmdbattr %attr(0644, @RPMUSER@, @RPMGROUP@) %verify(not md5 size mtime) %ghost %config(missingok,noreplace)
258 %rpmdbattr /var/lib/rpm/*
261 %rpmattr %{__bindir}/rpm2cpio
262 %rpmattr %{__bindir}/gendiff
263 %rpmattr %{__bindir}/rpmdb
264 #%rpmattr %{__bindir}/rpm[eiu]
265 %rpmattr %{__bindir}/rpmsign
266 %rpmattr %{__bindir}/rpmquery
267 %rpmattr %{__bindir}/rpmverify
269 %{__libdir}/librpm-@VERSION@.so
270 %{__libdir}/librpmdb-@VERSION@.so
271 %{__libdir}/librpmio-@VERSION@.so
272 %{__libdir}/librpmbuild-@VERSION@.so
274 %attr(0755, @RPMUSER@, @RPMGROUP@) %dir %{__prefix}/lib/rpm
275 %rpmattr %{__prefix}/lib/rpm/config.guess
276 %rpmattr %{__prefix}/lib/rpm/config.sub
277 %rpmattr %{__prefix}/lib/rpm/convertrpmrc.sh
278 %attr(0644, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/macros
279 %rpmattr %{__prefix}/lib/rpm/mkinstalldirs
280 %rpmattr %{__prefix}/lib/rpm/rpm.*
281 %rpmattr %{__prefix}/lib/rpm/rpm2cpio.sh
282 %rpmattr %{__prefix}/lib/rpm/rpm[deiukqv]
283 %rpmattr %{__prefix}/lib/rpm/tgpg
284 %attr(0644, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/rpmpopt*
285 %attr(0644, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/rpmrc
287 %ifarch i386 i486 i586 i686 athlon
288 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/i[3456]86*
289 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/athlon*
291 %ifarch alpha alphaev5 alphaev56 alphapca56 alphaev6 alphaev67
292 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/alpha*
294 %ifarch sparc sparcv9 sparc64
295 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/sparc*
298 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/ia64*
300 %ifarch powerpc ppc ppciseries ppcpseries ppcmac ppc64
301 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/ppc*
304 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/s390*
306 %ifarch armv3l armv4l
307 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/armv[34][lb]*
310 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/mips*
313 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/x86_64*
315 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/noarch*
317 %lang(cs) %{__prefix}/*/locale/cs/LC_MESSAGES/rpm.mo
318 %lang(da) %{__prefix}/*/locale/da/LC_MESSAGES/rpm.mo
319 %lang(de) %{__prefix}/*/locale/de/LC_MESSAGES/rpm.mo
320 %lang(fi) %{__prefix}/*/locale/fi/LC_MESSAGES/rpm.mo
321 %lang(fr) %{__prefix}/*/locale/fr/LC_MESSAGES/rpm.mo
322 %lang(gl) %{__prefix}/*/locale/gl/LC_MESSAGES/rpm.mo
323 %lang(is) %{__prefix}/*/locale/is/LC_MESSAGES/rpm.mo
324 %lang(ja) %{__prefix}/*/locale/ja/LC_MESSAGES/rpm.mo
325 %lang(ko) %{__prefix}/*/locale/ko/LC_MESSAGES/rpm.mo
326 %lang(no) %{__prefix}/*/locale/no/LC_MESSAGES/rpm.mo
327 %lang(pl) %{__prefix}/*/locale/pl/LC_MESSAGES/rpm.mo
328 %lang(pt) %{__prefix}/*/locale/pt/LC_MESSAGES/rpm.mo
329 %lang(pt_BR) %{__prefix}/*/locale/pt_BR/LC_MESSAGES/rpm.mo
330 %lang(ro) %{__prefix}/*/locale/ro/LC_MESSAGES/rpm.mo
331 %lang(ru) %{__prefix}/*/locale/ru/LC_MESSAGES/rpm.mo
332 %lang(sk) %{__prefix}/*/locale/sk/LC_MESSAGES/rpm.mo
333 %lang(sl) %{__prefix}/*/locale/sl/LC_MESSAGES/rpm.mo
334 %lang(sr) %{__prefix}/*/locale/sr/LC_MESSAGES/rpm.mo
335 %lang(sv) %{__prefix}/*/locale/sv/LC_MESSAGES/rpm.mo
336 %lang(tr) %{__prefix}/*/locale/tr/LC_MESSAGES/rpm.mo
338 %{__mandir}/man1/gendiff.1*
339 %{__mandir}/man8/rpm.8*
340 %{__mandir}/man8/rpm2cpio.8*
341 %lang(ja) %{__mandir}/ja/man[18]/*.[18]*
342 %lang(pl) %{__mandir}/pl/man[18]/*.[18]*
343 %lang(ru) %{__mandir}/ru/man[18]/*.[18]*
344 %lang(sk) %{__mandir}/sk/man[18]/*.[18]*
347 %defattr(-,root,root)
348 %dir %{__prefix}/src/@RPMCANONVENDOR@
349 %dir %{__prefix}/src/@RPMCANONVENDOR@/BUILD
350 %dir %{__prefix}/src/@RPMCANONVENDOR@/SPECS
351 %dir %{__prefix}/src/@RPMCANONVENDOR@/SOURCES
352 %dir %{__prefix}/src/@RPMCANONVENDOR@/SRPMS
353 %dir %{__prefix}/src/@RPMCANONVENDOR@/RPMS
354 %{__prefix}/src/@RPMCANONVENDOR@/RPMS/*
355 %rpmattr %{__bindir}/rpmbuild
356 %rpmattr %{__prefix}/lib/rpm/brp-*
357 %rpmattr %{__prefix}/lib/rpm/check-files
358 %rpmattr %{__prefix}/lib/rpm/check-prereqs
359 %rpmattr %{__prefix}/lib/rpm/config.site
360 %rpmattr %{__prefix}/lib/rpm/cross-build
361 %rpmattr %{__prefix}/lib/rpm/debugedit
362 %rpmattr %{__prefix}/lib/rpm/find-debuginfo.sh
363 %rpmattr %{__prefix}/lib/rpm/find-lang.sh
364 %rpmattr %{__prefix}/lib/rpm/find-prov.pl
365 %rpmattr %{__prefix}/lib/rpm/find-provides
366 %rpmattr %{__prefix}/lib/rpm/find-provides.perl
367 %rpmattr %{__prefix}/lib/rpm/find-req.pl
368 %rpmattr %{__prefix}/lib/rpm/find-requires
369 %rpmattr %{__prefix}/lib/rpm/find-requires.perl
370 %rpmattr %{__prefix}/lib/rpm/get_magic.pl
371 %rpmattr %{__prefix}/lib/rpm/getpo.sh
372 %rpmattr %{__prefix}/lib/rpm/http.req
373 %rpmattr %{__prefix}/lib/rpm/javadeps
374 %rpmattr %{__prefix}/lib/rpm/magic
375 %rpmattr %{__prefix}/lib/rpm/magic.mgc
376 %rpmattr %{__prefix}/lib/rpm/magic.mime
377 %rpmattr %{__prefix}/lib/rpm/magic.mime.mgc
378 %rpmattr %{__prefix}/lib/rpm/magic.prov
379 %rpmattr %{__prefix}/lib/rpm/magic.req
380 %rpmattr %{__prefix}/lib/rpm/perldeps.pl
381 %rpmattr %{__prefix}/lib/rpm/perl.prov
382 %rpmattr %{__prefix}/lib/rpm/perl.req
384 %rpmattr %{__prefix}/lib/rpm/rpm[bt]
385 %rpmattr %{__prefix}/lib/rpm/rpmdeps
386 %rpmattr %{__prefix}/lib/rpm/trpm
387 %rpmattr %{__prefix}/lib/rpm/u_pkg.sh
388 %rpmattr %{__prefix}/lib/rpm/vpkg-provides.sh
389 %rpmattr %{__prefix}/lib/rpm/vpkg-provides2.sh
391 %{__mandir}/man8/rpmbuild.8*
392 %{__mandir}/man8/rpmdeps.8*
394 %if %{with_python_subpackage}
396 %defattr(-,root,root)
397 %{__libdir}/python%{with_python_version}/site-packages/rpmmodule.so
398 %{__libdir}/python%{with_python_version}/site-packages/rpmdb
402 %defattr(-,root,root)
404 %doc @WITH_APIDOCS_TARGET@
408 %{__libdir}/librpm.la
409 %{__libdir}/librpm.so
410 %{__libdir}/librpmdb.a
411 %{__libdir}/librpmdb.la
412 %{__libdir}/librpmdb.so
413 %{__libdir}/librpmio.a
414 %{__libdir}/librpmio.la
415 %{__libdir}/librpmio.so
416 %{__libdir}/librpmbuild.a
417 %{__libdir}/librpmbuild.la
418 %{__libdir}/librpmbuild.so
419 %{__mandir}/man8/rpmcache.8*
420 %{__mandir}/man8/rpmgraph.8*
421 %rpmattr %{__prefix}/lib/rpm/rpmcache
422 %rpmattr %{__prefix}/lib/rpm/rpmdb_deadlock
423 %rpmattr %{__prefix}/lib/rpm/rpmdb_dump
424 %rpmattr %{__prefix}/lib/rpm/rpmdb_load
425 %rpmattr %{__prefix}/lib/rpm/rpmdb_loadcvt
426 %rpmattr %{__prefix}/lib/rpm/rpmdb_svc
427 %rpmattr %{__prefix}/lib/rpm/rpmdb_stat
428 %rpmattr %{__prefix}/lib/rpm/rpmdb_verify
429 %rpmattr %{__prefix}/lib/rpm/rpmfile
430 %rpmattr %{__bindir}/rpmgraph
433 %defattr(-,root,root)
434 %{__libdir}/libpopt.so.*
435 %{__mandir}/man3/popt.3*
436 %lang(cs) %{__prefix}/*/locale/cs/LC_MESSAGES/popt.mo
437 %lang(da) %{__prefix}/*/locale/da/LC_MESSAGES/popt.mo
438 %lang(de) %{__prefix}/*/locale/de/LC_MESSAGES/popt.mo
439 %lang(es) %{__prefix}/*/locale/es/LC_MESSAGES/popt.mo
440 %lang(eu_ES) %{__prefix}/*/locale/eu_ES/LC_MESSAGES/popt.mo
441 %lang(fi) %{__prefix}/*/locale/fi/LC_MESSAGES/popt.mo
442 %lang(fr) %{__prefix}/*/locale/fr/LC_MESSAGES/popt.mo
443 %lang(gl) %{__prefix}/*/locale/gl/LC_MESSAGES/popt.mo
444 %lang(hu) %{__prefix}/*/locale/hu/LC_MESSAGES/popt.mo
445 %lang(id) %{__prefix}/*/locale/id/LC_MESSAGES/popt.mo
446 %lang(is) %{__prefix}/*/locale/is/LC_MESSAGES/popt.mo
447 %lang(it) %{__prefix}/*/locale/it/LC_MESSAGES/popt.mo
448 %lang(ja) %{__prefix}/*/locale/ja/LC_MESSAGES/popt.mo
449 %lang(ko) %{__prefix}/*/locale/ko/LC_MESSAGES/popt.mo
450 %lang(no) %{__prefix}/*/locale/no/LC_MESSAGES/popt.mo
451 %lang(pl) %{__prefix}/*/locale/pl/LC_MESSAGES/popt.mo
452 %lang(pt) %{__prefix}/*/locale/pt/LC_MESSAGES/popt.mo
453 %lang(pt_BR) %{__prefix}/*/locale/pt_BR/LC_MESSAGES/popt.mo
454 %lang(ro) %{__prefix}/*/locale/ro/LC_MESSAGES/popt.mo
455 %lang(ru) %{__prefix}/*/locale/ru/LC_MESSAGES/popt.mo
456 %lang(sk) %{__prefix}/*/locale/sk/LC_MESSAGES/popt.mo
457 %lang(sl) %{__prefix}/*/locale/sl/LC_MESSAGES/popt.mo
458 %lang(sr) %{__prefix}/*/locale/sr/LC_MESSAGES/popt.mo
459 %lang(sv) %{__prefix}/*/locale/sv/LC_MESSAGES/popt.mo
460 %lang(tr) %{__prefix}/*/locale/tr/LC_MESSAGES/popt.mo
461 %lang(uk) %{__prefix}/*/locale/uk/LC_MESSAGES/popt.mo
462 %lang(wa) %{__prefix}/*/locale/wa/LC_MESSAGES/popt.mo
463 %lang(zh) %{__prefix}/*/locale/zh/LC_MESSAGES/popt.mo
464 %lang(zh_CN) %{__prefix}/*/locale/zh_CN.GB2312/LC_MESSAGES/popt.mo
466 # XXX These may end up in popt-devel but it hardly seems worth the effort.
467 %{__libdir}/libpopt.a
468 %{__libdir}/libpopt.la
469 %{__libdir}/libpopt.so
470 %{__includedir}/popt.h
473 * Mon Mar 10 2003 Jeff Johnson <jbj@redhat.com> 4.3-0.1
474 - upgrade to zlib-1.2.beta7.
475 - pass structure pointer, not args, through headerSprintf call chain.
476 - add ":xml" tag format modifier.
477 - --queryformat '[%%{*:xml}\n]' to dump header content in XML.
478 - fix: short option help missing string terminator.