1 include $(TOPDIR
)/rules.mk
7 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
8 PKG_SOURCE_URL
:=@SF
/$(PKG_NAME
)
9 PKG_MD5SUM
:=0a29eff1736ddb5effd0b1ec1f6fe0ef
12 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
13 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
15 include $(INCLUDE_DIR
)/package.mk
20 TITLE
:=A feature-rich network debugging and exploration tool.
21 URL
:=http
://netcat.sourceforge.net
/
24 define Package
/netcat
/description
25 Netcat is a featured networking utility which reads and writes data across network connections
, using the TCP
/IP protocol.
26 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.
29 define Build
/Configure
30 $(call Build
/Configure
/Default
, \
32 --with-included-getopt \
37 DESTDIR
="$(PKG_INSTALL_DIR)" \
38 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
42 define Package
/netcat
/install
43 $(INSTALL_DIR
) $(1)/usr
/bin
44 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/netcat \
48 define Package
/netcat
/postinst
50 if
[ -e
$${IPKG_INSTROOT}/usr
/bin
/nc
]; then
51 rm -rf
$${IPKG_INSTROOT}/usr
/bin
/nc
;
53 ln
-s .
/netcat
$${IPKG_INSTROOT}/usr
/bin
/nc
56 define Package
/netcat
/postrm
58 rm $${IPKG_INSTROOT}/usr
/bin
/nc
59 ln
-s ..
/..
/bin
/busybox
$${IPKG_INSTROOT}/usr
/bin
/nc
60 $${IPKG_INSTROOT}/usr
/bin
/nc
2>&1 | grep
'applet not found' > /dev
/null
2>&1 && rm $${IPKG_INSTROOT}/usr
/bin
/nc
65 $(eval
$(call BuildPackage
,netcat
))