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
191 elif [ -f /var/lib/rpm/Packages ]; then
192 # undo db1 configuration
193 rm -f /etc/rpm/macros.db1
195 # initialize db3 database
196 rm -f /etc/rpm/macros.db1
199 /bin/chown @RPMUSER@.@RPMGROUP@ /var/lib/rpm/[A-Z]* /var/lib/rpm/*.rpm
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
225 %defattr(-,root,root)
226 %doc RPM-PGP-KEY RPM-GPG-KEY CHANGES GROUPS doc/manual/[a-z]*
227 %attr(0755, @RPMUSER@, @RPMGROUP@) /bin/rpm
230 %config(noreplace,missingok) /etc/cron.daily/rpm
231 %config(noreplace,missingok) /etc/logrotate.d/rpm
233 %config(noreplace,missingok) /etc/rpm/macros.db1
234 %attr(0755, @RPMUSER@, @RPMGROUP@) %dir /var/lib/rpm
235 %attr(0755, @RPMUSER@, @RPMGROUP@) %ghost /var/lib/rpm/Basenames
236 %attr(0755, @RPMUSER@, @RPMGROUP@) %ghost /var/lib/rpm/Conflictname
237 #%attr(0755, @RPMUSER@, @RPMGROUP@) %ghost /var/lib/rpm/__db.001
238 %attr(0755, @RPMUSER@, @RPMGROUP@) %ghost /var/lib/rpm/Dirnames
239 %attr(0755, @RPMUSER@, @RPMGROUP@) %ghost /var/lib/rpm/Group
240 %attr(0755, @RPMUSER@, @RPMGROUP@) %ghost /var/lib/rpm/Installtid
241 %attr(0755, @RPMUSER@, @RPMGROUP@) %ghost /var/lib/rpm/Name
242 #%attr(0755, @RPMUSER@, @RPMGROUP@) %ghost /var/lib/rpm/Packages
243 %attr(0755, @RPMUSER@, @RPMGROUP@) %ghost /var/lib/rpm/Providename
244 %attr(0755, @RPMUSER@, @RPMGROUP@) %ghost /var/lib/rpm/Provideversion
245 %attr(0755, @RPMUSER@, @RPMGROUP@) %ghost /var/lib/rpm/Removetid
246 %attr(0755, @RPMUSER@, @RPMGROUP@) %ghost /var/lib/rpm/Requirename
247 %attr(0755, @RPMUSER@, @RPMGROUP@) %ghost /var/lib/rpm/Requireversion
248 %attr(0755, @RPMUSER@, @RPMGROUP@) %ghost /var/lib/rpm/Triggername
251 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/bin/rpm2cpio
252 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/bin/gendiff
253 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/bin/rpmdb
254 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/bin/rpm[eiukqv]
255 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/bin/rpmsign
256 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/bin/rpmquery
257 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/bin/rpmverify
259 %{__prefix}/lib/librpm.so.*
260 %{__prefix}/lib/librpmdb.so.*
261 %{__prefix}/lib/librpmio.so.*
262 %{__prefix}/lib/librpmbuild.so.*
264 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/config.guess
265 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/config.sub
266 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/convertrpmrc.sh
267 %attr(0644, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/macros
268 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/mkinstalldirs
269 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/rpm.*
270 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/rpm[deiukqv]
271 %attr(0644, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/rpmpopt*
272 %attr(0644, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/rpmrc
274 %ifarch i386 i486 i586 i686 athlon
275 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/i[3456]86*
278 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/alpha*
280 %ifarch sparc sparc64
281 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/sparc*
284 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/ia64*
287 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/ppc*
290 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/s390*
292 %ifarch armv3l armv4l
293 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/armv[34][lb]*
296 %lang(cs) %{__prefix}/*/locale/cs/LC_MESSAGES/rpm.mo
297 %lang(da) %{__prefix}/*/locale/da/LC_MESSAGES/rpm.mo
298 %lang(de) %{__prefix}/*/locale/de/LC_MESSAGES/rpm.mo
299 %lang(fi) %{__prefix}/*/locale/fi/LC_MESSAGES/rpm.mo
300 %lang(fr) %{__prefix}/*/locale/fr/LC_MESSAGES/rpm.mo
301 %lang(is) %{__prefix}/*/locale/is/LC_MESSAGES/rpm.mo
302 %lang(ja) %{__prefix}/*/locale/ja/LC_MESSAGES/rpm.mo
303 %lang(no) %{__prefix}/*/locale/no/LC_MESSAGES/rpm.mo
304 %lang(pl) %{__prefix}/*/locale/pl/LC_MESSAGES/rpm.mo
305 %lang(pt) %{__prefix}/*/locale/pt/LC_MESSAGES/rpm.mo
306 %lang(pt_BR) %{__prefix}/*/locale/pt_BR/LC_MESSAGES/rpm.mo
307 %lang(ro) %{__prefix}/*/locale/ro/LC_MESSAGES/rpm.mo
308 %lang(ru) %{__prefix}/*/locale/ru/LC_MESSAGES/rpm.mo
309 %lang(sk) %{__prefix}/*/locale/sk/LC_MESSAGES/rpm.mo
310 %lang(sl) %{__prefix}/*/locale/sl/LC_MESSAGES/rpm.mo
311 %lang(sr) %{__prefix}/*/locale/sr/LC_MESSAGES/rpm.mo
312 %lang(sv) %{__prefix}/*/locale/sv/LC_MESSAGES/rpm.mo
313 %lang(tr) %{__prefix}/*/locale/tr/LC_MESSAGES/rpm.mo
315 %{__prefix}%{__share}/man/man[18]/*.[18]*
316 %lang(pl) %{__prefix}%{__share}/man/pl/man[18]/*.[18]*
317 %lang(ru) %{__prefix}%{__share}/man/ru/man[18]/*.[18]*
318 %lang(sk) %{__prefix}%{__share}/man/sk/man[18]/*.[18]*
321 %defattr(-,root,root)
322 %dir %{__prefix}/src/redhat
323 %dir %{__prefix}/src/redhat/BUILD
324 %dir %{__prefix}/src/redhat/SPECS
325 %dir %{__prefix}/src/redhat/SOURCES
326 %dir %{__prefix}/src/redhat/SRPMS
327 %dir %{__prefix}/src/redhat/RPMS
328 %{__prefix}/src/redhat/RPMS/*
329 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/bin/rpmbuild
330 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/brp-*
331 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/check-prereqs
332 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/cpanflute
333 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/find-lang.sh
334 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/find-prov.pl
335 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/find-provides
336 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/find-provides.perl
337 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/find-req.pl
338 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/find-requires
339 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/find-requires.perl
340 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/get_magic.pl
341 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/getpo.sh
342 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/http.req
343 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/javadeps
344 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/magic.prov
345 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/magic.req
346 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/perl.prov
347 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/perl.req
348 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/rpm[bt]
349 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/rpmdiff
350 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/rpmdiff.cgi
351 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/u_pkg.sh
352 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/vpkg-provides.sh
353 %attr(0755, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/vpkg-provides2.sh
355 %if %{with_python_subpackage}
357 %defattr(-,root,root)
358 %{__prefix}/lib/python1.5/site-packages/rpmmodule.so
362 %defattr(-,root,root)
364 %doc @WITH_APIDOCS_TARGET@
366 %{__prefix}/include/rpm
367 %{__prefix}/lib/librpm.a
368 %{__prefix}/lib/librpm.la
369 %{__prefix}/lib/librpm.so
370 %{__prefix}/lib/librpmdb.a
371 %{__prefix}/lib/librpmdb.la
372 %{__prefix}/lib/librpmdb.so
373 %{__prefix}/lib/librpmio.a
374 %{__prefix}/lib/librpmio.la
375 %{__prefix}/lib/librpmio.so
376 %{__prefix}/lib/librpmbuild.a
377 %{__prefix}/lib/librpmbuild.la
378 %{__prefix}/lib/librpmbuild.so
381 %defattr(-,root,root)
382 %{__prefix}/lib/libpopt.so.*
383 %{__prefix}%{__share}/man/man3/popt.3*
384 %lang(cs) %{__prefix}/*/locale/cs/LC_MESSAGES/popt.mo
385 %lang(da) %{__prefix}/*/locale/da/LC_MESSAGES/popt.mo
386 %lang(gl) %{__prefix}/*/locale/gl/LC_MESSAGES/popt.mo
387 %lang(hu) %{__prefix}/*/locale/hu/LC_MESSAGES/popt.mo
388 %lang(is) %{__prefix}/*/locale/is/LC_MESSAGES/popt.mo
389 %lang(no) %{__prefix}/*/locale/no/LC_MESSAGES/popt.mo
390 %lang(pt) %{__prefix}/*/locale/pt/LC_MESSAGES/popt.mo
391 %lang(ro) %{__prefix}/*/locale/ro/LC_MESSAGES/popt.mo
392 %lang(ru) %{__prefix}/*/locale/ru/LC_MESSAGES/popt.mo
393 %lang(sk) %{__prefix}/*/locale/sk/LC_MESSAGES/popt.mo
394 %lang(sl) %{__prefix}/*/locale/sl/LC_MESSAGES/popt.mo
395 %lang(sv) %{__prefix}/*/locale/sv/LC_MESSAGES/popt.mo
396 %lang(tr) %{__prefix}/*/locale/tr/LC_MESSAGES/popt.mo
397 %lang(uk) %{__prefix}/*/locale/uk/LC_MESSAGES/popt.mo
398 %lang(wa) %{__prefix}/*/locale/wa/LC_MESSAGES/popt.mo
399 %lang(zh_CN) %{__prefix}/*/locale/zh_CN.GB2312/LC_MESSAGES/popt.mo
401 # XXX These may end up in popt-devel but it hardly seems worth the effort now.
402 %{__prefix}/lib/libpopt.a
403 %{__prefix}/lib/libpopt.la
404 %{__prefix}/lib/libpopt.so
405 %{__prefix}/include/popt.h
408 * Mon Feb 19 2001 Jeff Johnson <jbj@redhat.com>
409 - start rpm-4.0.3 with --repackage.