1 %define with_python_subpackage @WITH_PYTHON_SUBPACKAGE@ %{nil}
2 %define with_bzip2 @WITH_BZIP2@ %{nil}
3 %define with_apidocs @WITH_APIDOCS@ %{nil}
4 %define with_internal_db @WITH_INTERNAL_DB@ %{nil}
5 %define strip_binaries 1
7 # XXX legacy requires './' payload prefix to be omitted from rpm packages.
8 %define _noPayloadPrefix 1
11 %{expand:%%define __share %(if [ -d %{__prefix}/share/man ]; then echo /share ; else echo %%{nil} ; fi)}
13 Summary: The Red Hat package management system.
15 %define version @VERSION@
18 Group: System Environment/Base
19 Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{version}.tar.gz
21 Conflicts: patch < 2.5
23 Prereq: gawk fileutils textutils mktemp
27 %if !%{with_internal_db}
28 BuildRequires: db3-devel
30 # XXX glibc-2.1.92 has incompatible locale changes that affect statically
31 # XXX linked binaries like /bin/rpm.
33 Requires: glibc >= 2.1.92
37 # XXX Red Hat 5.2 has not bzip2 or python
39 BuildRequires: bzip2 >= 0.9.0c-2
41 %if %{with_python_subpackage}
42 BuildRequires: python-devel >= 1.5.2
45 BuildRoot: %{_tmppath}/%{name}-root
48 The RPM Package Manager (RPM) is a powerful command line driven
49 package management system capable of installing, uninstalling,
50 verifying, querying, and updating software packages. Each software
51 package consists of an archive of files along with information about
52 the package like its version, a description, etc.
55 Summary: Development files for applications which will manipulate RPM packages.
56 Group: Development/Libraries
57 Requires: rpm = %{version}, popt
60 This package contains the RPM C library and header files. These
61 development files will simplify the process of writing programs which
62 manipulate RPM packages and databases. These files are intended to
63 simplify the process of creating graphical package managers or any
64 other tools that need an intimate knowledge of RPM packages in order
67 This package should be installed if you want to develop programs that
68 will manipulate RPM packages and databases.
71 Summary: Scripts and executable programs used to build packages.
72 Group: Development/Tools
73 Requires: rpm = %{version}
76 This package contains scripts and executable programs that are used to
77 build packages using RPM.
79 %if %{with_python_subpackage}
81 Summary: Python bindings for apps which will manipulate RPM packages.
82 Group: Development/Libraries
83 BuildRequires: popt >= 1.5
84 Requires: rpm = %{version}
86 Requires: python >= 1.5.2
89 The rpm-python package contains a module which permits applications
90 written in the Python programming language to use the interface
91 supplied by RPM (RPM Package Manager) libraries.
93 This package should be installed if you want to develop Python
94 programs that will manipulate RPM packages and databases.
98 Summary: A C library for parsing command line parameters.
99 Group: Development/Libraries
103 Popt is a C library for parsing command line parameters. Popt was
104 heavily influenced by the getopt() and getopt_long() functions, but it
105 improves on them by allowing more powerful argument expansion. Popt
106 can parse arbitrary argv[] style arrays and automatically set
107 variables based on command line arguments. Popt allows command line
108 arguments to be aliased via configuration files and includes utility
109 functions for parsing arbitrary strings into argv[] arrays using
112 Install popt if you're a C programmer and you'd like to use its
120 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix} --sysconfdir=/etc --localstatedir=/var --infodir='${prefix}%{__share}/info' --mandir='${prefix}%{__share}/man'
122 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix}
128 rm -rf $RPM_BUILD_ROOT
130 make DESTDIR="$RPM_BUILD_ROOT" install
134 # Save list of packages through cron
135 mkdir -p ${RPM_BUILD_ROOT}/etc/cron.daily
136 install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}/etc/cron.daily/rpm
138 mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d
139 install -m 755 scripts/rpm.log ${RPM_BUILD_ROOT}/etc/logrotate.d/rpm
141 mkdir -p $RPM_BUILD_ROOT/etc/rpm
142 cat << E_O_F > $RPM_BUILD_ROOT/etc/rpm/macros.db1
146 mkdir -p $RPM_BUILD_ROOT/var/lib/rpm
148 Basenames Conflictname Dirnames Group Installtid Name Providename \
149 Provideversion Removetid Requirename Requireversion Triggername
151 touch $RPM_BUILD_ROOT/var/lib/rpm/$dbi
157 gzip -9n apidocs/man/man*/* || :
160 %if %{strip_binaries}
163 strip .%{__prefix}/bin/rpm2cpio
168 rm -rf $RPM_BUILD_ROOT
172 if [ -f /var/lib/rpm/Packages -a -f /var/lib/rpm/packages.rpm ]; then
175 /var/lib/rpm/packages.rpm db1 format installed package headers
176 /var/lib/rpm/Packages db3 format installed package headers
177 Please remove (or at least rename) one of those files, and re-install.
181 /usr/sbin/groupadd -g 37 @RPMGROUP@ > /dev/null 2>&1
182 /usr/sbin/useradd -d /var/lib/rpm -u 37 -g 37 @RPMUSER@ > /dev/null 2>&1
189 if [ -f /var/lib/rpm/packages.rpm ]; then
190 /bin/chown @RPMUSER@.@RPMGROUP@ /var/lib/rpm/*.rpm
191 elif [ -f /var/lib/rpm/Packages ]; then
192 # undo db1 configuration
193 rm -f /etc/rpm/macros.db1
194 /bin/chown @RPMUSER@.@RPMGROUP@ /var/lib/rpm/[A-Z]*
196 # initialize db3 database
197 rm -f /etc/rpm/macros.db1
207 /usr/sbin/userdel rpm
208 /usr/sbin/groupdel rpm
212 %post devel -p /sbin/ldconfig
213 %postun devel -p /sbin/ldconfig
215 %post -n popt -p /sbin/ldconfig
216 %postun -n popt -p /sbin/ldconfig
219 %if %{with_python_subpackage}
220 %post python -p /sbin/ldconfig
221 %postun python -p /sbin/ldconfig
224 %define rpmattr %attr(0755, @RPMUSER@, @RPMGROUP@)
225 %define rpmdbattr %rpmattr %verify(not md5 size mtime) %ghost
228 %defattr(-,root,root)
229 %doc RPM-PGP-KEY RPM-GPG-KEY CHANGES GROUPS doc/manual/[a-z]*
230 %attr(0755, @RPMUSER@, @RPMGROUP@) /bin/rpm
233 %config(noreplace,missingok) /etc/cron.daily/rpm
234 %config(noreplace,missingok) /etc/logrotate.d/rpm
236 %config(noreplace,missingok) /etc/rpm/macros.db1
237 %attr(0755, @RPMUSER@, @RPMGROUP@) %dir /var/lib/rpm
238 %rpmdbattr /var/lib/rpm/Basenames
239 %rpmdbattr /var/lib/rpm/Conflictname
240 #%rpmdbattr /var/lib/rpm/__db.001
241 %rpmdbattr /var/lib/rpm/Dirnames
242 %rpmdbattr /var/lib/rpm/Group
243 %rpmdbattr /var/lib/rpm/Installtid
244 %rpmdbattr /var/lib/rpm/Name
245 #%rpmdbattr /var/lib/rpm/Packages
246 %rpmdbattr /var/lib/rpm/Providename
247 %rpmdbattr /var/lib/rpm/Provideversion
248 %rpmdbattr /var/lib/rpm/Removetid
249 %rpmdbattr /var/lib/rpm/Requirename
250 %rpmdbattr /var/lib/rpm/Requireversion
251 %rpmdbattr /var/lib/rpm/Triggername
254 %rpmattr %{__prefix}/bin/rpm2cpio
255 %rpmattr %{__prefix}/bin/gendiff
256 %rpmattr %{__prefix}/bin/rpmdb
257 %rpmattr %{__prefix}/bin/rpm[eiukqv]
258 %rpmattr %{__prefix}/bin/rpmsign
259 %rpmattr %{__prefix}/bin/rpmquery
260 %rpmattr %{__prefix}/bin/rpmverify
262 %{__prefix}/lib/librpm.so.*
263 %{__prefix}/lib/librpmdb.so.*
264 %{__prefix}/lib/librpmio.so.*
265 %{__prefix}/lib/librpmbuild.so.*
267 %rpmattr %{__prefix}/lib/rpm/config.guess
268 %rpmattr %{__prefix}/lib/rpm/config.sub
269 %rpmattr %{__prefix}/lib/rpm/convertrpmrc.sh
270 %attr(0644, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/macros
271 %rpmattr %{__prefix}/lib/rpm/mkinstalldirs
272 %rpmattr %{__prefix}/lib/rpm/rpm.*
273 %rpmattr %{__prefix}/lib/rpm/rpm[deiukqv]
274 %attr(0644, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/rpmpopt*
275 %attr(0644, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/rpmrc
277 %ifarch i386 i486 i586 i686 athlon
278 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/i[3456]86*
281 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/alpha*
283 %ifarch sparc sparc64
284 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/sparc*
287 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/ia64*
290 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/ppc*
293 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/s390*
295 %ifarch armv3l armv4l
296 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/armv[34][lb]*
299 %lang(cs) %{__prefix}/*/locale/cs/LC_MESSAGES/rpm.mo
300 %lang(da) %{__prefix}/*/locale/da/LC_MESSAGES/rpm.mo
301 %lang(de) %{__prefix}/*/locale/de/LC_MESSAGES/rpm.mo
302 %lang(fi) %{__prefix}/*/locale/fi/LC_MESSAGES/rpm.mo
303 %lang(fr) %{__prefix}/*/locale/fr/LC_MESSAGES/rpm.mo
304 %lang(is) %{__prefix}/*/locale/is/LC_MESSAGES/rpm.mo
305 %lang(ja) %{__prefix}/*/locale/ja/LC_MESSAGES/rpm.mo
306 %lang(no) %{__prefix}/*/locale/no/LC_MESSAGES/rpm.mo
307 %lang(pl) %{__prefix}/*/locale/pl/LC_MESSAGES/rpm.mo
308 %lang(pt) %{__prefix}/*/locale/pt/LC_MESSAGES/rpm.mo
309 %lang(pt_BR) %{__prefix}/*/locale/pt_BR/LC_MESSAGES/rpm.mo
310 %lang(ro) %{__prefix}/*/locale/ro/LC_MESSAGES/rpm.mo
311 %lang(ru) %{__prefix}/*/locale/ru/LC_MESSAGES/rpm.mo
312 %lang(sk) %{__prefix}/*/locale/sk/LC_MESSAGES/rpm.mo
313 %lang(sl) %{__prefix}/*/locale/sl/LC_MESSAGES/rpm.mo
314 %lang(sr) %{__prefix}/*/locale/sr/LC_MESSAGES/rpm.mo
315 %lang(sv) %{__prefix}/*/locale/sv/LC_MESSAGES/rpm.mo
316 %lang(tr) %{__prefix}/*/locale/tr/LC_MESSAGES/rpm.mo
318 %{__prefix}%{__share}/man/man1/gendiff.1*
319 %{__prefix}%{__share}/man/man8/rpm.8*
320 %{__prefix}%{__share}/man/man8/rpm2cpio.8*
321 %lang(pl) %{__prefix}%{__share}/man/pl/man[18]/*.[18]*
322 %lang(ru) %{__prefix}%{__share}/man/ru/man[18]/*.[18]*
323 %lang(sk) %{__prefix}%{__share}/man/sk/man[18]/*.[18]*
326 %defattr(-,root,root)
327 %dir %{__prefix}/src/redhat
328 %dir %{__prefix}/src/redhat/BUILD
329 %dir %{__prefix}/src/redhat/SPECS
330 %dir %{__prefix}/src/redhat/SOURCES
331 %dir %{__prefix}/src/redhat/SRPMS
332 %dir %{__prefix}/src/redhat/RPMS
333 %{__prefix}/src/redhat/RPMS/*
334 %rpmattr %{__prefix}/bin/rpmbuild
335 %rpmattr %{__prefix}/lib/rpm/brp-*
336 %rpmattr %{__prefix}/lib/rpm/check-prereqs
337 %rpmattr %{__prefix}/lib/rpm/cpanflute
338 %rpmattr %{__prefix}/lib/rpm/find-lang.sh
339 %rpmattr %{__prefix}/lib/rpm/find-prov.pl
340 %rpmattr %{__prefix}/lib/rpm/find-provides
341 %rpmattr %{__prefix}/lib/rpm/find-provides.perl
342 %rpmattr %{__prefix}/lib/rpm/find-req.pl
343 %rpmattr %{__prefix}/lib/rpm/find-requires
344 %rpmattr %{__prefix}/lib/rpm/find-requires.perl
345 %rpmattr %{__prefix}/lib/rpm/get_magic.pl
346 %rpmattr %{__prefix}/lib/rpm/getpo.sh
347 %rpmattr %{__prefix}/lib/rpm/http.req
348 %rpmattr %{__prefix}/lib/rpm/javadeps
349 %rpmattr %{__prefix}/lib/rpm/magic.prov
350 %rpmattr %{__prefix}/lib/rpm/magic.req
351 %rpmattr %{__prefix}/lib/rpm/perl.prov
352 %rpmattr %{__prefix}/lib/rpm/perl.req
353 %rpmattr %{__prefix}/lib/rpm/rpm[bt]
354 %rpmattr %{__prefix}/lib/rpm/rpmdiff
355 %rpmattr %{__prefix}/lib/rpm/rpmdiff.cgi
356 %rpmattr %{__prefix}/lib/rpm/u_pkg.sh
357 %rpmattr %{__prefix}/lib/rpm/vpkg-provides.sh
358 %rpmattr %{__prefix}/lib/rpm/vpkg-provides2.sh
360 %{__prefix}%{__share}/man/man8/rpmbuild.8*
362 %if %{with_python_subpackage}
364 %defattr(-,root,root)
365 %{__prefix}/lib/python1.5/site-packages/rpmmodule.so
369 %defattr(-,root,root)
371 %doc @WITH_APIDOCS_TARGET@
373 %{__prefix}/include/rpm
374 %{__prefix}/lib/librpm.a
375 %{__prefix}/lib/librpm.la
376 %{__prefix}/lib/librpm.so
377 %{__prefix}/lib/librpmdb.a
378 %{__prefix}/lib/librpmdb.la
379 %{__prefix}/lib/librpmdb.so
380 %{__prefix}/lib/librpmio.a
381 %{__prefix}/lib/librpmio.la
382 %{__prefix}/lib/librpmio.so
383 %{__prefix}/lib/librpmbuild.a
384 %{__prefix}/lib/librpmbuild.la
385 %{__prefix}/lib/librpmbuild.so
388 %defattr(-,root,root)
389 %{__prefix}/lib/libpopt.so.*
390 %{__prefix}%{__share}/man/man3/popt.3*
391 %lang(cs) %{__prefix}/*/locale/cs/LC_MESSAGES/popt.mo
392 %lang(da) %{__prefix}/*/locale/da/LC_MESSAGES/popt.mo
393 %lang(gl) %{__prefix}/*/locale/gl/LC_MESSAGES/popt.mo
394 %lang(hu) %{__prefix}/*/locale/hu/LC_MESSAGES/popt.mo
395 %lang(is) %{__prefix}/*/locale/is/LC_MESSAGES/popt.mo
396 %lang(no) %{__prefix}/*/locale/no/LC_MESSAGES/popt.mo
397 %lang(pt) %{__prefix}/*/locale/pt/LC_MESSAGES/popt.mo
398 %lang(ro) %{__prefix}/*/locale/ro/LC_MESSAGES/popt.mo
399 %lang(ru) %{__prefix}/*/locale/ru/LC_MESSAGES/popt.mo
400 %lang(sk) %{__prefix}/*/locale/sk/LC_MESSAGES/popt.mo
401 %lang(sl) %{__prefix}/*/locale/sl/LC_MESSAGES/popt.mo
402 %lang(sv) %{__prefix}/*/locale/sv/LC_MESSAGES/popt.mo
403 %lang(tr) %{__prefix}/*/locale/tr/LC_MESSAGES/popt.mo
404 %lang(uk) %{__prefix}/*/locale/uk/LC_MESSAGES/popt.mo
405 %lang(wa) %{__prefix}/*/locale/wa/LC_MESSAGES/popt.mo
406 %lang(zh_CN) %{__prefix}/*/locale/zh_CN.GB2312/LC_MESSAGES/popt.mo
408 # XXX These may end up in popt-devel but it hardly seems worth the effort now.
409 %{__prefix}/lib/libpopt.a
410 %{__prefix}/lib/libpopt.la
411 %{__prefix}/lib/libpopt.so
412 %{__prefix}/include/popt.h
415 * Mon Feb 19 2001 Jeff Johnson <jbj@redhat.com>
416 - start rpm-4.0.3 with --repackage.