diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 14:31:25 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 16:43:26 +0000 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg.inc | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.gz blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.zip |
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to
hold all of the layers that we import with git-subtree.
Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg.inc')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg.inc | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg.inc b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg.inc new file mode 100644 index 000000000..3d9e7e305 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg.inc @@ -0,0 +1,79 @@ +SUMMARY = "Package maintenance system from Debian" +LICENSE = "GPLv2.0+" +SECTION = "base" + +SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz" + +SRC_URI_append_class-native = " file://0001-When-running-do_package_write_deb-we-have-trees-of-h.patch" + +DEPENDS = "zlib bzip2 perl ncurses" +DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native" +RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz run-postinsts perl" +RDEPENDS_${PN}_class-native = "xz-native" + +inherit autotools gettext perlnative pkgconfig systemd + +python () { + if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): + pn = d.getVar('PN', True) + d.setVar('SYSTEMD_SERVICE_%s' % (pn), 'dpkg-configure.service') +} + +export PERL = "${bindir}/perl" +PERL_class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl" + +export PERL_LIBDIR = "${libdir}/perl" +PERL_LIBDIR_class-native = "${libdir}/perl-native/perl" + +EXTRA_OECONF = "\ + --disable-dselect \ + --enable-start-stop-daemon \ + --with-zlib \ + --with-bz2 \ + --without-liblzma \ + --without-selinux \ + " + +EXTRA_OECONF += "TAR=tar" + +do_configure () { + echo >> ${S}/m4/compiler.m4 + sed -i -e 's#PERL_LIBDIR=.*$#PERL_LIBDIR="${libdir}/perl"#' ${S}/configure + autotools_do_configure +} + +do_install_append () { + if [ "${PN}" = "dpkg-native" ]; then + # update-alternatives doesn't have an offline mode + rm ${D}${bindir}/update-alternatives + sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-* + else + sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-* + fi + + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)};then + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/dpkg-configure.service ${D}${systemd_unitdir}/system/ + sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + -e 's,@BINDIR@,${bindir},g' \ + -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \ + ${D}${systemd_unitdir}/system/dpkg-configure.service + fi +} + +PROV = "virtual/update-alternatives" +PROV_class-native = "" + +PROVIDES += "${PROV}" + +PACKAGES =+ "update-alternatives-dpkg" +FILES_update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives" +RPROVIDES_update-alternatives-dpkg += "update-alternatives" + +PACKAGES += "${PN}-perl" +FILES_${PN}-perl = "${libdir}/perl" + +BBCLASSEXTEND = "native" + + |