1 %define with_python_subpackage 1 %{nil}
2 %define with_perl_subpackage 1
3 %define with_bzip2 1 %{nil}
4 %define with_apidocs 1 %{nil}
5 %define with_internal_db 1 %{nil}
6 %define strip_binaries 1
8 # XXX enable at your own risk, CDB access to rpmdb isn't cooked yet.
9 %define enable_cdb create cdb
11 # XXX legacy requires './' payload prefix to be omitted from rpm packages.
12 %define _noPayloadPrefix 1
15 %{expand: %%define __share %(if [ -d %{__prefix}/share/man ]; then echo /share ; else echo %%{nil} ; fi)}
17 Summary: The Red Hat package management system.
21 %{expand: %%define rpm_version %{version}}
23 Group: System Environment/Base
24 Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
26 Conflicts: patch < 2.5
28 Prereq: gawk fileutils textutils mktemp
29 Requires: popt = 1.6.3
32 %if !%{with_internal_db}
33 BuildRequires: db3-devel
35 # XXX glibc-2.1.92 has incompatible locale changes that affect statically
36 # XXX linked binaries like /bin/rpm.
38 Requires: glibc >= 2.1.92
42 BuildRequires: zlib-devel
43 # XXX Red Hat 5.2 has not bzip2 or python
45 BuildRequires: bzip2 >= 0.9.0c-2
47 %if %{with_python_subpackage}
48 BuildRequires: python-devel >= 1.5.2
50 %if %{with_perl_subpackage}
51 BuildRequires: perl >= 0:5.00503
54 BuildRoot: %{_tmppath}/%{name}-root
57 The RPM Package Manager (RPM) is a powerful command line driven
58 package management system capable of installing, uninstalling,
59 verifying, querying, and updating software packages. Each software
60 package consists of an archive of files along with information about
61 the package like its version, a description, etc.
64 Summary: Development files for applications which will manipulate RPM packages.
65 Group: Development/Libraries
66 Requires: rpm = %{rpm_version}, popt = 1.6.3
69 This package contains the RPM C library and header files. These
70 development files will simplify the process of writing programs which
71 manipulate RPM packages and databases. These files are intended to
72 simplify the process of creating graphical package managers or any
73 other tools that need an intimate knowledge of RPM packages in order
76 This package should be installed if you want to develop programs that
77 will manipulate RPM packages and databases.
80 Summary: Scripts and executable programs used to build packages.
81 Group: Development/Tools
82 Requires: rpm = %{rpm_version}
85 This package contains scripts and executable programs that are used to
86 build packages using RPM.
88 %if %{with_python_subpackage}
90 Summary: Python bindings for apps which will manipulate RPM packages.
91 Group: Development/Libraries
92 Requires: rpm = %{rpm_version}
93 Requires: python >= 1.5.2
94 Requires: popt = 1.6.3
97 The rpm-python package contains a module which permits applications
98 written in the Python programming language to use the interface
99 supplied by RPM (RPM Package Manager) libraries.
101 This package should be installed if you want to develop Python
102 programs that will manipulate RPM packages and databases.
105 %if %{with_perl_subpackage}
107 Summary: Native bindings to the RPM API for Perl.
108 Group: Development/Languages
109 URL: http://www.cpan.org
110 Requires: rpm = %{rpm_version}
111 Requires: perl >= 0:5.00503
112 Requires: popt = 1.6.3
113 Obsoletes: perl-Perl-RPM
116 The Perl-RPM module is an attempt to provide Perl-level access to the
117 complete application programming interface that is a part of the Red
118 Hat Package Manager (RPM). Rather than have scripts rely on executing
119 RPM commands and parse the resulting output, this module aims to give
120 Perl programmers the ability to do anything that would otherwise have
121 been done in C or C++.
123 The interface is being designed and laid out as a collection of
124 classes, at least some of which are also available as tied-hash
127 At this time, the interface only provides access to the database of
128 installed packages, and header data retrieval for RPM and SRPM files
129 is not yet installed. Error management and the export of most defined
130 constants, through RPM::Error and RPM::Constants, respectively, are
136 Summary: A C library for parsing command line parameters.
137 Group: Development/Libraries
141 Popt is a C library for parsing command line parameters. Popt was
142 heavily influenced by the getopt() and getopt_long() functions, but it
143 improves on them by allowing more powerful argument expansion. Popt
144 can parse arbitrary argv[] style arrays and automatically set
145 variables based on command line arguments. Popt allows command line
146 arguments to be aliased via configuration files and includes utility
147 functions for parsing arbitrary strings into argv[] arrays using
150 Install popt if you're a C programmer and you'd like to use its
159 # XXX work around a (possible) compiler problem on ia64
165 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix} --sysconfdir=/etc --localstatedir=/var --infodir='${prefix}%{__share}/info' --mandir='${prefix}%{__share}/man'
167 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix}
172 %if %{with_perl_subpackage}
174 CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL
175 export SUBDIR="%{_builddir}/%{buildsubdir}"
176 make INC="-I. -I$SUBDIR/lib -I$SUBDIR/rpmio -I$SUBDIR/popt" %{?_smp_mflags}
181 rm -rf $RPM_BUILD_ROOT
183 make DESTDIR="$RPM_BUILD_ROOT" install
187 # Save list of packages through cron
188 mkdir -p ${RPM_BUILD_ROOT}/etc/cron.daily
189 install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}/etc/cron.daily/rpm
191 mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d
192 install -m 755 scripts/rpm.log ${RPM_BUILD_ROOT}/etc/logrotate.d/rpm
194 mkdir -p $RPM_BUILD_ROOT/etc/rpm
195 cat << E_O_F > $RPM_BUILD_ROOT/etc/rpm/macros.db1
198 cat << E_O_F > $RPM_BUILD_ROOT/etc/rpm/macros.cdb
199 %{?enable_cdb:#%%__dbi_cdb %{enable_cdb}}
202 mkdir -p $RPM_BUILD_ROOT/var/lib/rpm
204 Basenames Conflictname Dirnames Group Installtid Name Providename \
205 Provideversion Removetid Requirename Requireversion Triggername \
206 Packages __db.001 __db.002 __db.003 __db.004 __db.005 __db.006 __db.007 \
209 touch $RPM_BUILD_ROOT/var/lib/rpm/$dbi
215 gzip -9n apidocs/man/man*/* || :
218 %if %{with_perl_subpackage}
220 eval `perl '-V:installsitearch'`
221 eval `perl '-V:installarchlib'`
222 mkdir -p $RPM_BUILD_ROOT/$installarchlib
223 make PREFIX=$RPM_BUILD_ROOT/usr install
224 rm -f $RPM_BUILD_ROOT/$installarchlib/perllocal.pod
225 rm -f $RPM_BUILD_ROOT/$installsitearch/auto/RPM/.packlist
230 %if %{strip_binaries}
233 %{__strip} .%{__prefix}/bin/rpm2cpio
238 rm -rf $RPM_BUILD_ROOT
242 if [ -f /var/lib/rpm/Packages -a -f /var/lib/rpm/packages.rpm ]; then
245 /var/lib/rpm/packages.rpm db1 format installed package headers
246 /var/lib/rpm/Packages db3 format installed package headers
247 Please remove (or at least rename) one of those files, and re-install.
251 /usr/sbin/groupadd -g 37 rpm > /dev/null 2>&1
252 /usr/sbin/useradd -r -d /var/lib/rpm -u 37 -g 37 rpm > /dev/null 2>&1
259 if [ -f /var/lib/rpm/packages.rpm ]; then
260 /bin/chown rpm.rpm /var/lib/rpm/*.rpm
261 elif [ -f /var/lib/rpm/Packages ]; then
262 # undo db1 configuration
263 rm -f /etc/rpm/macros.db1
264 /bin/chown rpm.rpm /var/lib/rpm/[A-Z]*
266 # initialize db3 database
267 rm -f /etc/rpm/macros.db1
277 /usr/sbin/userdel rpm
278 /usr/sbin/groupdel rpm
282 %post devel -p /sbin/ldconfig
283 %postun devel -p /sbin/ldconfig
285 %post -n popt -p /sbin/ldconfig
286 %postun -n popt -p /sbin/ldconfig
289 %if %{with_python_subpackage}
290 %post python -p /sbin/ldconfig
291 %postun python -p /sbin/ldconfig
294 %define rpmattr %attr(0755, rpm, rpm)
297 %defattr(-,root,root)
298 %doc RPM-PGP-KEY RPM-GPG-KEY CHANGES GROUPS doc/manual/[a-z]*
299 %attr(0755, rpm, rpm) /bin/rpm
302 %config(noreplace,missingok) /etc/cron.daily/rpm
303 %config(noreplace,missingok) /etc/logrotate.d/rpm
305 %config(noreplace,missingok) /etc/rpm/macros.*
306 %attr(0755, rpm, rpm) %dir /var/lib/rpm
308 %define rpmdbattr %attr(0644, rpm, rpm) %verify(not md5 size mtime) %ghost %config(missingok,noreplace)
309 %rpmdbattr /var/lib/rpm/Basenames
310 %rpmdbattr /var/lib/rpm/Conflictname
311 %rpmdbattr /var/lib/rpm/__db.0*
312 %rpmdbattr /var/lib/rpm/Dirnames
313 %rpmdbattr /var/lib/rpm/Group
314 %rpmdbattr /var/lib/rpm/Installtid
315 %rpmdbattr /var/lib/rpm/Name
316 %rpmdbattr /var/lib/rpm/Packages
317 %rpmdbattr /var/lib/rpm/Providename
318 %rpmdbattr /var/lib/rpm/Provideversion
319 %rpmdbattr /var/lib/rpm/Removetid
320 %rpmdbattr /var/lib/rpm/Requirename
321 %rpmdbattr /var/lib/rpm/Requireversion
322 %rpmdbattr /var/lib/rpm/Triggername
326 %rpmattr %{__prefix}/bin/rpm2cpio
327 %rpmattr %{__prefix}/bin/gendiff
328 %rpmattr %{__prefix}/bin/rpmdb
329 #%rpmattr %{__prefix}/bin/rpm[eiu]
330 %rpmattr %{__prefix}/bin/rpmsign
331 %rpmattr %{__prefix}/bin/rpmquery
332 %rpmattr %{__prefix}/bin/rpmverify
334 %{__prefix}/lib/librpm-4.1.so
335 %{__prefix}/lib/librpmdb-4.1.so
336 %{__prefix}/lib/librpmio-4.1.so
337 %{__prefix}/lib/librpmbuild-4.1.so
339 %rpmattr %{__prefix}/lib/rpm/config.guess
340 %rpmattr %{__prefix}/lib/rpm/config.sub
341 %rpmattr %{__prefix}/lib/rpm/convertrpmrc.sh
342 %attr(0644, rpm, rpm) %{__prefix}/lib/rpm/macros
343 %rpmattr %{__prefix}/lib/rpm/mkinstalldirs
344 %rpmattr %{__prefix}/lib/rpm/rpm.*
345 %rpmattr %{__prefix}/lib/rpm/rpm[deiukqv]
346 %attr(0644, rpm, rpm) %{__prefix}/lib/rpm/rpmpopt*
347 %attr(0644, rpm, rpm) %{__prefix}/lib/rpm/rpmrc
349 %ifarch i386 i486 i586 i686 athlon
350 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/i[3456]86*
351 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/athlon*
353 %ifarch alpha alphaev5 alphaev56 alphapca56 alphaev6 alphaev67
354 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/alpha*
356 %ifarch sparc sparcv9 sparc64
357 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/sparc*
360 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/ia64*
362 %ifarch powerpc ppc ppciseries ppcpseries ppcmac
363 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/ppc*
366 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/s390*
368 %ifarch armv3l armv4l
369 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/armv[34][lb]*
371 %ifarch mips mipsel mipseb
372 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/mips*
374 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/noarch*
376 %lang(cs) %{__prefix}/*/locale/cs/LC_MESSAGES/rpm.mo
377 %lang(da) %{__prefix}/*/locale/da/LC_MESSAGES/rpm.mo
378 %lang(de) %{__prefix}/*/locale/de/LC_MESSAGES/rpm.mo
379 %lang(fi) %{__prefix}/*/locale/fi/LC_MESSAGES/rpm.mo
380 %lang(fr) %{__prefix}/*/locale/fr/LC_MESSAGES/rpm.mo
381 %lang(is) %{__prefix}/*/locale/is/LC_MESSAGES/rpm.mo
382 %lang(ja) %{__prefix}/*/locale/ja/LC_MESSAGES/rpm.mo
383 %lang(no) %{__prefix}/*/locale/no/LC_MESSAGES/rpm.mo
384 %lang(pl) %{__prefix}/*/locale/pl/LC_MESSAGES/rpm.mo
385 %lang(pt) %{__prefix}/*/locale/pt/LC_MESSAGES/rpm.mo
386 %lang(pt_BR) %{__prefix}/*/locale/pt_BR/LC_MESSAGES/rpm.mo
387 %lang(ro) %{__prefix}/*/locale/ro/LC_MESSAGES/rpm.mo
388 %lang(ru) %{__prefix}/*/locale/ru/LC_MESSAGES/rpm.mo
389 %lang(sk) %{__prefix}/*/locale/sk/LC_MESSAGES/rpm.mo
390 %lang(sl) %{__prefix}/*/locale/sl/LC_MESSAGES/rpm.mo
391 %lang(sr) %{__prefix}/*/locale/sr/LC_MESSAGES/rpm.mo
392 %lang(sv) %{__prefix}/*/locale/sv/LC_MESSAGES/rpm.mo
393 %lang(tr) %{__prefix}/*/locale/tr/LC_MESSAGES/rpm.mo
395 %{__prefix}%{__share}/man/man1/gendiff.1*
396 %{__prefix}%{__share}/man/man8/rpm.8*
397 %{__prefix}%{__share}/man/man8/rpm2cpio.8*
398 %lang(pl) %{__prefix}%{__share}/man/pl/man[18]/*.[18]*
399 %lang(ru) %{__prefix}%{__share}/man/ru/man[18]/*.[18]*
400 %lang(sk) %{__prefix}%{__share}/man/sk/man[18]/*.[18]*
403 %defattr(-,root,root)
404 %dir %{__prefix}/src/redhat
405 %dir %{__prefix}/src/redhat/BUILD
406 %dir %{__prefix}/src/redhat/SPECS
407 %dir %{__prefix}/src/redhat/SOURCES
408 %dir %{__prefix}/src/redhat/SRPMS
409 %dir %{__prefix}/src/redhat/RPMS
410 %{__prefix}/src/redhat/RPMS/*
411 %rpmattr %{__prefix}/bin/rpmbuild
412 %rpmattr %{__prefix}/lib/rpm/brp-*
413 %rpmattr %{__prefix}/lib/rpm/check-prereqs
414 %rpmattr %{__prefix}/lib/rpm/config.site
415 %rpmattr %{__prefix}/lib/rpm/cpanflute
416 %rpmattr %{__prefix}/lib/rpm/cross-build
417 %rpmattr %{__prefix}/lib/rpm/find-lang.sh
418 %rpmattr %{__prefix}/lib/rpm/find-prov.pl
419 %rpmattr %{__prefix}/lib/rpm/find-provides
420 %rpmattr %{__prefix}/lib/rpm/find-provides.perl
421 %rpmattr %{__prefix}/lib/rpm/find-req.pl
422 %rpmattr %{__prefix}/lib/rpm/find-requires
423 %rpmattr %{__prefix}/lib/rpm/find-requires.perl
424 %rpmattr %{__prefix}/lib/rpm/get_magic.pl
425 %rpmattr %{__prefix}/lib/rpm/getpo.sh
426 %rpmattr %{__prefix}/lib/rpm/http.req
427 %rpmattr %{__prefix}/lib/rpm/javadeps
428 %rpmattr %{__prefix}/lib/rpm/magic.prov
429 %rpmattr %{__prefix}/lib/rpm/magic.req
430 %rpmattr %{__prefix}/lib/rpm/perl.prov
431 %rpmattr %{__prefix}/lib/rpm/perl.req
432 %rpmattr %{__prefix}/lib/rpm/rpm[bt]
433 %rpmattr %{__prefix}/lib/rpm/rpmdiff
434 %rpmattr %{__prefix}/lib/rpm/rpmdiff.cgi
435 %rpmattr %{__prefix}/lib/rpm/u_pkg.sh
436 %rpmattr %{__prefix}/lib/rpm/vpkg-provides.sh
437 %rpmattr %{__prefix}/lib/rpm/vpkg-provides2.sh
439 %{__prefix}%{__share}/man/man8/rpmbuild.8*
441 %if %{with_python_subpackage}
443 %defattr(-,root,root)
444 %{__prefix}/lib/python1.5/site-packages/rpmmodule.so
445 %{__prefix}/lib/python1.5/site-packages/poptmodule.so
448 %if %{with_perl_subpackage}
450 %defattr(-,root,root)
451 %rpmattr %{__prefix}/bin/rpmprune
452 %{perl_sitearch}/auto/*
454 %{perl_sitearch}/RPM.pm
455 %{__prefix}%{__share}/man/man1/rpmprune.1*
456 %{__prefix}%{__share}/man/man3/RPM*
460 %defattr(-,root,root)
464 %{__prefix}/include/rpm
465 %{__prefix}/lib/librpm.a
466 %{__prefix}/lib/librpm.la
467 %{__prefix}/lib/librpm.so
468 %{__prefix}/lib/librpmdb.a
469 %{__prefix}/lib/librpmdb.la
470 %{__prefix}/lib/librpmdb.so
471 %{__prefix}/lib/librpmio.a
472 %{__prefix}/lib/librpmio.la
473 %{__prefix}/lib/librpmio.so
474 %{__prefix}/lib/librpmbuild.a
475 %{__prefix}/lib/librpmbuild.la
476 %{__prefix}/lib/librpmbuild.so
479 %defattr(-,root,root)
480 %{__prefix}/lib/libpopt.so.*
481 %{__prefix}%{__share}/man/man3/popt.3*
482 %lang(cs) %{__prefix}/*/locale/cs/LC_MESSAGES/popt.mo
483 %lang(da) %{__prefix}/*/locale/da/LC_MESSAGES/popt.mo
484 %lang(gl) %{__prefix}/*/locale/gl/LC_MESSAGES/popt.mo
485 %lang(hu) %{__prefix}/*/locale/hu/LC_MESSAGES/popt.mo
486 %lang(is) %{__prefix}/*/locale/is/LC_MESSAGES/popt.mo
487 %lang(no) %{__prefix}/*/locale/no/LC_MESSAGES/popt.mo
488 %lang(pt) %{__prefix}/*/locale/pt/LC_MESSAGES/popt.mo
489 %lang(ro) %{__prefix}/*/locale/ro/LC_MESSAGES/popt.mo
490 %lang(ru) %{__prefix}/*/locale/ru/LC_MESSAGES/popt.mo
491 %lang(sk) %{__prefix}/*/locale/sk/LC_MESSAGES/popt.mo
492 %lang(sl) %{__prefix}/*/locale/sl/LC_MESSAGES/popt.mo
493 %lang(sv) %{__prefix}/*/locale/sv/LC_MESSAGES/popt.mo
494 %lang(tr) %{__prefix}/*/locale/tr/LC_MESSAGES/popt.mo
495 %lang(uk) %{__prefix}/*/locale/uk/LC_MESSAGES/popt.mo
496 %lang(wa) %{__prefix}/*/locale/wa/LC_MESSAGES/popt.mo
497 %lang(zh_CN) %{__prefix}/*/locale/zh_CN.GB2312/LC_MESSAGES/popt.mo
499 # XXX These may end up in popt-devel but it hardly seems worth the effort now.
500 %{__prefix}/lib/libpopt.a
501 %{__prefix}/lib/libpopt.la
502 %{__prefix}/lib/libpopt.so
503 %{__prefix}/include/popt.h
506 * Mon Feb 19 2001 Jeff Johnson <jbj@redhat.com>
507 - start rpm-4.0.3 with --repackage.