summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-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 469526be7a..d03dc3f883 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")