1 |
dmorgan |
185007 |
%define lib64arches x86_64 |
2 |
tmb |
343 |
|
3 |
|
|
%ifarch %lib64arches |
4 |
|
|
%define _lib lib64 |
5 |
|
|
%else |
6 |
|
|
%define _lib lib |
7 |
|
|
%endif |
8 |
|
|
|
9 |
|
|
%define _prefix /usr |
10 |
|
|
%define _libdir %_prefix/%_lib |
11 |
|
|
%define _bindir %_prefix/bin |
12 |
|
|
%define _sysconfdir /etc |
13 |
|
|
%define _datadir /usr/share |
14 |
|
|
%define _defaultdocdir %_datadir/doc |
15 |
|
|
%define _localstatedir /var |
16 |
|
|
%define _infodir %_datadir/info |
17 |
|
|
|
18 |
|
|
%if %{?apply_patches:0}%{?!apply_patches:1} |
19 |
|
|
%define apply_patches %(for p in `grep '^Patch.*:' "%{_specdir}/rpm.spec" | cut -d':' -f2-`; do echo "patch -p1 -F0 -i %{_sourcedir}/$p"; done ) |
20 |
|
|
%endif |
21 |
|
|
|
22 |
|
|
# Define directory which holds rpm config files, and some binaries actually |
23 |
|
|
# NOTE: it remains */lib even on lib64 platforms as only one version |
24 |
|
|
# of rpm is supported anyway, per architecture |
25 |
|
|
%define rpmdir %{_prefix}/lib/rpm |
26 |
|
|
|
27 |
|
|
%if %{?mklibname:0}%{?!mklibname:1} |
28 |
|
|
%define mklibname(ds) %{_lib}%{1}%{?2:%{2}}%{?3:_%{3}}%{-s:-static}%{-d:-devel} |
29 |
|
|
%endif |
30 |
|
|
|
31 |
|
|
%if %{?distsuffix:0}%{?!distsuffix:1} |
32 |
tmb |
345 |
%define distsuffix .mga |
33 |
tmb |
343 |
%endif |
34 |
|
|
|
35 |
|
|
%if %{?mkrel:0}%{?!mkrel:1} |
36 |
tmb |
345 |
%define mkrel(c:) %{-c: 0.%{-c*}.}%{1}%{?distsuffix:%distsuffix}%{?!distsuffix:.mga}%{?mageia_release:%mageia_release}%{?subrel:.%subrel} |
37 |
tmb |
343 |
%endif |
38 |
|
|
|
39 |
|
|
%if %{?mips:0}%{?!mips:1} |
40 |
|
|
%define mips mips mipsel mips32 mips32el mips64 mips64el |
41 |
|
|
%endif |
42 |
|
|
|
43 |
|
|
%if %{?pyver:0}%{?!pyver:1} |
44 |
|
|
%define pyver %(python -V 2>&1 | cut -f2 -d" " | cut -f1,2 -d".") |
45 |
|
|
%endif |
46 |
|
|
|
47 |
blino |
25213 |
%define __find_requires %{rpmdir}/%{_real_vendor}/find-requires %{?buildroot:%{buildroot}} %{?_target_cpu:%{_target_cpu}} |
48 |
|
|
%define __find_provides %{rpmdir}/%{_real_vendor}/find-provides |
49 |
tmb |
343 |
|
50 |
tv |
441832 |
%define snapver rc1 |
51 |
|
|
%define rpmversion 4.11.1 |
52 |
dmorgan |
185007 |
%define srcver %{rpmversion}%{?snapver:-%{snapver}} |
53 |
tv |
264614 |
%define libver 4.10 |
54 |
tv |
255921 |
%define libmajor 3 |
55 |
|
|
%define libmajorsign 1 |
56 |
tv |
441839 |
%define release %mkrel %{?snapver:0.%{snapver}.}2 |
57 |
dmorgan |
185007 |
%define librpmname %mklibname rpm %{libmajor} |
58 |
tmb |
345 |
%define librpmnamedevel %mklibname -d rpm |
59 |
dmorgan |
185007 |
%define librpmsign %mklibname rpmsign %{libmajor} |
60 |
|
|
%define librpmbuild %mklibname rpmbuild %{libmajor} |
61 |
tmb |
343 |
|
62 |
|
|
%define buildpython 1 |
63 |
|
|
%define rpmsetup_version 1.34 |
64 |
|
|
|
65 |
|
|
%define builddebug 0 |
66 |
|
|
%{?_with_debug:%define builddebug 1} |
67 |
|
|
|
68 |
|
|
%{?_with_python:%define buildpython 1} |
69 |
|
|
%{?_without_python:%define buildpython 0} |
70 |
|
|
|
71 |
dmorgan |
186381 |
# disable plugins initially |
72 |
dmorgan |
185007 |
%define buildplugins 0 |
73 |
|
|
%{?_with_plugins:%define buildplugins 1} |
74 |
|
|
|
75 |
tmb |
343 |
Summary: The RPM package management system |
76 |
|
|
Name: rpm |
77 |
|
|
Epoch: 1 |
78 |
dmorgan |
185007 |
Version: %{rpmversion} |
79 |
dmorgan |
49378 |
Release: %{release} |
80 |
fwang |
390713 |
Group: System/Packaging |
81 |
tmb |
343 |
Source: http://www.rpm.org/releases/rpm-%{libver}.x/rpm-%{srcver}.tar.bz2 |
82 |
dmorgan |
185007 |
# Add some undocumented feature to gendiff |
83 |
|
|
# Send upstream ? drop ? |
84 |
|
|
Patch17: rpm-4.4.2.2-gendiff-improved.patch |
85 |
tmb |
343 |
|
86 |
|
|
# if %post of foo-2 fails, |
87 |
|
|
# or if %preun of foo-1 fails, |
88 |
|
|
# or if %postun of foo-1 fails, |
89 |
|
|
# => foo-1 is not removed, so we end up with both packages in rpmdb |
90 |
|
|
# this patch makes rpm ignore the error in those cases |
91 |
dmorgan |
185007 |
# failing %pre must still make the rpm install fail (mdv #23677) |
92 |
tmb |
343 |
# |
93 |
|
|
# (nb: the exit code for pretrans/posttrans & trigger/triggerun/triggerpostun |
94 |
|
|
# scripts is ignored with or without this patch) |
95 |
tv |
262316 |
# Needed for urpmi testsuite: |
96 |
dmorgan |
185007 |
Patch22: rpm-4.9.0-non-pre-scripts-dont-fail.patch |
97 |
tmb |
343 |
|
98 |
tv |
327188 |
# (fredl) add loging facilities through syslog (pushed upstream, might be replaced by a rpm pluging in 4.11): |
99 |
dmorgan |
185007 |
Patch31: rpm-4.9.0-syslog.patch |
100 |
tmb |
343 |
|
101 |
tmb |
47730 |
# - force /usr/lib/rpm/mageia/rpmrc instead of /usr/lib/rpm/<vendor>/rpmrc |
102 |
|
|
# - read /usr/lib/rpm/mageia/rpmpopt (not only /usr/lib/rpm/rpmpopt) |
103 |
dmorgan |
185007 |
# if we deprecated the use of rpm -ba , ..., we can get rid of this patch |
104 |
|
|
Patch64: rpm-4.9.1.1-mageia-rpmrc-rpmpopt.patch |
105 |
blino |
25212 |
|
106 |
tmb |
343 |
# In original rpm, -bb --short-circuit does not work and run all stage |
107 |
|
|
# From popular request, we allow to do this |
108 |
dmorgan |
185007 |
# http://qa.mandriva.com/show_bug.cgi?id=15896 |
109 |
|
|
Patch70: rpm-4.9.1-bb-shortcircuit.patch |
110 |
tmb |
343 |
|
111 |
|
|
# don't conflict for doc files |
112 |
|
|
# (to be able to install lib*-devel together with lib64*-devel even if they have conflicting manpages) |
113 |
tv |
332065 |
Patch83: rpm-4.11.0-no-doc-conflicts.patch |
114 |
tmb |
343 |
|
115 |
|
|
# Fix http://qa.mandriva.com/show_bug.cgi?id=19392 |
116 |
|
|
# (is this working??) |
117 |
|
|
Patch84: rpm-4.4.2.2-rpmqv-ghost.patch |
118 |
|
|
|
119 |
|
|
# Fix diff issue when buildroot contains some "//" |
120 |
tv |
256243 |
Patch111: rpm-check-file-trim-double-slash-in-buildroot.patch |
121 |
tmb |
343 |
|
122 |
|
|
# [Dec 2008] macrofiles from rpmrc does not overrides MACROFILES anymore |
123 |
tv |
327188 |
# Upstream 4.11 will have /usr/lib/rpm/macros.d: |
124 |
dmorgan |
185007 |
Patch114: rpm-4.9.0-read-macros_d-dot-macros.patch |
125 |
tmb |
343 |
|
126 |
|
|
# [pixel] without this patch, "rpm -e" or "rpm -U" will need to stat(2) every dirnames of |
127 |
|
|
# files from the package (eg COPYING) in the db. This is quite costly when not in cache |
128 |
|
|
# (eg on a test here: >300 stats, and so 3 seconds after a "echo 3 > /proc/sys/vm/drop_caches") |
129 |
|
|
# this breaks urpmi test case test_rpm_i_fail('gd') in superuser--file-conflicts.t, |
130 |
|
|
# but this is bad design anyway |
131 |
dmorgan |
46862 |
#Patch124: rpm-4.6.0-rc1-speedup-by-not-checking-same-files-with-different-paths-through-symlink.patch |
132 |
tmb |
343 |
|
133 |
|
|
# [from SuSE] handle "Suggests" via RPMTAG_SUGGESTSNAME |
134 |
tv |
441832 |
Patch133: rpm-4.11.1-weakdeps.patch |
135 |
tv |
215854 |
Patch134: extcond.diff |
136 |
tmb |
343 |
|
137 |
dmorgan |
49378 |
# (from Turbolinux) remove a wrong check in case %_topdir is /RPM (ie when it is short) |
138 |
tv |
256612 |
# Panu said: "To my knowledge this is a true technical limitation of the |
139 |
|
|
# implementation: as long as debugedit can just overwrite data in the elf |
140 |
|
|
# sections things keep relatively easy, but if dest_dir is longer than the |
141 |
|
|
# original directory, debugedit would have to expand the whole elf file. Which |
142 |
|
|
# might be technically possible but debugedit currently does not even try to." |
143 |
dmorgan |
185007 |
Patch135: rpm-4.9.0-fix-debugedit.patch |
144 |
dmorgan |
49378 |
|
145 |
tmb |
343 |
# without this patch, "#%define foo bar" is surprisingly equivalent to "%define foo bar" |
146 |
|
|
# with this patch, "#%define foo bar" is a fatal error |
147 |
dmorgan |
185007 |
# Bug still valid => Send upstream for review. |
148 |
tv |
256243 |
Patch145: rpm-forbid-badly-commented-define-in-spec.patch |
149 |
tmb |
343 |
|
150 |
|
|
# cf http://wiki.mandriva.com/en/Rpm_filetriggers |
151 |
dmorgan |
185007 |
# Will be allowed to be dropped when "Collection" won't be experimental anymore. |
152 |
|
|
Patch146: rpm-4.9.1.1-filetriggers.patch |
153 |
tmb |
343 |
|
154 |
|
|
# add two fatal errors (during package build) |
155 |
dmorgan |
185007 |
# Useful ? to drop ? |
156 |
|
|
#Patch147: rpm-rpmbuild-check-useless-tags-in-non-existant-binary-packages.patch |
157 |
tmb |
343 |
|
158 |
|
|
# (nb: see the patch for more info about this issue) |
159 |
dmorgan |
185007 |
#Patch151: rpm-4.6.0-rc1-protect-against-non-robust-futex.patch |
160 |
tmb |
343 |
|
161 |
wally |
324218 |
Patch157: rpm-4.10.1-introduce-_after_setup-which-is-called-after-setup.patch |
162 |
dmorgan |
185007 |
#Patch158: introduce-_patch-and-allow-easy-override-when-the-p.patch |
163 |
tv |
256243 |
Patch159: introduce-apply_patches-and-lua-var-patches_num.patch |
164 |
tmb |
343 |
|
165 |
|
|
Patch1007: rpm-4.6.0-rc3-xz-support.patch |
166 |
|
|
|
167 |
|
|
# Prevents $DOCDIR from being wiped out when using %%doc <fileinbuilddir>, |
168 |
|
|
# as this breaks stuff that installs files to $DOCDIR during %%install |
169 |
dmorgan |
185007 |
#Patch1008: rpm-4.6.0-rc3-no_rm_-rf_DOCDIR.patch |
170 |
tmb |
343 |
|
171 |
|
|
# Turbolinux patches |
172 |
|
|
# Crusoe CPUs say that their CPU family is "5" but they have enough features for i686. |
173 |
|
|
Patch2003: rpm-4.4.2.3-rc1-transmeta-crusoe-is-686.patch |
174 |
|
|
|
175 |
tv |
256243 |
Patch2006: rpm-4.10.0-setup-rubygems.patch |
176 |
dmorgan |
49378 |
|
177 |
tv |
262316 |
# (tv) fix tests: |
178 |
tv |
441832 |
Patch2100: rpm-4.11.1-fix-testsuite.diff |
179 |
tv |
255921 |
|
180 |
tmb |
343 |
Patch3000: mips_macros.patch |
181 |
tv |
256616 |
Patch3002: mips_define_isa_macros.patch |
182 |
|
|
Patch3003: rpm_arm_mips_isa_macros.patch |
183 |
|
|
Patch3004: rpm_add_armv5tl.patch |
184 |
tmb |
343 |
|
185 |
rtp |
267694 |
# when using fakechroot, make sure that testsuite pathes are against / |
186 |
|
|
# and not full path |
187 |
tv |
441832 |
Patch3005: rpm-4.11.1-fix-testsuite-pathes.patch |
188 |
tv |
223198 |
# |
189 |
dmorgan |
185007 |
# Fedora patches |
190 |
tv |
223198 |
# Patches 41xx are already in upstream and are 1xx in FC |
191 |
|
|
# |
192 |
tv |
332643 |
# (tv) Temporary Patch to provide support for updates (FC): |
193 |
|
|
Patch3500: rpm-4.10.90-rpmlib-filesystem-check.patch |
194 |
tv |
327924 |
# (tv) Compressed debuginfo support (UPSTREAM): |
195 |
tv |
276745 |
Patch3501: rpm-4.10.0-dwz-debuginfo.patch |
196 |
tv |
327924 |
# (tv) Mini debuginfo support (UPSTREAM): |
197 |
tv |
276745 |
Patch3502: rpm-4.10.0-minidebuginfo.patch |
198 |
dmorgan |
185007 |
|
199 |
tv |
276795 |
# (tv) merge mga stuff from rpm-setup: |
200 |
|
|
Patch4000: rpm-4.10.0-find-debuginfo__mga-cfg.diff |
201 |
tv |
332323 |
# (tv) fix aborting when ordering empty transactions: |
202 |
|
|
Patch4006: fix-order-on-empty-transactions.diff |
203 |
tv |
327195 |
|
204 |
|
|
|
205 |
dmorgan |
185007 |
License: GPLv2+ |
206 |
|
|
BuildRequires: autoconf |
207 |
tmb |
343 |
BuildRequires: zlib-devel |
208 |
|
|
BuildRequires: bzip2-devel |
209 |
tv |
276213 |
BuildRequires: liblzma-devel >= 5 |
210 |
dmorgan |
185007 |
BuildRequires: automake |
211 |
tmb |
343 |
BuildRequires: elfutils-devel |
212 |
|
|
BuildRequires: libbeecrypt-devel |
213 |
dmorgan |
185007 |
BuildRequires: ed |
214 |
|
|
BuildRequires: gettext-devel |
215 |
tmb |
343 |
BuildRequires: libsqlite3-devel |
216 |
tv |
276213 |
BuildRequires: db5.3-devel |
217 |
tmb |
343 |
BuildRequires: neon-devel |
218 |
|
|
BuildRequires: popt-devel |
219 |
|
|
BuildRequires: nss-devel |
220 |
|
|
BuildRequires: magic-devel |
221 |
blino |
25213 |
BuildRequires: rpm-%{_real_vendor}-setup-build %{?rpmsetup_version:>= %{rpmsetup_version}} |
222 |
tmb |
343 |
BuildRequires: readline-devel |
223 |
|
|
BuildRequires: ncurses-devel |
224 |
dmorgan |
185007 |
BuildRequires: openssl-devel |
225 |
tv |
256683 |
BuildRequires: lua5.1-devel |
226 |
dmorgan |
185007 |
BuildRequires: libcap-devel |
227 |
|
|
# Needed for doc |
228 |
tmb |
343 |
#BuildRequires: graphviz |
229 |
dmorgan |
185007 |
BuildRequires: tetex |
230 |
tmb |
343 |
%if %buildpython |
231 |
|
|
BuildRequires: python-devel |
232 |
|
|
%endif |
233 |
tv |
223263 |
# for testsuite: |
234 |
|
|
BuildRequires: fakechroot |
235 |
tmb |
343 |
|
236 |
|
|
Requires: bzip2 >= 0.9.0c-2 |
237 |
tv |
302008 |
Requires: xz |
238 |
tmb |
343 |
Requires: cpio |
239 |
|
|
Requires: gawk |
240 |
|
|
Requires: glibc >= 2.1.92 |
241 |
|
|
Requires: mktemp |
242 |
tmb |
345 |
Requires: setup >= 2.2.0-8 |
243 |
blino |
25213 |
Requires: rpm-%{_real_vendor}-setup >= 1.85 |
244 |
tmb |
343 |
Requires: update-alternatives |
245 |
|
|
Requires: %librpmname = %epoch:%version-%release |
246 |
|
|
URL: http://rpm.org/ |
247 |
|
|
%define git_url http://rpm.org/git/rpm.git |
248 |
dmorgan |
185007 |
Requires(pre): rpm-helper |
249 |
tmb |
343 |
Requires(pre): coreutils |
250 |
dmorgan |
185007 |
Requires(postun): rpm-helper |
251 |
tmb |
343 |
|
252 |
tv |
257955 |
Conflicts: perl-URPM < 4.0-2.mga3 |
253 |
fwang |
260027 |
Conflicts: jpackage-utils < 1:1.7.5-17 |
254 |
dmorgan |
185007 |
|
255 |
tmb |
343 |
%description |
256 |
|
|
RPM is a powerful command line driven package management system capable of |
257 |
|
|
installing, uninstalling, verifying, querying, and updating software packages. |
258 |
|
|
Each software package consists of an archive of files along with information |
259 |
|
|
about the package like its version, a description, etc. |
260 |
|
|
|
261 |
dmorgan |
185191 |
%package -n %librpmbuild |
262 |
|
|
Summary: Libraries for building and signing RPM packages |
263 |
|
|
Group: System/Libraries |
264 |
tv |
332644 |
Obsoletes: rpm-build-libs%{_isa} < %{version}-%{release} |
265 |
dmorgan |
185191 |
Provides: rpm-build-libs%{_isa} = %{version}-%{release} |
266 |
|
|
|
267 |
|
|
%description -n %librpmbuild |
268 |
|
|
This package contains the RPM shared libraries for building and signing |
269 |
|
|
packages. |
270 |
|
|
|
271 |
|
|
%package -n %librpmsign |
272 |
|
|
Summary: Libraries for building and signing RPM packages |
273 |
|
|
Group: System/Libraries |
274 |
|
|
|
275 |
|
|
%description -n %librpmsign |
276 |
|
|
This package contains the RPM shared libraries for building and signing |
277 |
|
|
packages. |
278 |
|
|
|
279 |
tmb |
343 |
%package -n %librpmname |
280 |
tmb |
345 |
Summary: Library used by rpm |
281 |
|
|
Group: System/Libraries |
282 |
|
|
Provides: librpm = %version-%release |
283 |
tmb |
343 |
|
284 |
|
|
%description -n %librpmname |
285 |
|
|
RPM is a powerful command line driven package management system capable of |
286 |
|
|
installing, uninstalling, verifying, querying, and updating software packages. |
287 |
|
|
This package contains common files to all applications based on rpm. |
288 |
|
|
|
289 |
|
|
%package -n %librpmnamedevel |
290 |
|
|
Summary: Development files for applications which will manipulate RPM packages |
291 |
|
|
Group: Development/C |
292 |
|
|
Requires: rpm = %epoch:%{version}-%{release} |
293 |
|
|
Provides: librpm-devel = %version-%release |
294 |
|
|
Provides: rpm-devel = %version-%release |
295 |
dmorgan |
185220 |
Requires: %librpmname = %epoch:%version-%release |
296 |
|
|
Requires: %librpmbuild = %epoch:%version-%release |
297 |
|
|
Requires: %librpmsign = %epoch:%version-%release |
298 |
tmb |
343 |
|
299 |
|
|
%description -n %librpmnamedevel |
300 |
|
|
This package contains the RPM C library and header files. These |
301 |
|
|
development files will simplify the process of writing programs |
302 |
|
|
which manipulate RPM packages and databases and are intended to make |
303 |
|
|
it easier to create graphical package managers or any other tools |
304 |
|
|
that need an intimate knowledge of RPM packages in order to function. |
305 |
|
|
|
306 |
|
|
This package should be installed if you want to develop programs that |
307 |
|
|
will manipulate RPM packages and databases. |
308 |
|
|
|
309 |
|
|
%package build |
310 |
|
|
Summary: Scripts and executable programs used to build packages |
311 |
fwang |
390713 |
Group: System/Packaging |
312 |
tmb |
343 |
Requires: autoconf |
313 |
|
|
Requires: automake |
314 |
|
|
Requires: file |
315 |
|
|
Requires: gcc-c++ |
316 |
|
|
# We need cputoolize & amd64-* alias to x86_64-* in config.sub |
317 |
dmorgan |
185007 |
Requires: libtool-base |
318 |
|
|
Requires: patch |
319 |
tmb |
343 |
Requires: make |
320 |
|
|
Requires: tar |
321 |
|
|
Requires: unzip |
322 |
|
|
Requires: elfutils |
323 |
jquelin |
167931 |
Requires: perl(CPAN::Meta) >= 2.112.150 |
324 |
jquelin |
167751 |
Requires: perl(ExtUtils::MakeMaker) >= 6.570_700 |
325 |
dmorgan |
185007 |
Requires: perl(YAML::Tiny) |
326 |
tmb |
343 |
Requires: rpm = %epoch:%{version}-%{release} |
327 |
blino |
25213 |
Requires: rpm-%{_real_vendor}-setup-build %{?rpmsetup_version:>= %{rpmsetup_version}} |
328 |
tmb |
343 |
|
329 |
|
|
%description build |
330 |
|
|
This package contains scripts and executable programs that are used to |
331 |
|
|
build packages using RPM. |
332 |
|
|
|
333 |
dmorgan |
185007 |
%package sign |
334 |
|
|
Summary: Package signing support |
335 |
|
|
Group: System/Base |
336 |
|
|
|
337 |
|
|
%description sign |
338 |
|
|
This package contains support for digitally signing RPM packages. |
339 |
|
|
|
340 |
tmb |
343 |
%if %buildpython |
341 |
|
|
%package -n python-rpm |
342 |
|
|
Summary: Python bindings for apps which will manipulate RPM packages |
343 |
|
|
Group: Development/Python |
344 |
|
|
Requires: rpm = %epoch:%{version}-%{release} |
345 |
|
|
|
346 |
|
|
%description -n python-rpm |
347 |
|
|
The rpm-python package contains a module which permits applications |
348 |
|
|
written in the Python programming language to use the interface |
349 |
|
|
supplied by RPM (RPM Package Manager) libraries. |
350 |
|
|
|
351 |
|
|
This package should be installed if you want to develop Python |
352 |
|
|
programs that will manipulate RPM packages and databases. |
353 |
|
|
%endif |
354 |
|
|
|
355 |
|
|
%prep |
356 |
|
|
%setup -q -n %name-%srcver |
357 |
dmorgan |
186388 |
%apply_patches |
358 |
tmb |
343 |
|
359 |
|
|
%build |
360 |
|
|
autoreconf |
361 |
|
|
|
362 |
|
|
%if %builddebug |
363 |
|
|
RPM_OPT_FLAGS=-g |
364 |
|
|
%endif |
365 |
tv |
262316 |
export CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`" |
366 |
tmb |
343 |
CFLAGS="$RPM_OPT_FLAGS -fPIC" CXXFLAGS="$RPM_OPT_FLAGS -fPIC" \ |
367 |
fwang |
215771 |
%configure2_5x \ |
368 |
tmb |
343 |
--enable-nls \ |
369 |
|
|
--enable-python \ |
370 |
|
|
--enable-sqlite3 \ |
371 |
|
|
--without-javaglue \ |
372 |
|
|
%if %builddebug |
373 |
|
|
--enable-debug \ |
374 |
|
|
%endif |
375 |
dmorgan |
185007 |
--with-external-db \ |
376 |
tmb |
343 |
%if %buildpython |
377 |
|
|
--with-python=%{pyver} \ |
378 |
|
|
%else |
379 |
|
|
--without-python \ |
380 |
|
|
%endif |
381 |
dmorgan |
185007 |
%if ! %buildplugins |
382 |
|
|
--disable-plugins \ |
383 |
|
|
%endif |
384 |
tmb |
343 |
--with-glob \ |
385 |
|
|
--without-selinux \ |
386 |
dmorgan |
185007 |
--without-apidocs \ |
387 |
|
|
--with-cap |
388 |
tmb |
343 |
|
389 |
|
|
%make |
390 |
|
|
|
391 |
|
|
%install |
392 |
dmorgan |
185007 |
rm -rf $RPM_BUILD_ROOT |
393 |
tmb |
343 |
|
394 |
|
|
make DESTDIR=%buildroot install |
395 |
|
|
|
396 |
dmorgan |
170213 |
find $RPM_BUILD_ROOT -name "*.la"|xargs rm -f |
397 |
|
|
|
398 |
tmb |
343 |
# Save list of packages through cron |
399 |
|
|
mkdir -p ${RPM_BUILD_ROOT}/etc/cron.daily |
400 |
|
|
install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}/etc/cron.daily/rpm |
401 |
|
|
|
402 |
|
|
mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d |
403 |
|
|
install -m 644 scripts/rpm.log ${RPM_BUILD_ROOT}/etc/logrotate.d/rpm |
404 |
|
|
|
405 |
|
|
mkdir -p $RPM_BUILD_ROOT/var/lib/rpm |
406 |
|
|
for dbi in \ |
407 |
|
|
Basenames Conflictname Dirnames Group Installtid Name Providename \ |
408 |
|
|
Provideversion Removetid Requirename Requireversion Triggername \ |
409 |
dmorgan |
185007 |
Obsoletename Packages Sha1header Sigmd5 __db.001 __db.002 \ |
410 |
|
|
__db.003 __db.004 __db.005 __db.006 __db.007 __db.008 __db.009 |
411 |
tmb |
343 |
do |
412 |
|
|
touch $RPM_BUILD_ROOT/var/lib/rpm/$dbi |
413 |
|
|
done |
414 |
|
|
|
415 |
|
|
test -d doc-copy || mkdir doc-copy |
416 |
|
|
rm -rf doc-copy/* |
417 |
|
|
ln -f doc/manual/* doc-copy/ |
418 |
|
|
rm -f doc-copy/Makefile* |
419 |
|
|
|
420 |
|
|
mkdir -p $RPM_BUILD_ROOT/var/spool/repackage |
421 |
|
|
|
422 |
|
|
mkdir -p %buildroot%_sysconfdir/rpm/macros.d |
423 |
|
|
cat > %buildroot%_sysconfdir/rpm/macros <<EOF |
424 |
|
|
# Put your own system macros here |
425 |
|
|
# usually contains |
426 |
|
|
|
427 |
|
|
# Set this one according your locales |
428 |
|
|
# %%_install_langs |
429 |
|
|
|
430 |
|
|
EOF |
431 |
|
|
|
432 |
|
|
%{rpmdir}/%{_host_vendor}/find-lang.pl $RPM_BUILD_ROOT %{name} |
433 |
|
|
|
434 |
tv |
206214 |
%check |
435 |
|
|
make check |
436 |
tv |
441931 |
[ "$(ls -A tests/rpmtests.dir)" ] && cat tests/rpmtests.log |
437 |
tv |
206214 |
|
438 |
tmb |
343 |
%pre |
439 |
|
|
/usr/share/rpm-helper/add-user rpm $1 rpm /var/lib/rpm /bin/false |
440 |
|
|
|
441 |
|
|
rm -rf /usr/lib/rpm/*-mandrake-* |
442 |
blino |
25213 |
rm -rf /usr/lib/rpm/*-%{_real_vendor}-* |
443 |
tmb |
343 |
|
444 |
tmb |
345 |
|
445 |
tmb |
343 |
%post |
446 |
|
|
# nuke __db.00? when updating to this rpm |
447 |
|
|
rm -f /var/lib/rpm/__db.00? |
448 |
|
|
|
449 |
dmorgan |
185007 |
if [ ! -f /var/lib/rpm/Packages ]; then |
450 |
tmb |
343 |
/bin/rpm --initdb |
451 |
|
|
fi |
452 |
|
|
|
453 |
|
|
%postun |
454 |
|
|
/usr/share/rpm-helper/del-user rpm $1 rpm |
455 |
|
|
|
456 |
|
|
%define rpmattr %attr(0755, rpm, rpm) |
457 |
|
|
|
458 |
|
|
%files -f %{name}.lang |
459 |
|
|
%defattr(-,root,root) |
460 |
|
|
%doc GROUPS CHANGES doc/manual/[a-z]* |
461 |
|
|
%attr(0755,rpm,rpm) /bin/rpm |
462 |
|
|
%attr(0755, rpm, rpm) %{_bindir}/rpm2cpio |
463 |
|
|
%attr(0755, rpm, rpm) %{_bindir}/gendiff |
464 |
|
|
%attr(0755, rpm, rpm) %{_bindir}/rpmdb |
465 |
dmorgan |
185007 |
%attr(0755, rpm, rpm) %{_bindir}/rpmkeys |
466 |
tmb |
343 |
%attr(0755, rpm, rpm) %{_bindir}/rpmgraph |
467 |
|
|
%attr(0755, rpm, rpm) %{_bindir}/rpmquery |
468 |
|
|
%attr(0755, rpm, rpm) %{_bindir}/rpmverify |
469 |
|
|
|
470 |
|
|
%dir %{_localstatedir}/spool/repackage |
471 |
|
|
%dir %{rpmdir} |
472 |
|
|
%dir /etc/rpm |
473 |
|
|
%config(noreplace) /etc/rpm/macros |
474 |
|
|
%dir /etc/rpm/macros.d |
475 |
|
|
%attr(0755, rpm, rpm) %{rpmdir}/config.guess |
476 |
|
|
%attr(0755, rpm, rpm) %{rpmdir}/config.sub |
477 |
|
|
%attr(0755, rpm, rpm) %{rpmdir}/rpmdb_* |
478 |
|
|
%attr(0644, rpm, rpm) %{rpmdir}/macros |
479 |
|
|
%attr(0755, rpm, rpm) %{rpmdir}/mkinstalldirs |
480 |
|
|
%attr(0755, rpm, rpm) %{rpmdir}/rpm.* |
481 |
|
|
%attr(0644, rpm, rpm) %{rpmdir}/rpmpopt* |
482 |
|
|
%attr(0644, rpm, rpm) %{rpmdir}/rpmrc |
483 |
dmorgan |
187127 |
%attr(0755, rpm, rpm) %{rpmdir}/elfdeps |
484 |
|
|
%attr(0755, rpm, rpm) %{rpmdir}/script.req |
485 |
tv |
256610 |
%exclude %{rpmdir}/tcl.req |
486 |
tmb |
343 |
|
487 |
|
|
%rpmattr %{rpmdir}/rpm2cpio.sh |
488 |
|
|
%rpmattr %{rpmdir}/tgpg |
489 |
|
|
|
490 |
blino |
185127 |
%dir %attr( -, rpm, rpm) %{rpmdir}/fileattrs |
491 |
|
|
%attr(0644, rpm, rpm) %{rpmdir}/fileattrs/*.attr |
492 |
|
|
|
493 |
tmb |
343 |
%dir %attr( -, rpm, rpm) %{rpmdir}/platform/ |
494 |
|
|
%ifarch %{ix86} x86_64 |
495 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/i*86-* |
496 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/athlon-* |
497 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/pentium*-* |
498 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/geode-* |
499 |
rtp |
267694 |
%else |
500 |
|
|
%exclude %{rpmdir}/platform/i*86-linux/macros |
501 |
|
|
%exclude %{rpmdir}/platform/athlon-linux/macros |
502 |
|
|
%exclude %{rpmdir}/platform/pentium*-linux/macros |
503 |
|
|
%exclude %{rpmdir}/platform/geode-linux/macros |
504 |
tmb |
343 |
%endif |
505 |
|
|
%ifarch x86_64 |
506 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/amd64-* |
507 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/x86_64-* |
508 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/ia32e-* |
509 |
rtp |
267694 |
%else |
510 |
|
|
%exclude %{rpmdir}/platform/amd64-linux/macros |
511 |
|
|
%exclude %{rpmdir}/platform/ia32e-linux/macros |
512 |
|
|
%exclude %{rpmdir}/platform/x86_64-linux/macros |
513 |
tmb |
343 |
%endif |
514 |
|
|
%ifarch %arm |
515 |
dmorgan |
195260 |
%attr( -, rpm, rpm) %{rpmdir}/platform/arm* |
516 |
tv |
441834 |
%attr( -, rpm, rpm) %{rpmdir}/platform/aarch64*/macros |
517 |
tv |
256613 |
%else |
518 |
|
|
%exclude %{rpmdir}/platform/arm*/macros |
519 |
tv |
441834 |
%exclude %{rpmdir}/platform/aarch64*/macros |
520 |
tmb |
343 |
%endif |
521 |
|
|
%ifarch %mips |
522 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/mips* |
523 |
|
|
%endif |
524 |
|
|
%attr( -, rpm, rpm) %{rpmdir}/platform/noarch* |
525 |
tv |
256613 |
# new in 4.10.0: |
526 |
|
|
%exclude %{rpmdir}/platform/alpha*-linux/macros |
527 |
|
|
%exclude %{rpmdir}/platform/sparc*-linux/macros |
528 |
|
|
%exclude %{rpmdir}/platform/ia64*-linux/macros |
529 |
|
|
%exclude %{rpmdir}/platform/ppc*-linux/macros |
530 |
|
|
%exclude %{rpmdir}/platform/s390*-linux/macros |
531 |
|
|
%exclude %{rpmdir}/platform/sh*-linux/macros |
532 |
tmb |
343 |
|
533 |
tv |
256613 |
|
534 |
|
|
|
535 |
tmb |
343 |
%{_mandir}/man[18]/*.[18]* |
536 |
|
|
%lang(pl) %{_mandir}/pl/man[18]/*.[18]* |
537 |
|
|
%lang(ru) %{_mandir}/ru/man[18]/*.[18]* |
538 |
|
|
%lang(ja) %{_mandir}/ja/man[18]/*.[18]* |
539 |
|
|
%lang(sk) %{_mandir}/sk/man[18]/*.[18]* |
540 |
|
|
%lang(fr) %{_mandir}/fr/man[18]/*.[18]* |
541 |
|
|
%lang(ko) %{_mandir}/ko/man[18]/*.[18]* |
542 |
|
|
|
543 |
|
|
%config(noreplace,missingok) /etc/cron.daily/rpm |
544 |
|
|
%config(noreplace,missingok) /etc/logrotate.d/rpm |
545 |
|
|
|
546 |
|
|
%attr(0755, rpm, rpm) %dir %_localstatedir/lib/rpm |
547 |
|
|
|
548 |
|
|
%define rpmdbattr %attr(0644, rpm, rpm) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) |
549 |
|
|
|
550 |
|
|
%rpmdbattr /var/lib/rpm/Basenames |
551 |
|
|
%rpmdbattr /var/lib/rpm/Conflictname |
552 |
|
|
%rpmdbattr /var/lib/rpm/__db.0* |
553 |
|
|
%rpmdbattr /var/lib/rpm/Dirnames |
554 |
|
|
%rpmdbattr /var/lib/rpm/Group |
555 |
|
|
%rpmdbattr /var/lib/rpm/Installtid |
556 |
|
|
%rpmdbattr /var/lib/rpm/Name |
557 |
dmorgan |
185007 |
%rpmdbattr /var/lib/rpm/Obsoletename |
558 |
tmb |
343 |
%rpmdbattr /var/lib/rpm/Packages |
559 |
|
|
%rpmdbattr /var/lib/rpm/Providename |
560 |
|
|
%rpmdbattr /var/lib/rpm/Provideversion |
561 |
|
|
%rpmdbattr /var/lib/rpm/Removetid |
562 |
|
|
%rpmdbattr /var/lib/rpm/Requirename |
563 |
|
|
%rpmdbattr /var/lib/rpm/Requireversion |
564 |
dmorgan |
185007 |
%rpmdbattr /var/lib/rpm/Sha1header |
565 |
|
|
%rpmdbattr /var/lib/rpm/Sigmd5 |
566 |
tmb |
343 |
%rpmdbattr /var/lib/rpm/Triggername |
567 |
|
|
|
568 |
|
|
%files build |
569 |
|
|
%defattr(-,root,root) |
570 |
|
|
%doc CHANGES |
571 |
|
|
%doc doc-copy/* |
572 |
|
|
%rpmattr %{_bindir}/rpmbuild |
573 |
dmorgan |
185007 |
%rpmattr %{_bindir}/rpmspec |
574 |
tmb |
343 |
%rpmattr %{_prefix}/lib/rpm/brp-* |
575 |
|
|
%rpmattr %{_prefix}/lib/rpm/check-files |
576 |
|
|
%rpmattr %{_prefix}/lib/rpm/debugedit |
577 |
dmorgan |
46862 |
%rpmattr %{_prefix}/lib/rpm/desktop-file.prov |
578 |
tmb |
343 |
%rpmattr %{_prefix}/lib/rpm/find-debuginfo.sh |
579 |
|
|
%rpmattr %{_prefix}/lib/rpm/find-lang.sh |
580 |
|
|
%rpmattr %{_prefix}/lib/rpm/find-provides |
581 |
|
|
%rpmattr %{_prefix}/lib/rpm/find-requires |
582 |
dmorgan |
46862 |
%rpmattr %{_prefix}/lib/rpm/fontconfig.prov |
583 |
tmb |
343 |
%rpmattr %{_prefix}/lib/rpm/perldeps.pl |
584 |
|
|
%rpmattr %{_prefix}/lib/rpm/perl.prov |
585 |
|
|
%rpmattr %{_prefix}/lib/rpm/perl.req |
586 |
|
|
|
587 |
|
|
%rpmattr %{_prefix}/lib/rpm/check-buildroot |
588 |
|
|
%rpmattr %{_prefix}/lib/rpm/check-prereqs |
589 |
|
|
%rpmattr %{_prefix}/lib/rpm/check-rpaths |
590 |
|
|
%rpmattr %{_prefix}/lib/rpm/check-rpaths-worker |
591 |
|
|
%rpmattr %{_prefix}/lib/rpm/libtooldeps.sh |
592 |
|
|
%rpmattr %{_prefix}/lib/rpm/macros.perl |
593 |
|
|
%rpmattr %{_prefix}/lib/rpm/macros.php |
594 |
|
|
%rpmattr %{_prefix}/lib/rpm/macros.python |
595 |
|
|
%rpmattr %{_prefix}/lib/rpm/mono-find-provides |
596 |
|
|
%rpmattr %{_prefix}/lib/rpm/mono-find-requires |
597 |
dmorgan |
46862 |
%rpmattr %{_prefix}/lib/rpm/ocaml-find-provides.sh |
598 |
|
|
%rpmattr %{_prefix}/lib/rpm/ocaml-find-requires.sh |
599 |
tmb |
343 |
%rpmattr %{_prefix}/lib/rpm/osgideps.pl |
600 |
|
|
%rpmattr %{_prefix}/lib/rpm/pkgconfigdeps.sh |
601 |
|
|
|
602 |
|
|
%rpmattr %{_prefix}/lib/rpm/rpmdeps |
603 |
dmorgan |
185007 |
%rpmattr %{_prefix}/lib/rpm/pythondeps.sh |
604 |
tmb |
343 |
|
605 |
tv |
255921 |
|
606 |
tmb |
343 |
%{_mandir}/man8/rpmbuild.8* |
607 |
|
|
%{_mandir}/man8/rpmdeps.8* |
608 |
|
|
|
609 |
|
|
%if %buildpython |
610 |
|
|
%files -n python-rpm |
611 |
|
|
%defattr(-,root,root) |
612 |
|
|
%{_libdir}/python*/site-packages/rpm |
613 |
|
|
%endif |
614 |
|
|
|
615 |
|
|
%files -n %librpmname |
616 |
|
|
%defattr(-,root,root) |
617 |
dmorgan |
46862 |
%{_libdir}/librpm.so.%{libmajor}* |
618 |
|
|
%{_libdir}/librpmio.so.%{libmajor}* |
619 |
dmorgan |
185007 |
%if %{with plugins} |
620 |
|
|
%{_libdir}/rpm-plugins |
621 |
|
|
%endif |
622 |
|
|
|
623 |
|
|
%files -n %librpmbuild |
624 |
dmorgan |
46862 |
%{_libdir}/librpmbuild.so.%{libmajor}* |
625 |
tmb |
343 |
|
626 |
dmorgan |
185007 |
%files -n %librpmsign |
627 |
|
|
%{_libdir}/librpmsign.so.%{libmajorsign}* |
628 |
|
|
|
629 |
|
|
%files sign |
630 |
|
|
%defattr(-,root,root) |
631 |
|
|
%{_bindir}/rpmsign |
632 |
|
|
%{_mandir}/man8/rpmsign.8* |
633 |
|
|
|
634 |
tmb |
343 |
%files -n %librpmnamedevel |
635 |
|
|
%defattr(-,root,root) |
636 |
|
|
%{_includedir}/rpm |
637 |
|
|
%{_libdir}/librpm.so |
638 |
|
|
%{_libdir}/librpmio.so |
639 |
|
|
%{_libdir}/librpmbuild.so |
640 |
dmorgan |
185007 |
%{_libdir}/librpmsign.so |
641 |
tmb |
343 |
%{_libdir}/pkgconfig/rpm.pc |
642 |
dmorgan |
185007 |
|