mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
967442e36e
commit
f8d6a50bd8
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24 \
|
|||||||
file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
|
file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
|
||||||
file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09"
|
file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09"
|
||||||
|
|
||||||
PR = "r1"
|
PR = "r2"
|
||||||
|
|
||||||
PACKAGES += "wiper"
|
PACKAGES += "wiper"
|
||||||
|
|
||||||
@@ -24,17 +24,13 @@ SRC_URI[sha256sum] = "72d550af4526aa96f0841c79321a0ee39d636cbaf1f294e52193e90c05
|
|||||||
|
|
||||||
EXTRA_OEMAKE += 'STRIP="echo"'
|
EXTRA_OEMAKE += 'STRIP="echo"'
|
||||||
|
|
||||||
|
inherit update-alternatives
|
||||||
|
|
||||||
|
ALTERNATIVE_LINKS = "${base_sbindir}/hdparm"
|
||||||
|
ALTERNATIVE_PRIORITY = "100"
|
||||||
|
|
||||||
do_install () {
|
do_install () {
|
||||||
install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir}
|
install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir}
|
||||||
oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install
|
oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install
|
||||||
mv ${D}${base_sbindir}/hdparm ${D}${base_sbindir}/hdparm.${PN}
|
|
||||||
cp ${S}/wiper/wiper.sh ${D}/${bindir}
|
cp ${S}/wiper/wiper.sh ${D}/${bindir}
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postinst_${PN} () {
|
|
||||||
update-alternatives --install ${base_sbindir}/hdparm hdparm hdparm.${PN} 100
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_prerm_${PN} () {
|
|
||||||
update-alternatives --remove hdparm hdparm.${PN}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user