summaryrefslogtreecommitdiff
path: root/recipes/netcat/netcat_0.7.1.bb
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openembedded.org>2009-05-19 21:34:57 +0200
committerMarcin Juszkiewicz <hrw@openembedded.org>2009-05-19 21:46:45 +0200
commit1e0d96b7d4e6b2643e2551fa8dcebd4df2045fda (patch)
tree6ca870a03dd85579c2e0985127c68b885877418d /recipes/netcat/netcat_0.7.1.bb
parent199f38cafe7019a0c20824dd0da945dcbbbc478c (diff)
netcat: use update-alternatives class (thx Koen)
Diffstat (limited to 'recipes/netcat/netcat_0.7.1.bb')
-rw-r--r--recipes/netcat/netcat_0.7.1.bb15
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 cc5b9e2d6e..7c4dfc5375 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"