summaryrefslogtreecommitdiffstats
path: root/meta/packages/rpm/rpm_5.1.9.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/rpm/rpm_5.1.9.bb')
-rw-r--r--meta/packages/rpm/rpm_5.1.9.bb96
1 files changed, 96 insertions, 0 deletions
diff --git a/meta/packages/rpm/rpm_5.1.9.bb b/meta/packages/rpm/rpm_5.1.9.bb
new file mode 100644
index 0000000000..9ba1126533
--- /dev/null
+++ b/meta/packages/rpm/rpm_5.1.9.bb
@@ -0,0 +1,96 @@
1DESCRIPTION = "The RPM Package Manager - relaunched"
2HOMEPAGE = "http://rpm5.org/"
3LICENSE = "LGPL 2.1"
4DEPENDS = "zlib perl popt beecrypt python libpcre"
5PR = "r0"
6
7SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/${BPN}-${PV}.tar.gz \
8 file://remove-compiled-tests.patch;apply=no \
9 "
10inherit autotools gettext
11
12acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
13
14# Specify the default rpm macros in terms of adjustable variables
15rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
16
17EXTRA_OECONF = "--with-python=$PYTHONVER \
18 --with-python-inc-dir=${STAGING_INCDIR}/python$PYTHONVER \
19 --with-python-lib-dir=${libdir}/python$PYTHONVER \
20 --with-db=internal \
21 --with-db-tools-integrated \
22 --without-apidocs \
23 --without-selinux \
24 --without-lua \
25 --without-dmalloc \
26 --without-efence \
27 --without-neon \
28 --with-pcre=${libdir} \
29 --with-path-macros=${rpm_macros}"
30
31CFLAGS_append = " -DRPM_VENDOR_WINDRIVER"
32
33PACKAGES += "python-rpm"
34FILES_python-rpm = "${libdir}/python*/site-packages/rpm/_*"
35
36# The mutex needs to be POSIX/pthreads/library or we can't
37# share a database between host and target environments
38# (there is a minor performance penalty, but not one great enough
39# to justify the pain of a more optimized approach!)
40EXTRA_OECONF += "--with-mutex=POSIX/pthreads/library"
41
42do_configure() {
43 rm ${S}/db/dist/configure.in -f
44 for i in `find ${S} -name *.ac`; do
45 j=`echo $i | sed 's/.ac/.m4/g'`
46 mv $i $j
47 done
48 export ac_cv_va_copy=C99
49 autotools_do_configure
50 cd ${S}/db3
51 ${S}/db3/configure \
52 --build=${BUILD_SYS} \
53 --host=${HOST_SYS} \
54 --target=${TARGET_SYS} \
55 --prefix=${prefix} \
56 --exec_prefix=${exec_prefix} \
57 --bindir=${bindir} \
58 --sbindir=${sbindir} \
59 --libexecdir=${libexecdir} \
60 --datadir=${datadir} \
61 --sysconfdir=${sysconfdir} \
62 --sharedstatedir=${sharedstatedir} \
63 --localstatedir=${localstatedir} \
64 --libdir=${libdir} \
65 --includedir=${includedir} \
66 --oldincludedir=${oldincludedir} \
67 --infodir=${infodir} \
68 --mandir=${mandir} \
69 ${EXTRA_OECONF}
70}
71
72INSTALL_ACTIONS=""
73
74# When installing the native version, the rpm components are renamed with a
75# naming transform. We need to adjust the rpmpopt file with the same transform
76INSTALL_ACTIONS_virtclass-native="sed -i -e 's,rpm,${HOST_SYS}-rpm,' ${D}/${libdir}/rpm/rpmpopt"
77
78do_install_append() {
79 ${INSTALL_ACTIONS}
80 sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros
81}
82
83def rpm_python_version(d):
84 import os, bb
85 staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 )
86 if os.path.exists( "%s/python2.6" % staging_incdir ): return "2.6"
87 if os.path.exists( "%s/python2.5" % staging_incdir ): return "2.5"
88 if os.path.exists( "%s/python2.4" % staging_incdir ): return "2.4"
89 if os.path.exists( "%s/python2.3" % staging_incdir ): return "2.3"
90 raise "No Python in STAGING_INCDIR. Forgot to build python/python-native?"
91
92# Use a shell variable here since otherwise gettext trys to expand this at
93# parse time when it manipulates EXTRA_OECONF which fails
94export PYTHONVER = "${@rpm_python_version(d)}"
95
96BBCLASSEXTEND = "native"