diff options
Diffstat (limited to 'meta/recipes-devtools/update-alternatives')
-rw-r--r-- | meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc | 30 | ||||
-rw-r--r-- | meta/recipes-devtools/update-alternatives/update-alternatives-dpkg_1.13.22.bb | 7 |
2 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc b/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc new file mode 100644 index 000000000..106fa25e1 --- /dev/null +++ b/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc @@ -0,0 +1,30 @@ +LICENSE = "GPL" +SECTION = "base" +SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.gz" +S = "${WORKDIR}/dpkg-${PV}" +PACKAGE_ARCH = "all" +PR = "r2" + +do_patch () { + cat ${S}/scripts/update-alternatives.pl | \ + sed -n -e ' + /^\$admindir=.*staging/{ + x + s/^.*$/$D=$ENV{"D"} || ""\;/; + p; + x; + s,^\$admindir=.*staging.*$,$admindir="$D${localstatedir}/dpkg"\;,; + }; + s,^\$altdir=.*$,$altdir="$D${sysconfdir}/alternatives"\;,; + p;' > ${S}/scripts/update-alternatives +} + +do_install () { + install -d ${D}${sbindir} \ + ${D}${localstatedir}/dpkg/alternatives \ + ${D}${sysconfdir}/alternatives + + install -m 0755 scripts/update-alternatives ${D}${sbindir}/update-alternatives +} + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg_1.13.22.bb b/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg_1.13.22.bb new file mode 100644 index 000000000..5d38d5d36 --- /dev/null +++ b/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg_1.13.22.bb @@ -0,0 +1,7 @@ +require update-alternatives-dpkg.inc + +PROVIDES += "virtual/update-alternatives" +RPROVIDES_${PN} += "update-alternatives" +EXTRA_RDEPENDS = "perl dpkg" +EXTRA_RDEPENDS_virtclass-native = "" +RDEPENDS_${PN} += "${EXTRA_RDEPENDS}" |