summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm_5.1.10.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm_5.1.10.bb')
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.1.10.bb137
1 files changed, 137 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_5.1.10.bb b/meta/recipes-devtools/rpm/rpm_5.1.10.bb
new file mode 100644
index 0000000000..a7097f760c
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm_5.1.10.bb
@@ -0,0 +1,137 @@
1DESCRIPTION = "The RPM Package Manager - relaunched"
2DESCRIPTION_rpm-build = "The RPM Package Manager rpmbuild and related commands."
3HOMEPAGE = "http://rpm5.org/"
4LICENSE = "LGPL 2.1"
5DEPENDS = "zlib perl popt beecrypt python libpcre elfutils"
6PR = "r2"
7
8SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/SNAPSHOT/${BPN}-${PV}.tar.gz \
9 file://remove-compiled-tests.patch;apply=no \
10 file://perfile_rpmdeps.sh \
11 "
12inherit autotools gettext
13
14acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
15
16# Specify the default rpm macros in terms of adjustable variables
17rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
18
19EXTRA_OECONF = "--with-python=$PYTHONVER \
20 --with-python-inc-dir=${STAGING_INCDIR}/python$PYTHONVER \
21 --with-python-lib-dir=${libdir}/python$PYTHONVER \
22 --with-db=internal \
23 --with-db-tools-integrated \
24 --with-libelf \
25 --with-file=internal \
26 --without-apidocs \
27 --without-selinux \
28 --without-lua \
29 --without-dmalloc \
30 --without-efence \
31 --without-neon \
32 --with-pcre=${libdir} \
33 --with-path-macros=${rpm_macros} \
34 --with-bugreport=http://bugzilla.pokylinux.org"
35
36CFLAGS_append = " -DRPM_VENDOR_WINDRIVER"
37
38PACKAGES =+ "rpm-build python-rpm python-rpm-dbg"
39
40SOLIBS = "5.0.so"
41
42FILES_rpm-build = "${bindir}/*-rpmbuild \
43 ${bindir}/*-gendiff \
44 ${bindir}/*-rpmspecdump \
45 ${libdir}/rpm/helpers/* \
46 ${libdir}/rpm/*brp* \
47 ${libdir}/rpm/*check-files \
48 ${libdir}/rpm/*cross-build \
49 ${libdir}/rpm/*debugedit \
50 ${libdir}/rpm/*dep* \
51 ${libdir}/rpm/*prov* \
52 ${libdir}/rpm/*req* \
53 ${libdir}/rpm/*find* \
54 ${libdir}/rpm/qf/* \
55 "
56
57FILES_python-rpm = "${libdir}/python*/rpm/_*"
58FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*"
59
60# The mutex needs to be POSIX/pthreads/library or we can't
61# share a database between host and target environments
62# (there is a minor performance penalty, but not one great enough
63# to justify the pain of a more optimized approach!)
64EXTRA_OECONF += "--with-mutex=POSIX/pthreads/library"
65
66do_configure() {
67 rm ${S}/db/dist/configure.in -f
68 for i in `find ${S} -name *.ac`; do
69 j=`echo $i | sed 's/.ac/.m4/g'`
70 mv $i $j
71 done
72 export ac_cv_va_copy=C99
73 autotools_do_configure
74 cd ${S}/db3
75 ${S}/db3/configure \
76 --build=${BUILD_SYS} \
77 --host=${HOST_SYS} \
78 --target=${TARGET_SYS} \
79 --prefix=${prefix} \
80 --exec_prefix=${exec_prefix} \
81 --bindir=${bindir} \
82 --sbindir=${sbindir} \
83 --libexecdir=${libexecdir} \
84 --datadir=${datadir} \
85 --sysconfdir=${sysconfdir} \
86 --sharedstatedir=${sharedstatedir} \
87 --localstatedir=${localstatedir} \
88 --libdir=${libdir} \
89 --includedir=${includedir} \
90 --oldincludedir=${oldincludedir} \
91 --infodir=${infodir} \
92 --mandir=${mandir} \
93 ${EXTRA_OECONF}
94}
95
96INSTALL_ACTIONS=""
97
98# When installing the native version, the rpm components are renamed with a
99# naming transform. We need to adjust the rpmpopt file with the same transform
100INSTALL_ACTIONS_virtclass-native="sed -i -e 's,rpm,${HOST_SYS}-rpm,' ${D}/${libdir}/rpm/rpmpopt"
101
102do_install_append() {
103 ${INSTALL_ACTIONS}
104 sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros
105 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
106 sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros
107 sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros
108 sed -i -e 's,pythondeps.sh,${HOST_SYS}-pythondeps.sh,' ${D}/${libdir}/rpm/macros
109 sed -i -e 's,phpdeps.sh,${HOST_SYS}-phpdeps.sh,' ${D}/${libdir}/rpm/macros
110 sed -i -e 's,javadeps.sh,${HOST_SYS}-javadeps.sh,' ${D}/${libdir}/rpm/macros
111 sed -i -e 's,libtooldeps.sh,${HOST_SYS}-libtooldeps.sh,' ${D}/${libdir}/rpm/macros
112 sed -i -e 's,pkgconfigdeps.sh,${HOST_SYS}-pkgconfigdeps.sh,' ${D}/${libdir}/rpm/macros
113 sed -i -e 's,executabledeps.sh,${HOST_SYS}-executabledeps.sh,' ${D}/${libdir}/rpm/macros
114 sed -i -e 's,perl.prov,${HOST_SYS}-perl.prov,' ${D}/${libdir}/rpm/macros
115 sed -i -e 's,perl.req,${HOST_SYS}-perl.req,' ${D}/${libdir}/rpm/macros
116
117 install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
118
119 mv ${D}/${libdir}/python$PYTHONVER/rpm/${HOST_SYS}-__init__.py \
120 ${D}/${libdir}/python$PYTHONVER/rpm/__init__.py
121
122}
123
124def rpm_python_version(d):
125 import os, bb
126 staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 )
127 if os.path.exists( "%s/python2.6" % staging_incdir ): return "2.6"
128 if os.path.exists( "%s/python2.5" % staging_incdir ): return "2.5"
129 if os.path.exists( "%s/python2.4" % staging_incdir ): return "2.4"
130 if os.path.exists( "%s/python2.3" % staging_incdir ): return "2.3"
131 raise "No Python in STAGING_INCDIR. Forgot to build python/python-native?"
132
133# Use a shell variable here since otherwise gettext trys to expand this at
134# parse time when it manipulates EXTRA_OECONF which fails
135export PYTHONVER = "${@rpm_python_version(d)}"
136
137BBCLASSEXTEND = "native"