[oe-commits] Marcin Juszkiewicz : netcat: use update-alternatives class (thx Koen)

GIT User account git at amethyst.openembedded.net
Tue May 19 19:53:34 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 1e0d96b7d4e6b2643e2551fa8dcebd4df2045fda
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=1e0d96b7d4e6b2643e2551fa8dcebd4df2045fda

Author: Marcin Juszkiewicz <hrw at openembedded.org>
Date:   Tue May 19 21:34:57 2009 +0200

netcat: use update-alternatives class (thx Koen)

---

 recipes/netcat/netcat_0.7.1.bb |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/recipes/netcat/netcat_0.7.1.bb b/recipes/netcat/netcat_0.7.1.bb
index cc5b9e2..7c4dfc5 100644
--- a/recipes/netcat/netcat_0.7.1.bb
+++ b/recipes/netcat/netcat_0.7.1.bb
@@ -2,20 +2,17 @@ DESCRIPTION = "GNU Netcat"
 HOMEPAGE = "http://netcat.sourceforge.net"
 SECTION = "console/network"
 LICENSE = "GPLv2"
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/netcat/netcat-${PV}.tar.bz2"
 
-inherit autotools
+inherit autotools update-alternatives
 
 do_install_append() {
 	mv ${D}${bindir}/nc ${D}${bindir}/nc.${PN}
 }
 
-pkg_postinst_${PN} () {
-	update-alternatives --install ${bindir}/nc nc nc.${PN} 100
-}
-
-pkg_prerm_${PN} () {
-	update-alternatives --remove nc nc.${PN}
-}
+ALTERNATIVE_NAME = "nc"
+ALTERNATIVE_LINK = "${bindir}/nc"
+ALTERNATIVE_PATH = "${bindir}/nc.${PN}"
+ALTERNATIVE_PRIORITY = "100"





More information about the Openembedded-commits mailing list