1 |
tmb |
343 |
# Do not change this spec directly but in the svn |
2 |
|
|
# $Id: rpm.spec 134789 2007-03-27 15:13:43Z nanardon $ |
3 |
|
|
|
4 |
|
|
%define lib64arches x86_64 ppc64 sparc64 |
5 |
|
|
|
6 |
|
|
%ifarch %lib64arches |
7 |
|
|
%define _lib lib64 |
8 |
|
|
%else |
9 |
|
|
%define _lib lib |
10 |
|
|
%endif |
11 |
|
|
|
12 |
|
|
%define _prefix /usr |
13 |
|
|
%define _libdir %_prefix/%_lib |
14 |
|
|
%define _bindir %_prefix/bin |
15 |
|
|
%define _sysconfdir /etc |
16 |
|
|
%define _datadir /usr/share |
17 |
|
|
%define _defaultdocdir %_datadir/doc |
18 |
|
|
%define _localstatedir /var |
19 |
|
|
%define _infodir %_datadir/info |
20 |
|
|
|
21 |
|
|
%if %{?apply_patches:0}%{?!apply_patches:1} |
22 |
|
|
%define apply_patches %(for p in `grep '^Patch.*:' "%{_specdir}/rpm.spec" | cut -d':' -f2-`; do echo "patch -p1 -F0 -i %{_sourcedir}/$p"; done ) |
23 |
|
|
%endif |
24 |
|
|
|
25 |
|
|
# Define directory which holds rpm config files, and some binaries actually |
26 |
|
|
# NOTE: it remains */lib even on lib64 platforms as only one version |
27 |
|
|
# of rpm is supported anyway, per architecture |
28 |
|
|
%define rpmdir %{_prefix}/lib/rpm |
29 |
|
|
|
30 |
|
|
%if %{?mklibname:0}%{?!mklibname:1} |
31 |
|
|
%define mklibname(ds) %{_lib}%{1}%{?2:%{2}}%{?3:_%{3}}%{-s:-static}%{-d:-devel} |
32 |
|
|
%endif |
33 |
|
|
|
34 |
blino |
3664 |
%define lc_distro %(echo %{distribution} | tr "A-Z" "a-z") |
35 |
blino |
3615 |
|
36 |
tmb |
343 |
%if %{?distsuffix:0}%{?!distsuffix:1} |
37 |
tmb |
345 |
%define distsuffix .mga |
38 |
tmb |
343 |
%endif |
39 |
|
|
|
40 |
|
|
%if %{?mkrel:0}%{?!mkrel:1} |
41 |
tmb |
345 |
%define mkrel(c:) %{-c: 0.%{-c*}.}%{1}%{?distsuffix:%distsuffix}%{?!distsuffix:.mga}%{?mageia_release:%mageia_release}%{?subrel:.%subrel} |
42 |
tmb |
343 |
%endif |
43 |
|
|
|
44 |
|
|
%if %{?mips:0}%{?!mips:1} |
45 |
|
|
%define mips mips mipsel mips32 mips32el mips64 mips64el |
46 |
|
|
%endif |
47 |
|
|
|
48 |
|
|
%if %{?pyver:0}%{?!pyver:1} |
49 |
|
|
%define pyver %(python -V 2>&1 | cut -f2 -d" " | cut -f1,2 -d".") |
50 |
|
|
%endif |
51 |
|
|
|
52 |
blino |
3615 |
%define __find_requires %{rpmdir}/%{lc_distro}/find-requires %{?buildroot:%{buildroot}} %{?_target_cpu:%{_target_cpu}} |
53 |
|
|
%define __find_provides %{rpmdir}/%{lc_distro}/find-provides |
54 |
tmb |
343 |
|
55 |
|
|
%define rpmversion 4.6.1 |
56 |
|
|
%define srcver %rpmversion |
57 |
|
|
%define libver 4.6 |
58 |
blino |
20921 |
%define release %mkrel 8 |
59 |
tmb |
345 |
%define librpmname %mklibname rpm %{libver} |
60 |
|
|
%define librpmnamedevel %mklibname -d rpm |
61 |
tmb |
343 |
|
62 |
|
|
%define buildpython 1 |
63 |
|
|
|
64 |
|
|
%define rpmsetup_version 1.34 |
65 |
|
|
|
66 |
|
|
%define builddebug 0 |
67 |
|
|
%{?_with_debug:%define builddebug 1} |
68 |
|
|
|
69 |
|
|
%{?_with_python:%define buildpython 1} |
70 |
|
|
%{?_without_python:%define buildpython 0} |
71 |
|
|
|
72 |
|
|
Summary: The RPM package management system |
73 |
|
|
Name: rpm |
74 |
|
|
Epoch: 1 |
75 |
|
|
Version: %{rpmversion} |
76 |
|
|
Release: %{release} |
77 |
|
|
Group: System/Configuration/Packaging |
78 |
|
|
|
79 |
|
|
Source: http://www.rpm.org/releases/rpm-%{libver}.x/rpm-%{srcver}.tar.bz2 |
80 |
|
|
|
81 |
|
|
# Add some undocumented feature to gendiff |
82 |
|
|
Patch17: rpm-4.4.2.2-gendiff-improved.patch |
83 |
|
|
|
84 |
|
|
# if %post of foo-2 fails, |
85 |
|
|
# or if %preun of foo-1 fails, |
86 |
|
|
# or if %postun of foo-1 fails, |
87 |
|
|
# => foo-1 is not removed, so we end up with both packages in rpmdb |
88 |
|
|
# this patch makes rpm ignore the error in those cases |
89 |
|
|
# failing %pre must still make the rpm install fail (#23677) |
90 |
|
|
# |
91 |
|
|
# (nb: the exit code for pretrans/posttrans & trigger/triggerun/triggerpostun |
92 |
|
|
# scripts is ignored with or without this patch) |
93 |
|
|
Patch22: rpm-4.6.0-rc1-non-pre-scripts-dont-fail.patch |
94 |
|
|
|
95 |
|
|
# (fredl) add loging facilities through syslog |
96 |
|
|
Patch31: rpm-4.6.0-rc1-syslog.patch |
97 |
|
|
|
98 |
|
|
# part of Backport from 4.2.1 provides becoming obsoletes bug (fpons) |
99 |
|
|
# (is it still needed?) |
100 |
|
|
Patch49: rpm-4.6.0-rc1-provides-obsoleted.patch |
101 |
|
|
|
102 |
|
|
# - force /usr/lib/rpm/manbo/rpmrc instead of /usr/lib/rpm/<vendor>/rpmrc |
103 |
|
|
# - read /usr/lib/rpm/manbo/rpmpopt (not only /usr/lib/rpm/rpmpopt) |
104 |
|
|
Patch64: rpm-4.6.0-rc2-manbo-rpmrc-rpmpopt.patch |
105 |
|
|
|
106 |
|
|
# In original rpm, -bb --short-circuit does not work and run all stage |
107 |
|
|
# From popular request, we allow to do this |
108 |
|
|
# http://qa.mandriva.com/show_bug.cgi?id=15896 |
109 |
|
|
Patch70: rpm-4.6.0-rc1-bb-shortcircuit.patch |
110 |
|
|
|
111 |
|
|
# http://www.redhat.com/archives/rpm-list/2005-April/msg00131.html |
112 |
|
|
# http://www.redhat.com/archives/rpm-list/2005-April/msg00132.html |
113 |
|
|
# is this useful? "at least erasure ordering is just as non-existent as it was in 4.4.x" says Panu |
114 |
|
|
Patch71: rpm-4.6.0-ordererase.patch |
115 |
|
|
|
116 |
|
|
# don't conflict for doc files |
117 |
|
|
# (to be able to install lib*-devel together with lib64*-devel even if they have conflicting manpages) |
118 |
|
|
Patch83: rpm-4.6.0-no-doc-conflicts.patch |
119 |
|
|
|
120 |
|
|
# Fix http://qa.mandriva.com/show_bug.cgi?id=19392 |
121 |
|
|
# (is this working??) |
122 |
|
|
Patch84: rpm-4.4.2.2-rpmqv-ghost.patch |
123 |
|
|
|
124 |
|
|
# Fix diff issue when buildroot contains some "//" |
125 |
|
|
Patch111: rpm-check-file-trim-double-slash-in-buildroot.patch |
126 |
|
|
|
127 |
|
|
# [Dec 2008] macrofiles from rpmrc does not overrides MACROFILES anymore |
128 |
|
|
Patch114: rpm-4.6.0-rc1-read-macros_d-dot-macros.patch |
129 |
|
|
|
130 |
|
|
# remove unused skipDir functionality that conflicts with patch124 below |
131 |
|
|
Patch1124: rpm-4.6.0-rc1-revert-unused-skipDir-functionality.patch |
132 |
|
|
|
133 |
|
|
# [pixel] without this patch, "rpm -e" or "rpm -U" will need to stat(2) every dirnames of |
134 |
|
|
# files from the package (eg COPYING) in the db. This is quite costly when not in cache |
135 |
|
|
# (eg on a test here: >300 stats, and so 3 seconds after a "echo 3 > /proc/sys/vm/drop_caches") |
136 |
|
|
# this breaks urpmi test case test_rpm_i_fail('gd') in superuser--file-conflicts.t, |
137 |
|
|
# but this is bad design anyway |
138 |
|
|
Patch124: rpm-4.6.0-rc1-speedup-by-not-checking-same-files-with-different-paths-through-symlink.patch |
139 |
|
|
|
140 |
|
|
# [from SuSE] handle "Suggests" via RPMTAG_SUGGESTSNAME |
141 |
|
|
Patch133: rpm-4.6.0-rc1-weakdeps.patch |
142 |
|
|
|
143 |
|
|
# convert data in the header to a specific encoding which used in the selected locale. |
144 |
|
|
Patch137: rpm-4.6.0-rc1-headerIconv.patch |
145 |
|
|
|
146 |
|
|
Patch140: rpm-russian-translation.patch |
147 |
|
|
|
148 |
|
|
# Mandriva does not need the (broken) ldconfig hack since it uses filetriggers |
149 |
|
|
Patch141: rpm-4.6.0-rc1-drop-skipping-ldconfig-hack.patch |
150 |
|
|
|
151 |
|
|
# without this patch, "#%define foo bar" is surprisingly equivalent to "%define foo bar" |
152 |
|
|
# with this patch, "#%define foo bar" is a fatal error |
153 |
|
|
Patch145: rpm-forbid-badly-commented-define-in-spec.patch |
154 |
|
|
|
155 |
|
|
# cf http://wiki.mandriva.com/en/Rpm_filetriggers |
156 |
|
|
Patch146: rpm-4.6.0-rc1-filetriggers.patch |
157 |
|
|
|
158 |
|
|
# add two fatal errors (during package build) |
159 |
|
|
Patch147: rpm-rpmbuild-check-useless-tags-in-non-existant-binary-packages.patch |
160 |
|
|
|
161 |
|
|
# (nb: see the patch for more info about this issue) |
162 |
|
|
Patch151: rpm-4.6.0-rc1-protect-against-non-robust-futex.patch |
163 |
|
|
|
164 |
|
|
Patch152: rpm-4.6.0-rc1-fix-nss-detection.patch |
165 |
|
|
|
166 |
|
|
Patch157: introduce-_after_setup-which-is-called-after-setup.patch |
167 |
|
|
Patch158: introduce-_patch-and-allow-easy-override-when-the-p.patch |
168 |
|
|
Patch159: introduce-apply_patches-and-lua-var-patches_num.patch |
169 |
|
|
|
170 |
|
|
# fixes backported from 4.7.1, see patch files for full changelog entries |
171 |
|
|
# fixes ignored Requires(pre) and (post) when they have a plain Requires counterpart |
172 |
|
|
Patch161: rpm-fix-corequisites.patch |
173 |
|
|
Patch162: rpm-fix-islegacyprereq.patch |
174 |
|
|
# map PreReq into Requires(pre,preun) at build |
175 |
|
|
Patch163: rpm-map-prereq.patch |
176 |
|
|
|
177 |
|
|
# avoid "canonicalization unexpectedly shrank by one character" error from |
178 |
|
|
# debugedit by adding '/' to the end of the string when the error would be |
179 |
|
|
# triggered |
180 |
|
|
# see https://bugzilla.redhat.com/show_bug.cgi?id=304121 and |
181 |
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=482903 |
182 |
|
|
|
183 |
|
|
Patch164: rpm-4.6.1-updated-debugedit-for-debug_pubtypes-section.patch |
184 |
|
|
Patch165: rpm-4.6.0-fix-debugedit-canonicalization-error.patch |
185 |
|
|
|
186 |
|
|
#Patch1001: rpm-4.6.0-rc1-new-liblzma.patch |
187 |
|
|
|
188 |
|
|
# default behaviour in rpm-jbj >= 4.4.6 |
189 |
|
|
Patch1005: rpm-allow-conflicting-ghost-files.patch |
190 |
|
|
|
191 |
|
|
# (nb: see the patch for more info about this issue) |
192 |
|
|
Patch1006: rpm-4.6.0-rc1-compat-PayloadIsLzma.patch |
193 |
|
|
|
194 |
|
|
Patch1007: rpm-4.6.0-rc3-xz-support.patch |
195 |
|
|
|
196 |
|
|
# Prevents $DOCDIR from being wiped out when using %%doc <fileinbuilddir>, |
197 |
|
|
# as this breaks stuff that installs files to $DOCDIR during %%install |
198 |
|
|
Patch1008: rpm-4.6.0-rc3-no_rm_-rf_DOCDIR.patch |
199 |
|
|
|
200 |
|
|
# Exposes packagecolor tag and adds new tags from rpm5 as it otherwise will |
201 |
|
|
# break when these unknown tags might be found in the rpmdb. Notice that this |
202 |
|
|
# will only make rpm recognize these, not implement actual support for them.. |
203 |
|
|
Patch1009: rpm-4.6.0-rpm5-tags.patch |
204 |
|
|
|
205 |
|
|
# Avoid adding Lua sources/patches twice when recursing. (backport from upstream git) |
206 |
|
|
Patch1010: rpm-4.6.0-lua-add-sources-and-patches-only-once.patch |
207 |
|
|
|
208 |
|
|
# Check chroot return code before running lua script |
209 |
|
|
Patch1011: rpm-4.6.0-do-not-run-lua-scripts-when-chroot-fails.patch |
210 |
|
|
|
211 |
|
|
# Check chroot return code before running external script |
212 |
|
|
Patch1012: rpm-4.6.0-do-not-run-scripts-when-chroot-fails.patch |
213 |
|
|
|
214 |
|
|
# Make sure files in debug packages have good default perms, fixes bug #57758 |
215 |
|
|
Patch1013: rpm-4.6.0-fix-debug-info-default-permissions.patch |
216 |
|
|
|
217 |
|
|
# Remove BDB XA support to fix compilation with db 4.8 (upstream) |
218 |
|
|
Patch1014: rpm-4.6.0-bdb-xa-removal.patch |
219 |
|
|
|
220 |
|
|
# Refuse to build a rpm with 2 identical triggers (#60699) |
221 |
|
|
#Patch1015: rpm-4.6.0-duplicate-triggers.patch |
222 |
|
|
|
223 |
|
|
# fix %exclude behaviour to only exclude files from a specific package, not |
224 |
|
|
# from adding the files to list of files that's not unpackaged. |
225 |
|
|
# Reintroduces past behaviour as with rpm 4.4.8 & enforces compatibility with |
226 |
|
|
# rpm5.org |
227 |
|
|
Patch1016: rpm-4.6.0-dont-add-excluded-files-to-check_fileList.patch |
228 |
|
|
|
229 |
|
|
# make rpmvercmp handle missing values and make versioned conflicts behave |
230 |
|
|
# consistently with requires. (#55810) |
231 |
|
|
Patch1017: rpm-4.6.0-rpmvercmp-handle-missing-values.patch |
232 |
|
|
|
233 |
|
|
# Automatically handle ruby gem extraction in %setup |
234 |
|
|
PAtch1018: rpm-4.6.1-setup-rubygems.patch |
235 |
|
|
|
236 |
|
|
# Turbolinux patches |
237 |
|
|
# add writeHeaderListTofile function into rpm-python (needed by "buildman" build system) (Toshihiro, 2003) |
238 |
|
|
Patch2002: rpm-4.6.0-rc1-python-writeHdlist.patch |
239 |
|
|
# Crusoe CPUs say that their CPU family is "5" but they have enough features for i686. |
240 |
|
|
Patch2003: rpm-4.4.2.3-rc1-transmeta-crusoe-is-686.patch |
241 |
|
|
|
242 |
|
|
# The following patch isn't needed for Mandriva, but Turbolinux has it and it can't hurt much |
243 |
|
|
# |
244 |
|
|
# This patch fixes the problem when the post-scripts launched by rpm-build. |
245 |
|
|
# The post-scripts launched by rpm-build works in LANG environment. If LANG is |
246 |
|
|
# other locale except C, then some commands launched by post-scripts will not |
247 |
|
|
# display characters which you expected. |
248 |
|
|
Patch2005: rpm-4.6.0-rc1-buildlang.patch |
249 |
|
|
|
250 |
|
|
Patch3000: mips_macros.patch |
251 |
|
|
Patch3001: fix_stack_protector_check.patch |
252 |
|
|
Patch3002: rpm-4.6.1-mips_define_isa_macros.patch |
253 |
|
|
Patch3003: rpm-4.6.1-arm_mips_isa_macros.patch |
254 |
|
|
Patch3004: rpm_add_armv5tl.patch |
255 |
|
|
|
256 |
|
|
License: GPL |
257 |
|
|
BuildRequires: autoconf >= 2.57 |
258 |
|
|
BuildRequires: zlib-devel |
259 |
|
|
BuildRequires: bzip2-devel |
260 |
|
|
BuildRequires: liblzma-devel >= 4.999.6-0.alpha.5 |
261 |
|
|
BuildRequires: automake >= 1.8 |
262 |
|
|
BuildRequires: elfutils-devel |
263 |
|
|
BuildRequires: sed >= 4.0.3 |
264 |
|
|
BuildRequires: libbeecrypt-devel |
265 |
|
|
BuildRequires: ed, gettext-devel |
266 |
|
|
BuildRequires: libsqlite3-devel |
267 |
|
|
BuildRequires: db4.8-devel |
268 |
|
|
BuildRequires: neon-devel |
269 |
|
|
BuildRequires: popt-devel |
270 |
|
|
BuildRequires: nss-devel |
271 |
|
|
BuildRequires: magic-devel |
272 |
blino |
3615 |
BuildRequires: rpm-%{lc_distro}-setup-build %{?rpmsetup_version:>= %{rpmsetup_version}} |
273 |
tmb |
343 |
BuildRequires: readline-devel |
274 |
|
|
BuildRequires: ncurses-devel |
275 |
|
|
BuildRequires: openssl-devel >= 0.9.8 |
276 |
|
|
BuildRequires: lua-devel |
277 |
|
|
# Need for doc |
278 |
|
|
#BuildRequires: graphviz |
279 |
|
|
BuildRequires: tetex |
280 |
|
|
%if %buildpython |
281 |
|
|
BuildRequires: python-devel |
282 |
|
|
%endif |
283 |
|
|
|
284 |
|
|
Requires: bzip2 >= 0.9.0c-2 |
285 |
|
|
Requires: lzma |
286 |
|
|
Requires: cpio |
287 |
|
|
Requires: gawk |
288 |
|
|
Requires: glibc >= 2.1.92 |
289 |
|
|
Requires: mktemp |
290 |
tmb |
345 |
Requires: setup >= 2.2.0-8 |
291 |
blino |
3615 |
Requires: rpm-%{lc_distro}-setup >= 1.85 |
292 |
tmb |
343 |
Requires: update-alternatives |
293 |
|
|
Requires: %librpmname = %epoch:%version-%release |
294 |
|
|
Conflicts: patch < 2.5 |
295 |
tmb |
345 |
Conflicts: menu < 2.1.5-29 |
296 |
tmb |
343 |
Conflicts: locales < 2.3.1.1 |
297 |
tmb |
345 |
Conflicts: man-pages-fr < 0.9.7-16 |
298 |
|
|
Conflicts: man-pages-pl < 0.4-9 |
299 |
|
|
Conflicts: perl-URPM < 1.63-3 |
300 |
tmb |
343 |
# rpm 4.6.0 dropped support for --repackage, so urpmi-recover can not work anymore: |
301 |
|
|
Conflicts: urpmi-recover |
302 |
|
|
URL: http://rpm.org/ |
303 |
|
|
%define git_url http://rpm.org/git/rpm.git |
304 |
|
|
Requires(pre): rpm-helper >= 0.8 |
305 |
|
|
Requires(pre): coreutils |
306 |
|
|
Requires(postun): rpm-helper >= 0.8 |
307 |
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
308 |
|
|
|
309 |
|
|
%description |
310 |
|
|
RPM is a powerful command line driven package management system capable of |
311 |
|
|
installing, uninstalling, verifying, querying, and updating software packages. |
312 |
|
|
Each software package consists of an archive of files along with information |
313 |
|
|
about the package like its version, a description, etc. |
314 |
|
|
|
315 |
|
|
%package -n %librpmname |
316 |
tmb |
345 |
Summary: Library used by rpm |
317 |
|
|
Group: System/Libraries |
318 |
|
|
Provides: librpm = %version-%release |
319 |
tmb |
343 |
|
320 |
|
|
%description -n %librpmname |
321 |
|
|
RPM is a powerful command line driven package management system capable of |
322 |
|
|
installing, uninstalling, verifying, querying, and updating software packages. |
323 |
|
|
This package contains common files to all applications based on rpm. |
324 |
|
|
|
325 |
|
|
%package -n %librpmnamedevel |
326 |
|
|
Summary: Development files for applications which will manipulate RPM packages |
327 |
|
|
Group: Development/C |
328 |
|
|
Requires: rpm = %epoch:%{version}-%{release} |
329 |
|
|
Provides: librpm-devel = %version-%release |
330 |
|
|
Provides: rpm-devel = %version-%release |
331 |
|
|
Obsoletes: rpm-devel < 4.4.1 |
332 |
|
|
Obsoletes: %{_lib}rpm4.4-devel |
333 |
|
|
Obsoletes: %{_lib}rpm4.2-devel |
334 |
|
|
|
335 |
|
|
%description -n %librpmnamedevel |
336 |
|
|
This package contains the RPM C library and header files. These |
337 |
|
|
development files will simplify the process of writing programs |
338 |
|
|
which manipulate RPM packages and databases and are intended to make |
339 |
|
|
it easier to create graphical package managers or any other tools |
340 |
|
|
that need an intimate knowledge of RPM packages in order to function. |
341 |
|
|
|
342 |
|
|
This package should be installed if you want to develop programs that |
343 |
|
|
will manipulate RPM packages and databases. |
344 |
|
|
|
345 |
|
|
%package build |
346 |
|
|
Summary: Scripts and executable programs used to build packages |
347 |
|
|
Group: System/Configuration/Packaging |
348 |
|
|
Requires: autoconf |
349 |
|
|
Requires: automake |
350 |
|
|
Requires: file |
351 |
|
|
Requires: gcc-c++ |
352 |
|
|
# We need cputoolize & amd64-* alias to x86_64-* in config.sub |
353 |
tmb |
345 |
Requires: libtool-base >= 1.4.3-5 |
354 |
|
|
Requires: patch >= 2.5.9-7 |
355 |
tmb |
343 |
Requires: make |
356 |
|
|
Requires: tar |
357 |
|
|
Requires: unzip |
358 |
|
|
Requires: elfutils |
359 |
|
|
Requires: rpm = %epoch:%{version}-%{release} |
360 |
blino |
3615 |
Requires: rpm-%{lc_distro}-setup-build %{?rpmsetup_version:>= %{rpmsetup_version}} |
361 |
tmb |
343 |
|
362 |
|
|
%description build |
363 |
|
|
This package contains scripts and executable programs that are used to |
364 |
|
|
build packages using RPM. |
365 |
|
|
|
366 |
|
|
%if %buildpython |
367 |
|
|
%package -n python-rpm |
368 |
|
|
Summary: Python bindings for apps which will manipulate RPM packages |
369 |
|
|
Group: Development/Python |
370 |
|
|
Requires: python >= %{pyver} |
371 |
|
|
Requires: rpm = %epoch:%{version}-%{release} |
372 |
tmb |
345 |
Obsoletes: rpm-python < %epoch:%version-%release |
373 |
|
|
Provides: rpm-python = %version-%release |
374 |
tmb |
343 |
|
375 |
|
|
%description -n python-rpm |
376 |
|
|
The rpm-python package contains a module which permits applications |
377 |
|
|
written in the Python programming language to use the interface |
378 |
|
|
supplied by RPM (RPM Package Manager) libraries. |
379 |
|
|
|
380 |
|
|
This package should be installed if you want to develop Python |
381 |
|
|
programs that will manipulate RPM packages and databases. |
382 |
|
|
%endif |
383 |
|
|
|
384 |
|
|
%prep |
385 |
|
|
%setup -q -n %name-%srcver |
386 |
|
|
%apply_patches |
387 |
|
|
|
388 |
|
|
%build |
389 |
|
|
|
390 |
|
|
autoreconf |
391 |
|
|
|
392 |
|
|
%if %builddebug |
393 |
|
|
RPM_OPT_FLAGS=-g |
394 |
|
|
%endif |
395 |
|
|
CFLAGS="$RPM_OPT_FLAGS -fPIC" CXXFLAGS="$RPM_OPT_FLAGS -fPIC" \ |
396 |
|
|
%configure \ |
397 |
|
|
--enable-nls \ |
398 |
|
|
--enable-python \ |
399 |
|
|
--enable-sqlite3 \ |
400 |
|
|
--without-javaglue \ |
401 |
|
|
%if %builddebug |
402 |
|
|
--enable-debug \ |
403 |
|
|
%endif |
404 |
|
|
--with-external-db \ |
405 |
|
|
%if %buildpython |
406 |
|
|
--with-python=%{pyver} \ |
407 |
|
|
%else |
408 |
|
|
--without-python \ |
409 |
|
|
%endif |
410 |
|
|
--with-glob \ |
411 |
|
|
--without-selinux \ |
412 |
|
|
--without-apidocs |
413 |
|
|
|
414 |
|
|
%make |
415 |
|
|
|
416 |
|
|
%install |
417 |
|
|
rm -rf $RPM_BUILD_ROOT |
418 |
|
|
|
419 |
|
|
make DESTDIR=%buildroot install |
420 |
|
|
|
421 |
|
|
%ifarch ppc powerpc |
422 |
blino |
3615 |
ln -sf ppc-%{lc_distro}-linux $RPM_BUILD_ROOT%{rpmdir}/powerpc-%{lc_distro}-linux |
423 |
tmb |
343 |
%endif |
424 |
|
|
|
425 |
|
|
#mv -f $RPM_BUILD_ROOT/%{rpmdir}/rpmdiff $RPM_BUILD_ROOT/%{_bindir} |
426 |
|
|
|
427 |
|
|
# Save list of packages through cron |
428 |
|
|
mkdir -p ${RPM_BUILD_ROOT}/etc/cron.daily |
429 |
|
|
install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}/etc/cron.daily/rpm |
430 |
|
|
|
431 |
|
|
mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d |
432 |
|
|
install -m 644 scripts/rpm.log ${RPM_BUILD_ROOT}/etc/logrotate.d/rpm |
433 |
|
|
|
434 |
|
|
mkdir -p $RPM_BUILD_ROOT/var/lib/rpm |
435 |
|
|
for dbi in \ |
436 |
|
|
Basenames Conflictname Dirnames Group Installtid Name Providename \ |
437 |
|
|
Provideversion Removetid Requirename Requireversion Triggername \ |
438 |
|
|
Packages __db.001 __db.002 __db.003 __db.004 |
439 |
|
|
do |
440 |
|
|
touch $RPM_BUILD_ROOT/var/lib/rpm/$dbi |
441 |
|
|
done |
442 |
|
|
|
443 |
|
|
test -d doc-copy || mkdir doc-copy |
444 |
|
|
rm -rf doc-copy/* |
445 |
|
|
ln -f doc/manual/* doc-copy/ |
446 |
|
|
rm -f doc-copy/Makefile* |
447 |
|
|
|
448 |
|
|
mkdir -p $RPM_BUILD_ROOT/var/spool/repackage |
449 |
|
|
|
450 |
|
|
mkdir -p %buildroot%_sysconfdir/rpm/macros.d |
451 |
|
|
cat > %buildroot%_sysconfdir/rpm/macros <<EOF |
452 |
|
|
# Put your own system macros here |
453 |
|
|
# usually contains |
454 |
|
|
|
455 |
|
|
# Set this one according your locales |
456 |
|
|
# %%_install_langs |
457 |
|
|
|
458 |
|
|
EOF |
459 |
|
|
|
460 |
|
|
# Get rid of unpackaged files |
461 |
|
|
(cd $RPM_BUILD_ROOT; |
462 |
|
|
rm -rf .%{_includedir}/beecrypt/ |
463 |
|
|
rm -f .%{_libdir}/libbeecrypt.{a,la,so*} |
464 |
|
|
rm -f .%{_libdir}/python*/site-packages/rpmmodule.{a,la} |
465 |
|
|
rm -f .%{rpmdir}/{Specfile.pm,cpanflute2,cpanflute,sql.prov,sql.req,tcl.req} |
466 |
|
|
rm -f .%{rpmdir}/{config.site,cross-build,rpmdiff.cgi} |
467 |
|
|
rm -f .%{rpmdir}/trpm |
468 |
|
|
rm -f .%{_bindir}/rpmdiff |
469 |
|
|
) |
470 |
|
|
|
471 |
|
|
%{rpmdir}/%{_host_vendor}/find-lang.pl $RPM_BUILD_ROOT %{name} |
472 |
|
|
|
473 |
|
|
%clean |
474 |
|
|
rm -rf $RPM_BUILD_ROOT |
475 |
|
|
|
476 |
|
|
%pre |
477 |
|
|
if [ -f /var/lib/rpm/Packages -a -f /var/lib/rpm/packages.rpm ]; then |
478 |
|
|
echo " |
479 |
|
|
You have both |
480 |
|
|
/var/lib/rpm/packages.rpm db1 format installed package headers |
481 |
|
|
/var/lib/rpm/Packages db3 format installed package headers |
482 |
|
|
Please remove (or at least rename) one of those files, and re-install. |
483 |
|
|
" |
484 |
|
|
exit 1 |
485 |
|
|
fi |
486 |
|
|
|
487 |
|
|
/usr/share/rpm-helper/add-user rpm $1 rpm /var/lib/rpm /bin/false |
488 |
|
|
|
489 |
|
|
rm -rf /usr/lib/rpm/*-mandrake-* |
490 |
blino |
3615 |
rm -rf /usr/lib/rpm/*-%{lc_distro}-* |
491 |
tmb |
343 |
|
492 |
tmb |
345 |
|
493 |
tmb |
343 |
%post |
494 |
|
|
# nuke __db.00? when updating to this rpm |
495 |
|
|
rm -f /var/lib/rpm/__db.00? |
496 |
|
|
|
497 |
|
|
if [ ! -e /etc/rpm/macros -a -e /etc/rpmrc -a -f %{rpmdir}/convertrpmrc.sh ] |
498 |
|
|
then |
499 |
|
|
sh %{rpmdir}/convertrpmrc.sh 2>&1 > /dev/null |
500 |
|
|
fi |
501 |
|
|
|
502 |
|
|
if [ -f /var/lib/rpm/packages.rpm ]; then |
503 |
|
|
/bin/chown rpm.rpm /var/lib/rpm/*.rpm |
504 |
|
|
elif [ ! -f /var/lib/rpm/Packages ]; then |
505 |
|
|
/bin/rpm --initdb |
506 |
|
|
fi |
507 |
|
|
|
508 |
|
|
%postun |
509 |
|
|
/usr/share/rpm-helper/del-user rpm $1 rpm |
510 |
|
|
|
511 |
|
|
%triggerpostun -- rpm < 1:4.4.2.3-11 |
512 |
|
|
if [ -f /etc/rpm/macros.cdb.rpmsave ]; then |
513 |
|
|
echo "warning: restoring /etc/rpm/macros.cdb from macros.cdb.rpmsave, please check you really need the changes" |
514 |
|
|
mv /etc/rpm/macros.cdb.rpmsave /etc/rpm/macros.cdb |
515 |
|
|
fi |
516 |
|
|
|
517 |
|
|
%define rpmattr %attr(0755, rpm, rpm) |
518 |
|
|
|
519 |
|
|
%files -f %{name}.lang |
520 |
|
|
%defattr(-,root,root) |
521 |
|
|
%doc GROUPS CHANGES doc/manual/[a-z]* |
522 |
|
|
%attr(0755,rpm,rpm) /bin/rpm |
523 |
|
|
%attr(0755, rpm, rpm) %{_bindir}/rpm2cpio |
524 |
|
|
%attr(0755, rpm, rpm) %{_bindir}/gendiff |
525 |
|
|
%attr(0755, rpm, rpm) %{_bindir}/rpmdb |
526 |
|
|
%attr(0755, rpm, rpm) %{_bindir}/rpmgraph |
527 |
|
|
%attr(0755, rpm, rpm) %{_bindir}/rpmsign |
528 |
|
|
%attr(0755, rpm, rpm) %{_bindir}/rpmquery |
529 |
|
|
%attr(0755, rpm, rpm) %{_bindir}/rpmverify |
530 |
|
|
|
531 |
|
|
%dir %{_localstatedir}/spool/repackage |
532 |
|
|
%dir %{rpmdir} |
533 |
|
|
%dir /etc/rpm |
534 |
|
|
%config(noreplace) /etc/rpm/macros |
535 |
|
|
%dir /etc/rpm/macros.d |
536 |
|
|
%attr(0755, rpm, rpm) %{rpmdir}/config.guess |
537 |
|
|
%attr(0755, rpm, rpm) %{rpmdir}/config.sub |
538 |
|
|
#%attr(0755, rpm, rpm) %{rpmdir}/convertrpmrc.sh |
539 |
|
|
%attr(0755, rpm, rpm) %{rpmdir}/rpmdb_* |
540 |
|
|
%attr(0644, rpm, rpm) %{rpmdir}/macros |
541 |
|
|
%attr(0755, rpm, rpm) %{rpmdir}/mkinstalldirs |
542 |
|
|
%attr(0755, rpm, rpm) %{rpmdir}/rpm.* |
543 |
|
|
%attr(0644, rpm, rpm) %{rpmdir}/rpmpopt* |
544 |
|
|
%attr(0644, rpm, rpm) %{rpmdir}/rpmrc |
545 |
|
|
|
546 |
|
|
%rpmattr %{rpmdir}/rpm2cpio.sh |
547 |
|
|
%rpmattr %{rpmdir}/tgpg |
548 |
|
|
|
549 |
|
|
%dir %attr( -, rpm, rpm) %{rpmdir}/platform/ |
550 |
|
|
%ifarch %{ix86} x86_64 |
551 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/i*86-* |
552 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/athlon-* |
553 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/pentium*-* |
554 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/geode-* |
555 |
|
|
%endif |
556 |
|
|
%ifarch alpha |
557 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/alpha* |
558 |
|
|
%endif |
559 |
|
|
%ifarch %{sunsparc} |
560 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/sparc* |
561 |
|
|
%endif |
562 |
|
|
%ifarch ppc powerpc |
563 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/ppc-* |
564 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/ppc32-* |
565 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/ppc64-* |
566 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/powerpc-* |
567 |
|
|
%endif |
568 |
|
|
%ifarch ppc powerpc ppc64 |
569 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/ppc*series-* |
570 |
|
|
%endif |
571 |
|
|
%ifarch ppc64 |
572 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/ppc-* |
573 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/ppc32-* |
574 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/ppc64-* |
575 |
|
|
%endif |
576 |
|
|
%ifarch ia64 |
577 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/ia64-* |
578 |
|
|
%endif |
579 |
|
|
%ifarch x86_64 |
580 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/amd64-* |
581 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/x86_64-* |
582 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/ia32e-* |
583 |
|
|
%endif |
584 |
|
|
%ifarch %arm |
585 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/armv* |
586 |
|
|
%endif |
587 |
|
|
%ifarch %mips |
588 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/mips* |
589 |
|
|
%endif |
590 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/noarch* |
591 |
|
|
|
592 |
|
|
%{_mandir}/man[18]/*.[18]* |
593 |
|
|
%lang(pl) %{_mandir}/pl/man[18]/*.[18]* |
594 |
|
|
%lang(ru) %{_mandir}/ru/man[18]/*.[18]* |
595 |
|
|
%lang(ja) %{_mandir}/ja/man[18]/*.[18]* |
596 |
|
|
%lang(sk) %{_mandir}/sk/man[18]/*.[18]* |
597 |
|
|
%lang(fr) %{_mandir}/fr/man[18]/*.[18]* |
598 |
|
|
%lang(ko) %{_mandir}/ko/man[18]/*.[18]* |
599 |
|
|
|
600 |
|
|
%config(noreplace,missingok) /etc/cron.daily/rpm |
601 |
|
|
%config(noreplace,missingok) /etc/logrotate.d/rpm |
602 |
|
|
|
603 |
|
|
%attr(0755, rpm, rpm) %dir %_localstatedir/lib/rpm |
604 |
|
|
|
605 |
|
|
%define rpmdbattr %attr(0644, rpm, rpm) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) |
606 |
|
|
|
607 |
|
|
%rpmdbattr /var/lib/rpm/Basenames |
608 |
|
|
%rpmdbattr /var/lib/rpm/Conflictname |
609 |
|
|
%rpmdbattr /var/lib/rpm/__db.0* |
610 |
|
|
%rpmdbattr /var/lib/rpm/Dirnames |
611 |
|
|
%rpmdbattr /var/lib/rpm/Group |
612 |
|
|
%rpmdbattr /var/lib/rpm/Installtid |
613 |
|
|
%rpmdbattr /var/lib/rpm/Name |
614 |
|
|
%rpmdbattr /var/lib/rpm/Packages |
615 |
|
|
%rpmdbattr /var/lib/rpm/Providename |
616 |
|
|
%rpmdbattr /var/lib/rpm/Provideversion |
617 |
|
|
%rpmdbattr /var/lib/rpm/Removetid |
618 |
|
|
%rpmdbattr /var/lib/rpm/Requirename |
619 |
|
|
%rpmdbattr /var/lib/rpm/Requireversion |
620 |
|
|
%rpmdbattr /var/lib/rpm/Triggername |
621 |
|
|
|
622 |
|
|
%files build |
623 |
|
|
%defattr(-,root,root) |
624 |
|
|
%doc CHANGES |
625 |
|
|
%doc doc-copy/* |
626 |
|
|
%rpmattr %{_bindir}/rpmbuild |
627 |
|
|
%rpmattr %{_prefix}/lib/rpm/brp-* |
628 |
|
|
%rpmattr %{_prefix}/lib/rpm/check-files |
629 |
|
|
%rpmattr %{_prefix}/lib/rpm/debugedit |
630 |
|
|
%rpmattr %{_prefix}/lib/rpm/find-debuginfo.sh |
631 |
|
|
%rpmattr %{_prefix}/lib/rpm/find-lang.sh |
632 |
|
|
%rpmattr %{_prefix}/lib/rpm/find-provides |
633 |
|
|
%rpmattr %{_prefix}/lib/rpm/find-requires |
634 |
|
|
%rpmattr %{_prefix}/lib/rpm/perldeps.pl |
635 |
|
|
%rpmattr %{_prefix}/lib/rpm/perl.prov |
636 |
|
|
%rpmattr %{_prefix}/lib/rpm/perl.req |
637 |
|
|
|
638 |
|
|
%rpmattr %{_prefix}/lib/rpm/check-buildroot |
639 |
|
|
%rpmattr %{_prefix}/lib/rpm/check-prereqs |
640 |
|
|
%rpmattr %{_prefix}/lib/rpm/check-rpaths |
641 |
|
|
%rpmattr %{_prefix}/lib/rpm/check-rpaths-worker |
642 |
|
|
%rpmattr %{_prefix}/lib/rpm/javadeps |
643 |
|
|
%rpmattr %{_prefix}/lib/rpm/libtooldeps.sh |
644 |
|
|
%rpmattr %{_prefix}/lib/rpm/macros.perl |
645 |
|
|
%rpmattr %{_prefix}/lib/rpm/macros.php |
646 |
|
|
%rpmattr %{_prefix}/lib/rpm/macros.python |
647 |
|
|
%rpmattr %{_prefix}/lib/rpm/mono-find-provides |
648 |
|
|
%rpmattr %{_prefix}/lib/rpm/mono-find-requires |
649 |
|
|
%rpmattr %{_prefix}/lib/rpm/osgideps.pl |
650 |
|
|
%rpmattr %{_prefix}/lib/rpm/pkgconfigdeps.sh |
651 |
|
|
%rpmattr %{_prefix}/lib/rpm/rpmdiff |
652 |
|
|
|
653 |
|
|
%rpmattr %{_prefix}/lib/rpm/rpmdeps |
654 |
|
|
#%rpmattr %{_prefix}/lib/rpm/trpm |
655 |
|
|
%rpmattr %{_prefix}/lib/rpm/pythondeps.sh |
656 |
|
|
|
657 |
|
|
%{_mandir}/man8/rpmbuild.8* |
658 |
|
|
%{_mandir}/man8/rpmdeps.8* |
659 |
|
|
|
660 |
|
|
%if %buildpython |
661 |
|
|
%files -n python-rpm |
662 |
|
|
%defattr(-,root,root) |
663 |
|
|
%{_libdir}/python*/site-packages/rpm |
664 |
|
|
%endif |
665 |
|
|
|
666 |
|
|
%files -n %librpmname |
667 |
|
|
%defattr(-,root,root) |
668 |
|
|
%{_libdir}/librpm-%{libver}.so |
669 |
|
|
%{_libdir}/librpmio-%{libver}.so |
670 |
|
|
%{_libdir}/librpmbuild-%{libver}.so |
671 |
|
|
|
672 |
|
|
%files -n %librpmnamedevel |
673 |
|
|
%defattr(-,root,root) |
674 |
|
|
%{_includedir}/rpm |
675 |
|
|
%{_libdir}/librpm.la |
676 |
|
|
%{_libdir}/librpm.so |
677 |
|
|
%{_libdir}/librpmio.la |
678 |
|
|
%{_libdir}/librpmio.so |
679 |
|
|
%{_libdir}/librpmbuild.la |
680 |
|
|
%{_libdir}/librpmbuild.so |
681 |
|
|
%{_libdir}/pkgconfig/rpm.pc |