netcat: use update-alternatives as we have netcat in busybox too
authorMarcin Juszkiewicz <hrw@openembedded.org>
Tue, 19 May 2009 13:22:09 +0000 (15:22 +0200)
committerMarcin Juszkiewicz <hrw@openembedded.org>
Tue, 19 May 2009 13:22:56 +0000 (15:22 +0200)
recipes/netcat/netcat_0.7.1.bb

index c7ceccd..cc5b9e2 100644 (file)
@@ -2,8 +2,20 @@ DESCRIPTION = "GNU Netcat"
 HOMEPAGE = "http://netcat.sourceforge.net"
 SECTION = "console/network"
 LICENSE = "GPLv2"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/netcat/netcat-${PV}.tar.bz2"
 
 inherit autotools
+
+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}
+}