X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=classes%2Fdebian.bbclass;h=8f6e7d88cf1b12ebae2e5b7366a8ef35c51f687a;hb=a215c2f283476776567506c2e3f969c48f7e5e3d;hp=dd0789adae9dae4d06ca4c68de7e0b859e9c4a9f;hpb=2256b7743ce7e5767a033c0682ced0e1f70dbf00;p=openembedded.git diff --git a/classes/debian.bbclass b/classes/debian.bbclass index dd0789adae..8f6e7d88cf 100644 --- a/classes/debian.bbclass +++ b/classes/debian.bbclass @@ -3,6 +3,9 @@ # before building the current package to make the packages runtime # depends are correct # +# 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_ipk[rdeptask] = "do_package" @@ -13,7 +16,7 @@ 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 @@ -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)