1 %define with_python_subpackage 1 %{nil}
2 %define with_bzip2 1 %{nil}
3 %define with_apidocs 1 %{nil}
4 %define with_internal_db 1 %{nil}
5 %define strip_binaries 1
7 # XXX enable at your own risk, CDB access to rpmdb isn't cooked yet.
8 %define enable_cdb create cdb
10 # XXX legacy requires './' payload prefix to be omitted from rpm packages.
11 %define _noPayloadPrefix 1
14 %{expand:%%define __share %(if [ -d %{__prefix}/share/man ]; then echo /share ; else echo %%{nil} ; fi)}
16 Summary: The Red Hat package management system.
21 Group: System Environment/Base
22 Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{version}.tar.gz
24 Conflicts: patch < 2.5
26 Prereq: gawk fileutils textutils mktemp
27 Requires: popt = 1.6.3
30 %if !%{with_internal_db}
31 BuildRequires: db3-devel
33 # XXX glibc-2.1.92 has incompatible locale changes that affect statically
34 # XXX linked binaries like /bin/rpm.
36 Requires: glibc >= 2.1.92
40 # XXX Red Hat 5.2 has not bzip2 or python
42 BuildRequires: bzip2 >= 0.9.0c-2
44 %if %{with_python_subpackage}
45 BuildRequires: python-devel >= 1.5.2
48 BuildRoot: %{_tmppath}/%{name}-root
51 The RPM Package Manager (RPM) is a powerful command line driven
52 package management system capable of installing, uninstalling,
53 verifying, querying, and updating software packages. Each software
54 package consists of an archive of files along with information about
55 the package like its version, a description, etc.
58 Summary: Development files for applications which will manipulate RPM packages.
59 Group: Development/Libraries
60 Requires: rpm = %{version}, popt = 1.6.3
63 This package contains the RPM C library and header files. These
64 development files will simplify the process of writing programs which
65 manipulate RPM packages and databases. These files are intended to
66 simplify the process of creating graphical package managers or any
67 other tools that need an intimate knowledge of RPM packages in order
70 This package should be installed if you want to develop programs that
71 will manipulate RPM packages and databases.
74 Summary: Scripts and executable programs used to build packages.
75 Group: Development/Tools
76 Requires: rpm = %{version}
79 This package contains scripts and executable programs that are used to
80 build packages using RPM.
82 %if %{with_python_subpackage}
84 Summary: Python bindings for apps which will manipulate RPM packages.
85 Group: Development/Libraries
86 Requires: rpm = %{version}
87 Requires: python >= 1.5.2
90 The rpm-python package contains a module which permits applications
91 written in the Python programming language to use the interface
92 supplied by RPM (RPM Package Manager) libraries.
94 This package should be installed if you want to develop Python
95 programs that will manipulate RPM packages and databases.
99 Summary: A C library for parsing command line parameters.
100 Group: Development/Libraries
104 Popt is a C library for parsing command line parameters. Popt was
105 heavily influenced by the getopt() and getopt_long() functions, but it
106 improves on them by allowing more powerful argument expansion. Popt
107 can parse arbitrary argv[] style arrays and automatically set
108 variables based on command line arguments. Popt allows command line
109 arguments to be aliased via configuration files and includes utility
110 functions for parsing arbitrary strings into argv[] arrays using
113 Install popt if you're a C programmer and you'd like to use its
122 # XXX work around a (possible) compiler problem on ia64
128 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix} --sysconfdir=/etc --localstatedir=/var --infodir='${prefix}%{__share}/info' --mandir='${prefix}%{__share}/man'
130 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix}
136 rm -rf $RPM_BUILD_ROOT
138 make DESTDIR="$RPM_BUILD_ROOT" install
142 # Save list of packages through cron
143 mkdir -p ${RPM_BUILD_ROOT}/etc/cron.daily
144 install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}/etc/cron.daily/rpm
146 mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d
147 install -m 755 scripts/rpm.log ${RPM_BUILD_ROOT}/etc/logrotate.d/rpm
149 mkdir -p $RPM_BUILD_ROOT/etc/rpm
150 cat << E_O_F > $RPM_BUILD_ROOT/etc/rpm/macros.db1
153 cat << E_O_F > $RPM_BUILD_ROOT/etc/rpm/macros.cdb
154 %{?enable_cdb:#%%__dbi_cdb %{enable_cdb}}
157 mkdir -p $RPM_BUILD_ROOT/var/lib/rpm
159 Basenames Conflictname Dirnames Group Installtid Name Providename \
160 Provideversion Removetid Requirename Requireversion Triggername \
161 Packages __db.001 __db.002 __db.003 __db.004 __db.005 __db.006 __db.007 \
164 touch $RPM_BUILD_ROOT/var/lib/rpm/$dbi
170 gzip -9n apidocs/man/man*/* || :
173 %if %{strip_binaries}
176 strip .%{__prefix}/bin/rpm2cpio
181 rm -rf $RPM_BUILD_ROOT
185 if [ -f /var/lib/rpm/Packages -a -f /var/lib/rpm/packages.rpm ]; then
188 /var/lib/rpm/packages.rpm db1 format installed package headers
189 /var/lib/rpm/Packages db3 format installed package headers
190 Please remove (or at least rename) one of those files, and re-install.
194 /usr/sbin/groupadd -g 37 rpm > /dev/null 2>&1
195 /usr/sbin/useradd -r -d /var/lib/rpm -u 37 -g 37 rpm > /dev/null 2>&1
202 if [ -f /var/lib/rpm/packages.rpm ]; then
203 /bin/chown rpm.rpm /var/lib/rpm/*.rpm
204 elif [ -f /var/lib/rpm/Packages ]; then
205 # undo db1 configuration
206 rm -f /etc/rpm/macros.db1
207 /bin/chown rpm.rpm /var/lib/rpm/[A-Z]*
209 # initialize db3 database
210 rm -f /etc/rpm/macros.db1
220 /usr/sbin/userdel rpm
221 /usr/sbin/groupdel rpm
225 %post devel -p /sbin/ldconfig
226 %postun devel -p /sbin/ldconfig
228 %post -n popt -p /sbin/ldconfig
229 %postun -n popt -p /sbin/ldconfig
232 %if %{with_python_subpackage}
233 %post python -p /sbin/ldconfig
234 %postun python -p /sbin/ldconfig
237 %define rpmattr %attr(0755, rpm, rpm)
240 %defattr(-,root,root)
241 %doc RPM-PGP-KEY RPM-GPG-KEY CHANGES GROUPS doc/manual/[a-z]*
242 %attr(0755, rpm, rpm) /bin/rpm
245 %config(noreplace,missingok) /etc/cron.daily/rpm
246 %config(noreplace,missingok) /etc/logrotate.d/rpm
248 %config(noreplace,missingok) /etc/rpm/macros.*
249 %attr(0755, rpm, rpm) %dir /var/lib/rpm
251 %define rpmdbattr %attr(0644, rpm, rpm) %verify(not md5 size mtime) %ghost %config(missingok,noreplace)
252 %rpmdbattr /var/lib/rpm/Basenames
253 %rpmdbattr /var/lib/rpm/Conflictname
254 %rpmdbattr /var/lib/rpm/__db.0*
255 %rpmdbattr /var/lib/rpm/Dirnames
256 %rpmdbattr /var/lib/rpm/Group
257 %rpmdbattr /var/lib/rpm/Installtid
258 %rpmdbattr /var/lib/rpm/Name
259 %rpmdbattr /var/lib/rpm/Packages
260 %rpmdbattr /var/lib/rpm/Providename
261 %rpmdbattr /var/lib/rpm/Provideversion
262 %rpmdbattr /var/lib/rpm/Removetid
263 %rpmdbattr /var/lib/rpm/Requirename
264 %rpmdbattr /var/lib/rpm/Requireversion
265 %rpmdbattr /var/lib/rpm/Triggername
269 %rpmattr %{__prefix}/bin/rpm2cpio
270 %rpmattr %{__prefix}/bin/gendiff
271 %rpmattr %{__prefix}/bin/rpmdb
272 #%rpmattr %{__prefix}/bin/rpm[eiu]
273 %rpmattr %{__prefix}/bin/rpmsign
274 %rpmattr %{__prefix}/bin/rpmquery
275 %rpmattr %{__prefix}/bin/rpmverify
277 %{__prefix}/lib/librpm-4.1.so
278 %{__prefix}/lib/librpmdb-4.1.so
279 %{__prefix}/lib/librpmio-4.1.so
280 %{__prefix}/lib/librpmbuild-4.1.so
282 %rpmattr %{__prefix}/lib/rpm/config.guess
283 %rpmattr %{__prefix}/lib/rpm/config.sub
284 %rpmattr %{__prefix}/lib/rpm/convertrpmrc.sh
285 %attr(0644, rpm, rpm) %{__prefix}/lib/rpm/macros
286 %rpmattr %{__prefix}/lib/rpm/mkinstalldirs
287 %rpmattr %{__prefix}/lib/rpm/rpm.*
288 %rpmattr %{__prefix}/lib/rpm/rpm[deiukqv]
289 %attr(0644, rpm, rpm) %{__prefix}/lib/rpm/rpmpopt*
290 %attr(0644, rpm, rpm) %{__prefix}/lib/rpm/rpmrc
292 %ifarch i386 i486 i586 i686 athlon
293 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/i[3456]86*
296 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/alpha*
298 %ifarch sparc sparc64
299 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/sparc*
302 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/ia64*
305 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/ppc*
308 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/s390*
310 %ifarch armv3l armv4l
311 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/armv[34][lb]*
313 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/noarch*
315 %lang(cs) %{__prefix}/*/locale/cs/LC_MESSAGES/rpm.mo
316 %lang(da) %{__prefix}/*/locale/da/LC_MESSAGES/rpm.mo
317 %lang(de) %{__prefix}/*/locale/de/LC_MESSAGES/rpm.mo
318 %lang(fi) %{__prefix}/*/locale/fi/LC_MESSAGES/rpm.mo
319 %lang(fr) %{__prefix}/*/locale/fr/LC_MESSAGES/rpm.mo
320 %lang(is) %{__prefix}/*/locale/is/LC_MESSAGES/rpm.mo
321 %lang(ja) %{__prefix}/*/locale/ja/LC_MESSAGES/rpm.mo
322 %lang(no) %{__prefix}/*/locale/no/LC_MESSAGES/rpm.mo
323 %lang(pl) %{__prefix}/*/locale/pl/LC_MESSAGES/rpm.mo
324 %lang(pt) %{__prefix}/*/locale/pt/LC_MESSAGES/rpm.mo
325 %lang(pt_BR) %{__prefix}/*/locale/pt_BR/LC_MESSAGES/rpm.mo
326 %lang(ro) %{__prefix}/*/locale/ro/LC_MESSAGES/rpm.mo
327 %lang(ru) %{__prefix}/*/locale/ru/LC_MESSAGES/rpm.mo
328 %lang(sk) %{__prefix}/*/locale/sk/LC_MESSAGES/rpm.mo
329 %lang(sl) %{__prefix}/*/locale/sl/LC_MESSAGES/rpm.mo
330 %lang(sr) %{__prefix}/*/locale/sr/LC_MESSAGES/rpm.mo
331 %lang(sv) %{__prefix}/*/locale/sv/LC_MESSAGES/rpm.mo
332 %lang(tr) %{__prefix}/*/locale/tr/LC_MESSAGES/rpm.mo
334 %{__prefix}%{__share}/man/man1/gendiff.1*
335 %{__prefix}%{__share}/man/man8/rpm.8*
336 %{__prefix}%{__share}/man/man8/rpm2cpio.8*
337 %lang(pl) %{__prefix}%{__share}/man/pl/man[18]/*.[18]*
338 %lang(ru) %{__prefix}%{__share}/man/ru/man[18]/*.[18]*
339 %lang(sk) %{__prefix}%{__share}/man/sk/man[18]/*.[18]*
342 %defattr(-,root,root)
343 %dir %{__prefix}/src/redhat
344 %dir %{__prefix}/src/redhat/BUILD
345 %dir %{__prefix}/src/redhat/SPECS
346 %dir %{__prefix}/src/redhat/SOURCES
347 %dir %{__prefix}/src/redhat/SRPMS
348 %dir %{__prefix}/src/redhat/RPMS
349 %{__prefix}/src/redhat/RPMS/*
350 %rpmattr %{__prefix}/bin/rpmbuild
351 %rpmattr %{__prefix}/lib/rpm/brp-*
352 %rpmattr %{__prefix}/lib/rpm/check-prereqs
353 %rpmattr %{__prefix}/lib/rpm/config.site
354 %rpmattr %{__prefix}/lib/rpm/cpanflute
355 %rpmattr %{__prefix}/lib/rpm/cross-build
356 %rpmattr %{__prefix}/lib/rpm/find-lang.sh
357 %rpmattr %{__prefix}/lib/rpm/find-prov.pl
358 %rpmattr %{__prefix}/lib/rpm/find-provides
359 %rpmattr %{__prefix}/lib/rpm/find-provides.perl
360 %rpmattr %{__prefix}/lib/rpm/find-req.pl
361 %rpmattr %{__prefix}/lib/rpm/find-requires
362 %rpmattr %{__prefix}/lib/rpm/find-requires.perl
363 %rpmattr %{__prefix}/lib/rpm/get_magic.pl
364 %rpmattr %{__prefix}/lib/rpm/getpo.sh
365 %rpmattr %{__prefix}/lib/rpm/http.req
366 %rpmattr %{__prefix}/lib/rpm/javadeps
367 %rpmattr %{__prefix}/lib/rpm/magic.prov
368 %rpmattr %{__prefix}/lib/rpm/magic.req
369 %rpmattr %{__prefix}/lib/rpm/perl.prov
370 %rpmattr %{__prefix}/lib/rpm/perl.req
371 %rpmattr %{__prefix}/lib/rpm/rpm[bt]
372 %rpmattr %{__prefix}/lib/rpm/rpmdiff
373 %rpmattr %{__prefix}/lib/rpm/rpmdiff.cgi
374 %rpmattr %{__prefix}/lib/rpm/u_pkg.sh
375 %rpmattr %{__prefix}/lib/rpm/vpkg-provides.sh
376 %rpmattr %{__prefix}/lib/rpm/vpkg-provides2.sh
378 %{__prefix}%{__share}/man/man8/rpmbuild.8*
380 %if %{with_python_subpackage}
382 %defattr(-,root,root)
383 %{__prefix}/lib/python1.5/site-packages/rpmmodule.so
387 %defattr(-,root,root)
391 %{__prefix}/include/rpm
392 %{__prefix}/lib/librpm.a
393 %{__prefix}/lib/librpm.la
394 %{__prefix}/lib/librpm.so
395 %{__prefix}/lib/librpmdb.a
396 %{__prefix}/lib/librpmdb.la
397 %{__prefix}/lib/librpmdb.so
398 %{__prefix}/lib/librpmio.a
399 %{__prefix}/lib/librpmio.la
400 %{__prefix}/lib/librpmio.so
401 %{__prefix}/lib/librpmbuild.a
402 %{__prefix}/lib/librpmbuild.la
403 %{__prefix}/lib/librpmbuild.so
406 %defattr(-,root,root)
407 %{__prefix}/lib/libpopt.so.*
408 %{__prefix}%{__share}/man/man3/popt.3*
409 %lang(cs) %{__prefix}/*/locale/cs/LC_MESSAGES/popt.mo
410 %lang(da) %{__prefix}/*/locale/da/LC_MESSAGES/popt.mo
411 %lang(gl) %{__prefix}/*/locale/gl/LC_MESSAGES/popt.mo
412 %lang(hu) %{__prefix}/*/locale/hu/LC_MESSAGES/popt.mo
413 %lang(is) %{__prefix}/*/locale/is/LC_MESSAGES/popt.mo
414 %lang(no) %{__prefix}/*/locale/no/LC_MESSAGES/popt.mo
415 %lang(pt) %{__prefix}/*/locale/pt/LC_MESSAGES/popt.mo
416 %lang(ro) %{__prefix}/*/locale/ro/LC_MESSAGES/popt.mo
417 %lang(ru) %{__prefix}/*/locale/ru/LC_MESSAGES/popt.mo
418 %lang(sk) %{__prefix}/*/locale/sk/LC_MESSAGES/popt.mo
419 %lang(sl) %{__prefix}/*/locale/sl/LC_MESSAGES/popt.mo
420 %lang(sv) %{__prefix}/*/locale/sv/LC_MESSAGES/popt.mo
421 %lang(tr) %{__prefix}/*/locale/tr/LC_MESSAGES/popt.mo
422 %lang(uk) %{__prefix}/*/locale/uk/LC_MESSAGES/popt.mo
423 %lang(wa) %{__prefix}/*/locale/wa/LC_MESSAGES/popt.mo
424 %lang(zh_CN) %{__prefix}/*/locale/zh_CN.GB2312/LC_MESSAGES/popt.mo
426 # XXX These may end up in popt-devel but it hardly seems worth the effort now.
427 %{__prefix}/lib/libpopt.a
428 %{__prefix}/lib/libpopt.la
429 %{__prefix}/lib/libpopt.so
430 %{__prefix}/include/popt.h
433 * Mon Feb 19 2001 Jeff Johnson <jbj@redhat.com>
434 - start rpm-4.0.3 with --repackage.