summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm_5.4.0.bb
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-01-15 21:36:23 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-28 17:52:55 +0000
commitf6ddba2a9dc15560f639faaba8233c29c0c37e9d (patch)
tree568c80749bdfd9c005c769bbb49b18a6b1390cff /meta/recipes-devtools/rpm/rpm_5.4.0.bb
parenta606ad5022e7c0ca34a5bc086254ac8ec16bc8c7 (diff)
downloadpoky-f6ddba2a9dc15560f639faaba8233c29c0c37e9d.tar.gz
rpm: Uprev to RPM 5.4.0
Update RPM to the latest release, RPM 5.4.0. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm_5.4.0.bb')
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.0.bb432
1 files changed, 432 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
new file mode 100644
index 0000000000..541fb6078b
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
@@ -0,0 +1,432 @@
1SUMMARY = "The RPM package management system"
2DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
3package management system capable of installing, uninstalling, \
4verifying, querying, and updating software packages. Each software \
5package consists of an archive of files along with information about \
6the package like its version, a description, etc."
7
8SUMMARY_${PN}-libs = "Libraries for manipulating RPM packages."
9DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries."
10
11SUMMARY_${PN}-dev = "Development files for manipulating RPM packages."
12DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
13development files will simplify the process of writing programs that \
14manipulate RPM packages and databases. These files are intended to \
15simplify the process of creating graphical package managers or any \
16other tools that need an intimate knowledge of RPM packages in order \
17to function."
18
19SUMMARY_${PN}-common = "Common RPM paths, scripts, documentation and configuration."
20DESCRIPTION_${PN}-common = "The rpm-common package contains paths, scripts, documentation \
21and configuration common between RPM Package Manager."
22
23SUMMARY_${PN}-build = "Scripts and executable programs used to build packages."
24DESCRIPTION_${PN}-build = "The rpm-build packagec ontains the scripts and executable programs \
25that are used to build packages using the RPM Package Manager."
26
27SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages."
28DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \
29written in the Python programming language to use the interface \
30supplied by the RPM Package Manager libraries."
31
32SUMMARY_perl-module-rpm = "Perl bindings for apps which will manipulate RPM packages."
33DESCRIPTION_perl-modules-rpm = "The perl-modules-rpm package contains a module that permits applications \
34written in the Perl programming language to use the interface \
35supplied by the RPM Package Manager libraries."
36
37SUMMARY_perl-module-rpm-dev = "Development components for perl bindings"
38DESCRIPTION_perl-modules-rpm-dev = "Development items such as man pages for use with the Perl \
39language bindings."
40
41HOMEPAGE = "http://rpm5.org/"
42LICENSE = "LGPL 2.1"
43LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
44
45DEPENDS = "bzip2 zlib python perl db openssl elfutils expat libpcre attr acl popt"
46PR = "r9"
47
48# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
49# in order to extract the distribution SRPM into a format we can extract...
50SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm \
51 file://rpm2cpio;md5=1850f9872a4803f5165bfd5816274275 \
52 file://perfile_rpmdeps.sh \
53 file://rpm-autogen.patch \
54 file://rpm-libsql-fix.patch \
55 "
56
57# file://hdraddorappend.patch \
58# file://export-rpmbag-h.patch \
59# file://rpm-nrescan.patch \
60# file://rpm-autoconf.patch \
61# file://remove-compiled-tests.patch;apply=no \
62# file://rpm-no-loop.patch \
63# "
64
65SRC_URI[md5sum] = "19c1a7f68d7765eeb7615c9c4e54e380"
66SRC_URI[sha256sum] = "887e76218308b570c33c8c2fb10b5298b3afd5d602860d281befc85357b3b923"
67
68SRPM_UNPACK = "rpm-5.4.0.tar.gz"
69
70inherit autotools gettext
71
72acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
73
74# Specify the default rpm macros in terms of adjustable variables
75rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
76
77# Configure values taken from rpm.spec
78WITH_BZIP2 = "--with-bzip2"
79
80WITH_XZ = "--without-xz"
81
82WITH_Z = "--with-zlib $WITH_BZIP2 $WITH_XZ"
83
84WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \
85 --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
86 --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION} \
87 --without-pythonembed \
88 "
89
90WITH_PYTHON_native = " --without-python"
91
92# Perl modules are not built, but they could be enabled fairly easily
93# the perl module creation and installation would need to be patched.
94# (currently has host perl contamination issues)
95#WITH_PERL = " --with-perl --without-perlembed"
96WITH_PERL = " --without-perl"
97
98WITH_PERL_native = " --without-perl"
99
100WITH_DB = "--with-db --with-dbsql --without-db-tools-integrated --without-sqlite"
101
102WITH_CRYPTO = "--with-beecrypt=internal --with-openssl --without-nss --without-gcrypt"
103
104WITH_KEYUTILS = "--without-keyutils"
105WITH_LIBELF = "--with-libelf"
106WITH_SELINUX = "--without-selinux --without-sepol --without-semanage"
107#WITH_NEON = "--with-neon=internal --without-libproxy --with-expat --without-gssapi"
108WITH_NEON = "--without-neon --without-libproxy --without-expat --without-gssapi"
109
110EXTRA_OECONF = "--verbose \
111 --sysconfdir=/etc \
112 ${WITH_DB} \
113 ${WITH_Z} \
114 --with-file \
115 --with-path-magic=/usr/share/misc/magic \
116 --without-lua \
117 --without-tcl \
118 --with-syck=internal \
119 --without-readline \
120 --without-augeas \
121 ${WITH_CRYPTO} \
122 --without-libtasn1 \
123 --without-pakchois \
124 --without-gnutls \
125 ${WITH_NEON} \
126 --with-pcre \
127 --enable-utf8 \
128 --without-uuid \
129 --with-attr \
130 --with-acl \
131 --without-xar \
132 --with-popt=external \
133 ${WITH_KEYUTILS} \
134 --with-pthreads \
135 ${WITH_LIBELF} \
136 --without-cudf \
137 --without-ficl \
138 --without-aterm \
139 --without-nix \
140 --without-bash \
141 --without-rc \
142 --without-js \
143 --without-gpsee \
144 ${WITH_PYTHON} \
145 ${WITH_PERL} \
146 --without-ruby \
147 --without-squirrel \
148 --with-build-extlibdep \
149 --with-build-maxextlibdep \
150 --without-valgrind \
151 --disable-openmp \
152 --enable-build-pic \
153 --enable-build-versionscript \
154 --enable-build-warnings \
155 --enable-build-debug \
156 --enable-maintainer-mode \
157 --with-path-macros=${rpm_macros} \
158 --with-bugreport=http://bugzilla.pokylinux.org"
159
160CFLAGS_append = " -DRPM_VENDOR_WINDRIVER"
161
162PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-common ${PN}-build python-rpm-dbg python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale"
163
164SOLIBS = "5.4.so"
165
166# Based on %files section in the rpm.spec
167
168FILES_${PN} = "${bindir}/rpm \
169 ${bindir}/rpmconstant \
170 ${libdir}/rpm/rpm.* \
171 ${libdir}/rpm/tgpg \
172 ${libdir}/rpm/macros \
173 ${libdir}/rpm/rpmpopt \
174 ${libdir}/rpm/rpmdb_loadcvt \
175 ${libdir}/rpm/rpm2cpio \
176 ${libdir}/rpm/vcheck \
177 ${libdir}/rpm/helpers \
178 ${libdir}/rpm/qf \
179 ${libdir}/rpm/cpuinfo.yaml \
180 ${libdir}/rpm/bin/mtree \
181 ${libdir}/rpm/bin/rpmkey \
182 ${libdir}/rpm/bin/rpmrepo \
183 ${libdir}/rpm/bin/rpmspecdump \
184 ${libdir}/rpm/bin/wget \
185 "
186
187# ${libdir}/rpm/magic \
188# ${libdir}/rpm/magic.mgc \
189# ${libdir}/rpm/magic.mime \
190# ${libdir}/rpm/magic.mime.mgc \
191# ${libdir}/rpm/bin/db_* \
192# ${libdir}/rpm/bin/grep \
193
194FILES_${PN}-dbg = "${bindir}/.debug \
195 ${libdir}/.debug \
196 ${libdir}/rpm/.debug \
197 ${libdir}/rpm/bin/.debug \
198 "
199
200FILES_${PN}-common = "${bindir}/rpm2cpio \
201 ${bindir}/gendiff \
202 /etc/rpm \
203 /var/lib/rpm \
204 /var/spool/repackage \
205 "
206
207FILES_${PN}-libs = "${libdir}/librpm-*.so \
208 ${libdir}/librpmconstant-*.so \
209 ${libdir}/librpmdb-*.so \
210 ${libdir}/librpmio-*.so \
211 ${libdir}/librpmmisc-*.so \
212 ${libdir}/librpmbuild-*.so \
213 "
214
215###%{_rpmhome}/lib/libxar.so.*
216###%{_rpmhome}/lib/libjs.so.*
217###%{_rpmhome}/lib/librpmjsm.so.*
218###%{_rpmhome}/lib/rpmjsm.so
219
220
221FILES_${PN}-build = "${prefix}/src/rpm \
222 ${bindir}/rpmbuild \
223 ${libdir}/rpm/brp-* \
224 ${libdir}/rpm/check-files \
225 ${libdir}/rpm/cross-build \
226 ${libdir}/rpm/find-debuginfo.sh \
227 ${libdir}/rpm/find-lang.sh \
228 ${libdir}/rpm/find-prov.pl \
229 ${libdir}/rpm/find-provides.perl \
230 ${libdir}/rpm/find-req.pl \
231 ${libdir}/rpm/find-requires.perl \
232 ${libdir}/rpm/getpo.sh \
233 ${libdir}/rpm/http.req \
234 ${libdir}/rpm/javadeps.sh \
235 ${libdir}/rpm/mono-find-provides \
236 ${libdir}/rpm/mono-find-requires \
237 ${libdir}/rpm/executabledeps.sh \
238 ${libdir}/rpm/libtooldeps.sh \
239 ${libdir}/rpm/osgideps.pl \
240 ${libdir}/rpm/perldeps.pl \
241 ${libdir}/rpm/perl.prov \
242 ${libdir}/rpm/perl.req \
243 ${libdir}/rpm/php.prov \
244 ${libdir}/rpm/php.req \
245 ${libdir}/rpm/pkgconfigdeps.sh \
246 ${libdir}/rpm/pythondeps.sh \
247 ${libdir}/rpm/bin/debugedit \
248 ${libdir}/rpm/bin/rpmcache \
249 ${libdir}/rpm/bin/rpmcmp \
250 ${libdir}/rpm/bin/rpmdeps \
251 ${libdir}/rpm/bin/rpmdigest \
252 ${libdir}/rpm/bin/abi-compliance-checker.pl \
253 ${libdir}/rpm/bin/api-sanity-autotest.pl \
254 ${libdir}/rpm/bin/chroot \
255 ${libdir}/rpm/bin/cp \
256 ${libdir}/rpm/bin/dbsql \
257 ${libdir}/rpm/bin/find \
258 ${libdir}/rpm/bin/install-sh \
259 ${libdir}/rpm/bin/lua \
260 ${libdir}/rpm/bin/luac \
261 ${libdir}/rpm/bin/mkinstalldirs \
262 ${libdir}/rpm/bin/rpmlua \
263 ${libdir}/rpm/bin/rpmluac \
264 ${libdir}/rpm/bin/sqlite3 \
265 ${libdir}/rpm/lib/liblua.a \
266 ${libdir}/rpm/lib/liblua.la \
267 ${libdir}/rpm/macros.d/cmake \
268 ${libdir}/rpm/macros.d/java \
269 ${libdir}/rpm/macros.d/libtool \
270 ${libdir}/rpm/macros.d/mandriva \
271 ${libdir}/rpm/macros.d/mono \
272 ${libdir}/rpm/macros.d/perl \
273 ${libdir}/rpm/macros.d/php \
274 ${libdir}/rpm/macros.d/pkgconfig \
275 ${libdir}/rpm/macros.d/python \
276 ${libdir}/rpm/macros.d/ruby \
277 ${libdir}/rpm/macros.d/selinux \
278 ${libdir}/rpm/macros.d/tcl \
279 ${libdir}/rpm/macros.rpmbuild \
280 ${libdir}/rpm/u_pkg.sh \
281 ${libdir}/rpm/vpkg-provides.sh \
282 ${libdir}/rpm/vpkg-provides2.sh \
283 ${libdir}/rpm/perfile_rpmdeps.sh \
284 "
285
286#%rpmattr %{_rpmhome}/gem_helper.rb
287#%rpmattr %{_rpmhome}/symclash.*
288
289FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*"
290FILES_python-rpm = "${libdir}/python*/rpm"
291
292FILES_perl-module-rpm = "${libdir}/perl/*/* \
293 "
294
295FILES_perl-module-rpm-dev = "${prefix}/share/man/man3/RPM* \
296 "
297
298FILE_${PN}-dev = "${includedir}/rpm \
299 ${libdir}/librpm.a \
300 ${libdir}/librpm.la \
301 ${libdir}/librpm.so \
302 ${libdir}/librpmconstant.a \
303 ${libdir}/librpmconstant.la \
304 ${libdir}/librpmconstant.so \
305 ${libdir}/librpmdb.a \
306 ${libdir}/librpmdb.la \
307 ${libdir}/librpmdb.so \
308 ${libdir}/librpmio.a \
309 ${libdir}/librpmio.la \
310 ${libdir}/librpmio.so \
311 ${libdir}/librpmmisc.a \
312 ${libdir}/librpmmisc.la \
313 ${libdir}/librpmmisc.so \
314 ${libdir}/librpmbuild.a \
315 ${libdir}/librpmbuild.la \
316 ${libdir}/librpmbuild.so \
317 ${libdir}/pkgconfig/rpm.pc \
318 "
319
320###%{_rpmhome}/lib/libxar.a
321###%{_rpmhome}/lib/libxar.la
322###%{_rpmhome}/lib/libxar.so
323###%{_rpmhome}/lib/libjs.a
324###%{_rpmhome}/lib/libjs.la
325###%{_rpmhome}/lib/libjs.so
326###%{_rpmhome}/lib/librpmjsm.a
327###%{_rpmhome}/lib/librpmjsm.la
328###%{_rpmhome}/lib/librpmjsm.so
329
330# If base_do_unpack is refactored this may have to be adjusted
331python base_do_unpack_append() {
332 import subprocess
333
334 for url in src_uri.split():
335 try:
336 local = bb.data.expand(bb.fetch.localpath(url, localdata), localdata)
337 except bb.MalformedUrl, e:
338 raise FuncFailed('Unable to generate local path for malformed uri: %s' % e)
339 if local is None:
340 continue
341 local = os.path.realpath(local)
342
343 if local.endswith('.src.rpm') or local.endswith('.srpm'):
344 cmdname = os.path.join(bb.data.getVar('WORKDIR', localdata, 1),'rpm2cpio')
345 efile = os.path.join(bb.data.getVar('WORKDIR', localdata, 1),os.path.basename(local))
346 cmd = "%s %s | cpio -i" % (cmdname, efile)
347 cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', localdata, 1), cmd)
348 old_cwd = os.getcwd()
349 newdir = ("%s/%s" % (old_cwd, 'srpm-unpack'))
350 bb.mkdirhier(newdir)
351 os.chdir(newdir)
352 ret = subprocess.call(cmd, preexec_fn=subprocess_setup, shell=True)
353 os.chdir(old_cwd)
354 if ret != 0:
355 raise bb.build.FuncFailed('Unpack command failed: %s (%s)' % (cmd, ret))
356
357 srpm_uri = bb.data.getVar('SRPM_UNPACK', localdata, True)
358 if not srpm_uri:
359 return
360
361 # Note, not really URI's! Just a list of files
362 for url in srpm_uri.split():
363 local = os.path.join(bb.data.getVar('WORKDIR', localdata, 1), "srpm-unpack/" + url)
364 ret = oe_unpack_file(local, localdata, 'file://' + url)
365 if not ret:
366 raise bb.build.FuncFailed("oe_unpack_file failed with return value %s" % ret)
367}
368
369do_configure() {
370 # Disable tests!
371 echo "all:" > tests/Makefile.am
372
373 ./autogen.sh
374
375 oe_runconf
376}
377
378do_install_append() {
379 sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros
380 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
381 sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros
382 sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros
383
384 # Enable Debian style arbitrary tags...
385 sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
386
387 install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
388
389 # Remove unpackaged files (based on list in rpm.spec)
390 rm -f ${D}/${libdir}/rpm/{Specfile.pm,cpanflute,cpanflute2,rpmdiff,rpmdiff.cgi,sql.prov,sql.req,tcl.req,trpm}
391
392 rm -f ${D}/${mandir}/man8/rpmcache.8*
393 rm -f ${D}/${mandir}/man8/rpmgraph.8*
394 rm -f ${D}/${mandir}/*/man8/rpmcache.8*
395 rm -f ${D}/${mandir}/*/man8/rpmgraph.8*
396 rm -rf ${D}/${mandir}/{fr,ko}
397
398 rm -f ${D}/${includedir}/popt.h
399 rm -f ${D}/${libdir}/libpopt.*
400 rm -f ${D}/${libdir}/pkgconfig/popt.pc
401 rm -f ${D}/${datadir}/locale/*/LC_MESSAGES/popt.mo
402 rm -f ${D}/${mandir}/man3/popt.3
403
404 rm -f ${D}/${mandir}/man1/xar.1*
405 rm -f ${D}/${bindir}/xar
406 rm -rf ${D}/${includedir}/xar
407 rm -f ${D}/${libdir}/libxar*
408
409 rm -f ${D}/${bindir}/lz*
410 rm -f ${D}/${bindir}/unlzma
411 rm -f ${D}/${bindir}/unxz
412 rm -f ${D}/${bindir}/xz*
413 rm -rf ${D}/${includedir}/lzma*
414 rm -f ${D}/${mandir}/man1/lz*.1
415 rm -f ${D}/${libdir}/pkgconfig/liblzma*
416
417 rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.{a,la}
418 rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.{a,la}
419
420 #find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \
421 # -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'
422 #find ${D}/${libdir}/perl5 -type d -depth -exec rmdir {} 2>/dev/null ';'
423
424 # We don't want the default macro set
425 rm -rf ${D}/${libdir}/rpm/{i[3456]86*,athlon*,pentium*,x86_64*,alpha*,sparc*,ia64*,ppc*,s390*,armv[34][lb]*,armv[345]*,mips*,noarch*}
426
427 rm -f ${D}/${libdir}/rpm/dbconvert.sh
428
429 rm -f ${D}/${libdir}/rpm/libsqldb.*
430}
431
432BBCLASSEXTEND = "native"