TITLE:=A feature-rich network debugging and exploration tool.
URL:=http://netcat.sourceforge.net/
endef
definePackage/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
defineBuild/Configure
$(call Build/Configure/Default, \
--disable-rpath \
--with-included-getopt \
)
endef
definePackage/netcat/install
$(INSTALL_DIR)$(1)/usr/bin
$(INSTALL_BIN)$(PKG_INSTALL_DIR)/usr/bin/netcat \
$(1)/usr/bin
endef
definePackage/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
definePackage/netcat/postrm
#!/bin/sh
rm$${IPKG_INSTROOT}/usr/bin/nc
ln-s../../bin/busybox$${IPKG_INSTROOT}/usr/bin/nc
$${IPKG_INSTROOT}/usr/bin/nc2>&1|grep'applet not found'>/dev/null2>&1&&rm$${IPKG_INSTROOT}/usr/bin/nc