summaryrefslogtreecommitdiff
path: root/classes/package_deb.bbclass
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openembedded.org>2007-08-09 08:41:19 +0000
committerMarcin Juszkiewicz <hrw@openembedded.org>2007-08-09 08:41:19 +0000
commit9d829ed05c295df608b4fc108eb1c628fd06fd39 (patch)
treec1b27cfe4498f8abef1a61325922906f3e6a32ff /classes/package_deb.bbclass
parent1434b204e16e87b7f59f074f3036d5dcbcf0116f (diff)
parent6ccac10beeaaa02a86081bd6179fd57c208ad6b1 (diff)
merge of '76e1e69496801009ea0aa69c84f76e858978ab99'
and 'db976a98427dd6a195e2cf167e225de2d0206aea'
Diffstat (limited to 'classes/package_deb.bbclass')
-rw-r--r--classes/package_deb.bbclass18
1 files changed, 15 insertions, 3 deletions
diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass
index 9697426d5d..9a8db4f8f2 100644
--- a/classes/package_deb.bbclass
+++ b/classes/package_deb.bbclass
@@ -1,5 +1,11 @@
+#
+# Copyright 2006-2007 OpenedHand Ltd.
+#
+
inherit package
-DEPENDS_prepend="${@["dpkg-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}"
+
+PACKAGE_EXTRA_DEPENDS += "dpkg-native fakeroot-native"
+
BOOTSTRAP_EXTRA_RDEPENDS += "dpkg"
DISTRO_EXTRA_RDEPENDS += "dpkg"
PACKAGE_WRITE_FUNCS += "do_package_deb"
@@ -130,6 +136,7 @@ python do_package_deb () {
continue
controldir = os.path.join(root, 'DEBIAN')
bb.mkdirhier(controldir)
+ os.chmod(controldir, 0755)
try:
ctrlfile = file(os.path.join(controldir, 'control'), 'wb')
# import codecs
@@ -138,13 +145,17 @@ python do_package_deb () {
raise bb.build.FuncFailed("unable to open control file for writing.")
fields = []
- fields.append(["Version: %s-%s\n", ['PV', 'PR']])
+ pe = bb.data.getVar('PE', d, 1)
+ if pe and int(pe) > 0:
+ fields.append(["Version: %s:%s-%s\n", ['PE', 'PV', 'PR']])
+ else:
+ fields.append(["Version: %s-%s\n", ['PV', 'PR']])
fields.append(["Description: %s\n", ['DESCRIPTION']])
fields.append(["Section: %s\n", ['SECTION']])
fields.append(["Priority: %s\n", ['PRIORITY']])
fields.append(["Maintainer: %s\n", ['MAINTAINER']])
fields.append(["Architecture: %s\n", ['TARGET_ARCH']])
- fields.append(["OE: %s\n", ['P']])
+ fields.append(["OE: %s\n", ['PN']])
fields.append(["Homepage: %s\n", ['HOMEPAGE']])
# Package, Version, Maintainer, Description - mandatory
@@ -205,6 +216,7 @@ python do_package_deb () {
scriptfile = file(os.path.join(controldir, script), 'w')
except OSError:
raise bb.build.FuncFailed("unable to open %s script file for writing." % script)
+ scriptfile.write("#!/bin/sh\n")
scriptfile.write(scriptvar)
scriptfile.close()
os.chmod(os.path.join(controldir, script), 0755)