summaryrefslogtreecommitdiff
path: root/classes/debian.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/debian.bbclass')
-rw-r--r--classes/debian.bbclass24
1 files changed, 15 insertions, 9 deletions
diff --git a/classes/debian.bbclass b/classes/debian.bbclass
index a0c78a25f4..1a2c7da441 100644
--- a/classes/debian.bbclass
+++ b/classes/debian.bbclass
@@ -1,19 +1,22 @@
-STAGING_PKGMAPS_DIR = "${STAGING_DIR}/pkgmaps/debian"
-
# Debian package renaming only occurs when a package is built
# We therefore have to make sure we build all runtime packages
# before building the current package to make the packages runtime
# depends are correct
-BUILD_ALL_DEPS = "1"
-
+#
+# Custom library package names can be defined setting
+# DEBIANNAME_ + pkgname to the desired name.
+#
# Better expressed as ensure all RDEPENDS package before we package
# This means we can't have circular RDEPENDS/RRECOMMENDS
-do_package_write[rdeptask] = "do_package"
+do_package_write_ipk[rdeptask] = "do_package"
+do_package_write_deb[rdeptask] = "do_package"
+do_package_write_tar[rdeptask] = "do_package"
+do_package_write_rpm[rdeptask] = "do_package"
python debian_package_name_hook () {
import glob, copy, stat, errno, re
- workdir = bb.data.getVar('WORKDIR', d, 1)
+ pkgdest = bb.data.getVar('PKGDEST', d, 1)
packages = bb.data.getVar('PACKAGES', d, 1)
def socrunch(s):
@@ -42,7 +45,7 @@ python debian_package_name_hook () {
sonames = []
has_bins = 0
has_libs = 0
- pkg_dir = os.path.join(workdir, "install", orig_pkg)
+ pkg_dir = os.path.join(pkgdest, orig_pkg)
for root, dirs, files in os.walk(pkg_dir):
if bin_re.match(root) and files:
has_bins = 1
@@ -51,7 +54,7 @@ python debian_package_name_hook () {
for f in files:
if so_re.match(f):
fp = os.path.join(root, f)
- cmd = (bb.data.getVar('BUILD_PREFIX', d, 1) or "") + "objdump -p " + fp + " 2>/dev/null"
+ cmd = "PATH=" + bb.data.getVar('PATH', d, 1) + " " + (bb.data.getVar('TARGET_PREFIX', d, 1) or "") + "objdump -p " + fp + " 2>/dev/null"
fd = os.popen(cmd)
lines = fd.readlines()
fd.close()
@@ -88,7 +91,10 @@ python debian_package_name_hook () {
for pkg in packages.split():
if (bb.data.getVar('PKG_' + pkg, d) or bb.data.getVar('DEBIAN_NOAUTONAME_' + pkg, d)):
continue
- if pkg == orig_pkg:
+ debian_pn = bb.data.getVar('DEBIANNAME_' + pkg, d)
+ if debian_pn:
+ newpkg = debian_pn
+ elif pkg == orig_pkg:
newpkg = pkgname
else:
newpkg = pkg.replace(orig_pkg, devname, 1)