diff options
author | Adam Gensler <openwrt@a.gnslr.us> | 2015-01-06 19:10:34 -0500 |
---|---|---|
committer | Adam Gensler <openwrt@a.gnslr.us> | 2015-01-06 19:10:34 -0500 |
commit | 675b31cdf8b0a8c7785e89222f1c8d6879542730 (patch) | |
tree | da250105b93c8a3b8302efb7eefd02caad1d8f77 /net/netcat/Makefile | |
parent | 296ecfdbdf1b9e5c7d2643bc6e71a46ee1aa2c0b (diff) |
Add netcat package from old 14.07 package repository.
Signed-off-by: Adam Gensler openwrt@a.gnslr.us
Diffstat (limited to 'net/netcat/Makefile')
-rw-r--r-- | net/netcat/Makefile | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/net/netcat/Makefile b/net/netcat/Makefile new file mode 100644 index 000000000..0248f0d13 --- /dev/null +++ b/net/netcat/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=netcat +PKG_VERSION:=0.7.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=0a29eff1736ddb5effd0b1ec1f6fe0ef +PKG_MAINTAINER:=Adam Gensler <openwrt@a.gnslr.us> +PKG_LICENSE:=GPL-2.0 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/netcat + SECTION:=net + CATEGORY:=Network + TITLE:=A feature-rich network debugging and exploration tool. + URL:=http://netcat.sourceforge.net/ +endef + +define Package/netcat/description + Netcat is a featured networking utility which reads and writes data across network connections, using the TCP/IP protocol. + It is designed to be a reliable "back-end" tool that can be used directly or easily driven by other programs and scripts. At the same time, it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-rpath \ + --with-included-getopt \ + ) +endef + +define Package/netcat/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/netcat \ + $(1)/usr/bin +endef + +define Package/netcat/postinst +#!/bin/sh +if [ -e $${IPKG_INSTROOT}/usr/bin/nc ]; then + rm -rf $${IPKG_INSTROOT}/usr/bin/nc; +fi +ln -s ./netcat $${IPKG_INSTROOT}/usr/bin/nc +endef + +define Package/netcat/postrm +#!/bin/sh +rm $${IPKG_INSTROOT}/usr/bin/nc +ln -s ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/nc +$${IPKG_INSTROOT}/usr/bin/nc 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/nc +exit 0 +endef + + +$(eval $(call BuildPackage,netcat)) |