fbset: stop making my eyes bleed with '############' and use the update-alternatives...
authorKoen Kooi <koen@openembedded.org>
Fri, 5 Jan 2007 00:22:24 +0000 (00:22 +0000)
committerKoen Kooi <koen@openembedded.org>
Fri, 5 Jan 2007 00:22:24 +0000 (00:22 +0000)
~lart coredump and his templates

packages/fbset/fbset_2.1.bb

index 28161f7..ab50511 100644 (file)
@@ -6,40 +6,27 @@
 # Date: 28-May-06
 
 DESCRIPTION = "The fbset console tool"
-HOMEPAGE = ""
 LICENSE = "GPL"
 
-######################################################################################
+PR = "r2"
 
 SRC_URI = "http://ftp.debian.org/debian/pool/main/f/fbset/fbset_2.1.orig.tar.gz \
-          file://makefile.patch;patch=1"
+           file://makefile.patch;patch=1"
 
-######################################################################################
+inherit autotools update-alternatives
 
-PR = "r1"
-PARALLEL_MAKE=""
-
-######################################################################################
-
-inherit autotools
-
-######################################################################################
+PARALLEL_MAKE = ""
 
 do_install() {
-       install -d ${D}/usr/sbin ${D}/usr/share/man/man8 ${D}/usr/share/man/man5
-
-       install -m 0755 ${WORKDIR}/${P}/fbset ${D}/usr/sbin/fbset.real
-
-       install -m 0644 ${WORKDIR}/${P}/*.5 ${D}/usr/share/man/man5
-       install -m 0644 ${WORKDIR}/${P}/*.8 ${D}/usr/share/man/man8
+        install -d ${D}/usr/sbin ${D}/usr/share/man/man8 ${D}/usr/share/man/man5
+        install -m 0755 ${WORKDIR}/${P}/fbset ${D}/usr/sbin/fbset.real
+        install -m 0644 ${WORKDIR}/${P}/*.5 ${D}/usr/share/man/man5
+        install -m 0644 ${WORKDIR}/${P}/*.8 ${D}/usr/share/man/man8
 }
 
-######################################################################################
+ALTERNATIVE_NAME = "fbset"
+ALTERNATIVE_LINK = "${sbindir}/${ALTERNATIVE_NAME}"
+ALTERNATIVE_PATH = "${sbindir}/fbset.real"
+ALTERNATIVE_PRIORITY = "55"
 
-pkg_postinst_${PN}() {
-       update-alternatives --install /usr/sbin/fbset fbset /usr/sbin/fbset.real 55
-}
 
-pkg_postrm_${PN}() {
-       update-alternatives --remove fbset /usr/sbin/fbset.real
-}