[oe-commits] Marcin Juszkiewicz : netcat: use update-alternatives as we have netcat in busybox too

GIT User account git at amethyst.openembedded.net
Wed May 20 12:41:15 UTC 2009


Module: openembedded.git
Branch: xora/angstrom-srcpv
Commit: 8379f149a2aec4de98f7376b37e6213dccc0c1b2
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=8379f149a2aec4de98f7376b37e6213dccc0c1b2

Author: Marcin Juszkiewicz <hrw at openembedded.org>
Date:   Tue May 19 15:22:09 2009 +0200

netcat: use update-alternatives as we have netcat in busybox too

---

 recipes/netcat/netcat_0.7.1.bb |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/recipes/netcat/netcat_0.7.1.bb b/recipes/netcat/netcat_0.7.1.bb
index c7ceccd..cc5b9e2 100644
--- a/recipes/netcat/netcat_0.7.1.bb
+++ b/recipes/netcat/netcat_0.7.1.bb
@@ -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}
+}





More information about the Openembedded-commits mailing list