diff options
Diffstat (limited to 'meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc')
-rw-r--r-- | meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc | 30 |
1 files changed, 30 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 0000000000..106fa25e14 --- /dev/null +++ b/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc | |||
@@ -0,0 +1,30 @@ | |||
1 | LICENSE = "GPL" | ||
2 | SECTION = "base" | ||
3 | SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.gz" | ||
4 | S = "${WORKDIR}/dpkg-${PV}" | ||
5 | PACKAGE_ARCH = "all" | ||
6 | PR = "r2" | ||
7 | |||
8 | do_patch () { | ||
9 | cat ${S}/scripts/update-alternatives.pl | \ | ||
10 | sed -n -e ' | ||
11 | /^\$admindir=.*staging/{ | ||
12 | x | ||
13 | s/^.*$/$D=$ENV{"D"} || ""\;/; | ||
14 | p; | ||
15 | x; | ||
16 | s,^\$admindir=.*staging.*$,$admindir="$D${localstatedir}/dpkg"\;,; | ||
17 | }; | ||
18 | s,^\$altdir=.*$,$altdir="$D${sysconfdir}/alternatives"\;,; | ||
19 | p;' > ${S}/scripts/update-alternatives | ||
20 | } | ||
21 | |||
22 | do_install () { | ||
23 | install -d ${D}${sbindir} \ | ||
24 | ${D}${localstatedir}/dpkg/alternatives \ | ||
25 | ${D}${sysconfdir}/alternatives | ||
26 | |||
27 | install -m 0755 scripts/update-alternatives ${D}${sbindir}/update-alternatives | ||
28 | } | ||
29 | |||
30 | BBCLASSEXTEND = "native" | ||