summaryrefslogtreecommitdiff
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-12-22 19:01:36 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-23 17:32:17 +0000
commitc01a92408d267bcc5365bf8495035f6021a49ced (patch)
treeb5b7cda0d65411e12f79b2d4e4ddc1a9eff7beca /meta/classes/package_rpm.bbclass
parent93c0e9915b5c9bf8b0877c76f89de721adfbfd66 (diff)
downloadopenembedded-core-c01a92408d267bcc5365bf8495035f6021a49ced.tar.gz
openembedded-core-c01a92408d267bcc5365bf8495035f6021a49ced.tar.bz2
openembedded-core-c01a92408d267bcc5365bf8495035f6021a49ced.tar.xz
openembedded-core-c01a92408d267bcc5365bf8495035f6021a49ced.zip
package_rpm.bbclass: Add RPMSPEC_PREAMBLE
Add a way to add arbitrary text to the top of a spec file. This can be useful for adding specific tags to the produced binaries for tracking purposes. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 469526be7..d03dc3f88 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -817,6 +817,12 @@ python write_specfile () {
except OSError:
raise bb.build.FuncFailed("unable to open spec file for writing.")
+ # RPMSPEC_PREAMBLE is a way to add arbitrary text to the top
+ # of the generated spec file
+ external_preamble = d.getVar("RPMSPEC_PREAMBLE", True)
+ if external_preamble:
+ specfile.write(external_preamble + "\n")
+
for line in spec_preamble_top:
specfile.write(line + "\n")