summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorLeonid Borisenko <ive.found@gmail.com>2012-11-16 18:29:26 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-28 00:52:32 +0000
commit66055fbeddeb5f5b1fe84c24085f30daa6cfe003 (patch)
treebbe91c863fff2091d57c608c8e6f01e9ba28a65e /meta/classes/package_rpm.bbclass
parentbe77f3138cc1c4131b74924b275acef692f46b26 (diff)
downloadpoky-66055fbeddeb5f5b1fe84c24085f30daa6cfe003.tar.gz
package_{ipk, deb, rpm}.bbclass: support additional user-defined metadata
Additional metadata from user-defined variable is written into control/spec file of binary package. Three variables are searched for adiitional package metadata: * PACKAGE_ADD_METADATA_<PKGTYPE>_<PN> * PACKAGE_ADD_METADATA_<PKGTYPE> * PACKAGE_ADD_METADATA First found variable with defined value wins. <PN> is a package name. <PKGTYPE> is a distinct name of specific package type: * IPK for .ipk packages * DEB for .deb packages * RPM for .rpm packages Variable can contain multiple [one-line] metadata fields separated by literal sequence '\n'. Separator can be redefined through variable flag 'separator'. In package control/spec file separator is replaced by newline character. (From OE-Core rev: 773d7352309241e15ef5acadcbe416bdd7d45c18) Signed-off-by: Leonid Borisenko <ive.found@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.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.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index acbb18d686..2d193b7465 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -737,6 +737,7 @@ python write_specfile () {
737 srcmaintainer = d.getVar('MAINTAINER', True) 737 srcmaintainer = d.getVar('MAINTAINER', True)
738 srchomepage = d.getVar('HOMEPAGE', True) 738 srchomepage = d.getVar('HOMEPAGE', True)
739 srcdescription = d.getVar('DESCRIPTION', True) or "." 739 srcdescription = d.getVar('DESCRIPTION', True) or "."
740 srccustomtagschunk = get_package_additional_metadata("rpm", d)
740 741
741 srcdepends = strip_multilib_deps(d.getVar('DEPENDS', True), d) 742 srcdepends = strip_multilib_deps(d.getVar('DEPENDS', True), d)
742 srcrdepends = [] 743 srcrdepends = []
@@ -790,6 +791,7 @@ python write_specfile () {
790 splitlicense = (localdata.getVar('LICENSE', True) or "") 791 splitlicense = (localdata.getVar('LICENSE', True) or "")
791 splitsection = (localdata.getVar('SECTION', True) or "") 792 splitsection = (localdata.getVar('SECTION', True) or "")
792 splitdescription = (localdata.getVar('DESCRIPTION', True) or ".") 793 splitdescription = (localdata.getVar('DESCRIPTION', True) or ".")
794 splitcustomtagschunk = get_package_additional_metadata("rpm", localdata)
793 795
794 translate_vers('RDEPENDS', localdata) 796 translate_vers('RDEPENDS', localdata)
795 translate_vers('RRECOMMENDS', localdata) 797 translate_vers('RRECOMMENDS', localdata)
@@ -863,6 +865,9 @@ python write_specfile () {
863 spec_preamble_bottom.append('License: %s' % splitlicense) 865 spec_preamble_bottom.append('License: %s' % splitlicense)
864 spec_preamble_bottom.append('Group: %s' % splitsection) 866 spec_preamble_bottom.append('Group: %s' % splitsection)
865 867
868 if srccustomtagschunk != splitcustomtagschunk:
869 spec_preamble_bottom.append(splitcustomtagschunk)
870
866 # Replaces == Obsoletes && Provides 871 # Replaces == Obsoletes && Provides
867 robsoletes = bb.utils.explode_dep_versions2(splitrobsoletes or "") 872 robsoletes = bb.utils.explode_dep_versions2(splitrobsoletes or "")
868 rprovides = bb.utils.explode_dep_versions2(splitrprovides or "") 873 rprovides = bb.utils.explode_dep_versions2(splitrprovides or "")
@@ -965,6 +970,8 @@ python write_specfile () {
965 spec_preamble_top.append('Group: %s' % srcsection) 970 spec_preamble_top.append('Group: %s' % srcsection)
966 spec_preamble_top.append('Packager: %s' % srcmaintainer) 971 spec_preamble_top.append('Packager: %s' % srcmaintainer)
967 spec_preamble_top.append('URL: %s' % srchomepage) 972 spec_preamble_top.append('URL: %s' % srchomepage)
973 if srccustomtagschunk:
974 spec_preamble_top.append(srccustomtagschunk)
968 tail_source(d) 975 tail_source(d)
969 976
970 # Replaces == Obsoletes && Provides 977 # Replaces == Obsoletes && Provides