aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-01 17:32:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-03 11:09:02 +0100
commit2668104a5c16b483e978a2e1a1540f8774738650 (patch)
tree37951a43b711d2465fede88ff8a43011f103b64f /meta/classes/package_rpm.bbclass
parent1a7ff8ab59945e89d3062f64fe5fc71e93eda809 (diff)
downloadopenembedded-core-contrib-2668104a5c16b483e978a2e1a1540f8774738650.tar.gz
package_rpm: Add custom extension support for spec generation.
Add hooks to allow customisation of the rpm spec files. Since python functions aren't visible in the data store, one variable is used to trigger the call to a separately named function. A dummy function is not provided since this then triggers various class ordering complexities which are best avoided. Ultimately this will be replaced by a refactor of the code to generate the spec file using a python class. This allows the tizen layer to add hooks for the security manifests for example. (From OE-Core rev: 03ac91815013c0e85c4694b3ab849257e658aeba) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 0a32b3e5dc..1ea7549621 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -293,6 +293,7 @@ python write_specfile () {
spec_files_bottom = []
perfiledeps = (d.getVar("MERGEPERFILEDEPS", True) or "0") == "0"
+ extra_pkgdata = (d.getVar("RPM_EXTRA_PKGDATA", True) or "0") == "1"
for pkg in packages.split():
localdata = bb.data.createCopy(d)
@@ -373,6 +374,8 @@ python write_specfile () {
else:
bb.note("Creating RPM package for %s" % splitname)
spec_files_top.append('%files')
+ if extra_pkgdata:
+ package_rpm_extra_pkgdata(splitname, spec_files_top, localdata)
spec_files_top.append('%defattr(-,-,-,-)')
if file_list:
bb.note("Creating RPM package for %s" % splitname)
@@ -479,6 +482,8 @@ python write_specfile () {
bb.note("Not creating empty RPM package for %s" % splitname)
else:
spec_files_bottom.append('%%files -n %s' % splitname)
+ if extra_pkgdata:
+ package_rpm_extra_pkgdata(splitname, spec_files_bottom, localdata)
spec_files_bottom.append('%defattr(-,-,-,-)')
if file_list:
bb.note("Creating RPM package for %s" % splitname)