bc: Use u-a on 'dc'
authorTom Rini <tom_rini@mentor.com>
Fri, 12 Nov 2010 01:32:59 +0000 (18:32 -0700)
committerGrazvydas Ignotas <notasas@gmail.com>
Tue, 9 Oct 2012 22:00:12 +0000 (01:00 +0300)
Signed-off-by: Tom Rini <tom_rini@mentor.com>
recipes/bc/bc_1.06.bb

index d95fcad..151ab1c 100644 (file)
@@ -2,8 +2,22 @@ DESCRIPTION = "An arbitrary precision calculator language."
 SECTION = "console/utils"
 SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz"
 LICENSE = "GPL"
+PR = "r1"
 
 inherit autotools
 
+do_install () {
+       autotools_do_install
+       mv ${D}${bindir}/dc ${D}${bindir}/dc.${PN}
+}
+
+pkg_postinst_${PN} () {
+       update-alternatives --install ${bindir}/dc dc dc.${PN} 100
+}
+
+pkg_prerm_${PN} () {
+       update-alternatives --remove dc dc.${PN}
+}
+
 SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117"
 SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33"