lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (1842B)


      1 #
      2 # Copyright (C) 2015 OpenWrt.org
      3 #
      4 # This is free software, licensed under the GNU General Public License v2.
      5 # See /LICENSE for more information.
      6 #
      7 
      8 include $(TOPDIR)/rules.mk
      9 
     10 PKG_NAME:=netcat
     11 PKG_VERSION:=0.7.1
     12 PKG_RELEASE:=1
     13 
     14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
     15 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
     16 PKG_MD5SUM:=0a29eff1736ddb5effd0b1ec1f6fe0ef
     17 PKG_MAINTAINER:=Adam Gensler <openwrt@a.gnslr.us>
     18 PKG_LICENSE:=GPL-2.0
     19 PKG_INSTALL:=1
     20 
     21 include $(INCLUDE_DIR)/package.mk
     22 
     23 define Package/netcat
     24   SECTION:=net
     25   CATEGORY:=Network
     26   TITLE:=A feature-rich network debugging and exploration tool.
     27   URL:=http://netcat.sourceforge.net/
     28 endef
     29 
     30 define Package/netcat/description
     31 		Netcat is a featured networking utility which reads and writes data across network connections, using the TCP/IP protocol.
     32 	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.
     33 endef
     34 
     35 define Build/Configure
     36 	$(call Build/Configure/Default, \
     37 		--disable-rpath \
     38 		--with-included-getopt \
     39 	)
     40 endef
     41 
     42 define Package/netcat/install
     43 	$(INSTALL_DIR) $(1)/usr/bin
     44 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/netcat \
     45 		$(1)/usr/bin
     46 endef
     47 
     48 define Package/netcat/postinst
     49 #!/bin/sh
     50 if [ -e $${IPKG_INSTROOT}/usr/bin/nc ]; then
     51   rm -rf $${IPKG_INSTROOT}/usr/bin/nc;
     52 fi
     53 ln -s ./netcat $${IPKG_INSTROOT}/usr/bin/nc
     54 endef
     55 
     56 define Package/netcat/postrm
     57 #!/bin/sh
     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
     61 exit 0
     62 endef
     63 
     64 
     65 $(eval $(call BuildPackage,netcat))