summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/hdparm
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-04-13 18:41:08 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-26 10:05:08 +0100
commitf8d6a50bd802cd07aac98d17348cdab662fd1d45 (patch)
tree437a5b97c696a48c55af6bf6c7091acbafbc136e /meta/recipes-extended/hdparm
parent967442e36ebe352a954e2bb7c6dd2ed725f90b0d (diff)
downloadpoky-f8d6a50bd802cd07aac98d17348cdab662fd1d45.tar.gz
hdparm: Use update-alternatives
Switch to using update-alternatives, this ensures that the call to update-alternatives and package provides are correct. (From OE-Core rev: a9b046297c10ca2b2368012803cd719ff59292d7) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/hdparm')
-rw-r--r--meta/recipes-extended/hdparm/hdparm_9.39.bb16
1 files changed, 6 insertions, 10 deletions
diff --git a/meta/recipes-extended/hdparm/hdparm_9.39.bb b/meta/recipes-extended/hdparm/hdparm_9.39.bb
index ed076cc29e..42867a90d3 100644
--- a/meta/recipes-extended/hdparm/hdparm_9.39.bb
+++ b/meta/recipes-extended/hdparm/hdparm_9.39.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24 \
8 file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \ 8 file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
9 file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09" 9 file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09"
10 10
11PR = "r1" 11PR = "r2"
12 12
13PACKAGES += "wiper" 13PACKAGES += "wiper"
14 14
@@ -24,17 +24,13 @@ SRC_URI[sha256sum] = "72d550af4526aa96f0841c79321a0ee39d636cbaf1f294e52193e90c05
24 24
25EXTRA_OEMAKE += 'STRIP="echo"' 25EXTRA_OEMAKE += 'STRIP="echo"'
26 26
27inherit update-alternatives
28
29ALTERNATIVE_LINKS = "${base_sbindir}/hdparm"
30ALTERNATIVE_PRIORITY = "100"
31
27do_install () { 32do_install () {
28 install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir} 33 install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir}
29 oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install 34 oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install
30 mv ${D}${base_sbindir}/hdparm ${D}${base_sbindir}/hdparm.${PN}
31 cp ${S}/wiper/wiper.sh ${D}/${bindir} 35 cp ${S}/wiper/wiper.sh ${D}/${bindir}
32} 36}
33
34pkg_postinst_${PN} () {
35 update-alternatives --install ${base_sbindir}/hdparm hdparm hdparm.${PN} 100
36}
37
38pkg_prerm_${PN} () {
39 update-alternatives --remove hdparm hdparm.${PN}
40}