summaryrefslogtreecommitdiff
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2010-07-07 14:59:02 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-24 00:46:57 +0100
commit8760cde94aca80a920cb50230d61c187d3cfeee4 (patch)
tree208300c2be553d55b36ebc6e5f644d3b19cb429a /meta/classes/package_rpm.bbclass
parent60fa21d157823b9c6ffd4a066d3afdd2f0224d17 (diff)
downloadopenembedded-core-8760cde94aca80a920cb50230d61c187d3cfeee4.tar.gz
openembedded-core-8760cde94aca80a920cb50230d61c187d3cfeee4.tar.bz2
openembedded-core-8760cde94aca80a920cb50230d61c187d3cfeee4.zip
rpm: switch to using RPM 5
Switch to RPM5 as our rpm provider of choice and update the recipe to the latest stable release. Signed-off-by: Joshua Lock <josh@linux.intel.com> Modify the package_rpm.bbclass to understand the macro and command line changes present in rpm5. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass25
1 files changed, 11 insertions, 14 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 4fdab34f67..b829d0d068 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -2,14 +2,14 @@ inherit package
#IMAGE_PKGTYPE ?= "rpm"
-RPMBUILD="rpmbuild --short-circuit ${RPMOPTS}"
IMAGE_PKGTYPE ?= "rpm"
RPMBUILDPATH="${WORKDIR}/rpm"
-RPMOPTS="--rcfile=${WORKDIR}/rpmrc"
-RPMOPTS="--rcfile=${WORKDIR}/rpmrc --target ${TARGET_SYS}"
-RPM="rpm ${RPMOPTS}"
+RPMOPTS=""
+RPMBUILDOPTS="--target ${TARGET_SYS} --define '_topdir ${RPMBUILDPATH}' --buildroot ${ROOT}"
+RPM="${BUILD_ARCH}-${BUILD_OS}-rpm ${RPMOPTS}"
+RPMBUILD="${BUILD_ARCH}-${BUILD_OS}-rpmbuild --short-circuit ${RPMBUILDOPTS}"
python write_specfile() {
version = bb.data.getVar('PV', d, 1)
@@ -21,7 +21,6 @@ python write_specfile() {
"RPMPV": "Version",
"PR": "Release",
"DESCRIPTION": "%description",
- "ROOT": "BuildRoot",
"LICENSE": "License",
"SECTION": "Group",
"pkg_postinst": "%post",
@@ -91,7 +90,9 @@ python write_specfile() {
bb.data.setVar(varname, " ".join(newdeps), d)
fix_dep_versions('RDEPENDS')
- fix_dep_versions('RRECOMMENDS')
+
+# Recommends is not supported by rpm at this time
+# fix_dep_versions('RRECOMMENDS')
bb.build.exec_func("mapping_rename_hook", d)
@@ -105,7 +106,7 @@ python write_specfile() {
fd.write("%s: %s\n" % (outstring, dep))
write_dep_field('RDEPENDS', 'Requires')
- write_dep_field('RRECOMMENDS', 'Recommends')
+# write_dep_field('RRECOMMENDS', 'Recommends')
fd.write("Summary\t: .\n")
@@ -139,14 +140,10 @@ python write_specfile() {
bb.movefile(rpm, outrpm)
}
-
rpm_prep() {
- if [ ! -e ${WORKDIR}/rpmrc ]; then
- mkdir -p ${RPMBUILDPATH}/{SPECS,RPMS/{i386,i586,i686,noarch,ppc,mips,mipsel,arm},SRPMS,SOURCES,BUILD}
- echo 'macrofiles:${STAGING_DIR_NATIVE}/usr/lib/rpm/macros:${WORKDIR}/macros' > ${WORKDIR}/rpmrc
- echo '%_topdir ${RPMBUILDPATH}' > ${WORKDIR}/macros
- echo '%_repackage_dir ${WORKDIR}' >> ${WORKDIR}/macros
- fi
+ if [ ! -e ${WORKDIR}/rpmrc ]; then
+ mkdir -p ${RPMBUILDPATH}/{SPECS,RPMS,SRPMS,SOURCES,BUILD}
+ fi
}
python do_package_rpm () {