diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-01-24 17:02:45 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-01-24 17:02:45 +0000 |
commit | c41d441333ad412ffc8e80e7bcc2c6ca850bdd6a (patch) | |
tree | bc7648eb1b8ca0261947d82b3ad9d5dbd2578ece /package/netcat/netcat.mk | |
parent | 6789698237a07799114e0b6925db1b7bb6de854c (diff) | |
download | buildroot-novena-c41d441333ad412ffc8e80e7bcc2c6ca850bdd6a.tar.gz buildroot-novena-c41d441333ad412ffc8e80e7bcc2c6ca850bdd6a.zip |
- add package netcat
Diffstat (limited to 'package/netcat/netcat.mk')
-rw-r--r-- | package/netcat/netcat.mk | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/package/netcat/netcat.mk b/package/netcat/netcat.mk new file mode 100644 index 000000000..c236058de --- /dev/null +++ b/package/netcat/netcat.mk @@ -0,0 +1,58 @@ +############################################################# +# +# netcat +# +############################################################# + +NETCAT_VERSION=0.7.1 +NETCAT_SOURCE=netcat-$(NETCAT_VERSION).tar.gz +NETCAT_CAT:=$(ZCAT) +NETCAT_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/netcat +NETCAT_DIR:=$(BUILD_DIR)/netcat-$(NETCAT_VERSION) +NETCAT_BINARY:=src/netcat +NETCAT_TARGET_BINARY:=sbin/netcat + +$(DL_DIR)/$(NETCAT_SOURCE): + $(WGET) -P $(DL_DIR) $(NETCAT_SITE)/$(NETCAT_SOURCE) + +netcat-source: $(DL_DIR)/$(NETCAT_SOURCE) + +$(NETCAT_DIR)/.unpacked: $(DL_DIR)/$(NETCAT_SOURCE) + $(NETCAT_CAT) $(DL_DIR)/$(NETCAT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - + touch $@ + +$(NETCAT_DIR)/.configured: $(NETCAT_DIR)/.unpacked + (cd $(NETCAT_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/ \ + ); + touch $@ + + +$(NETCAT_DIR)/$(NETCAT_BINARY): $(NETCAT_DIR)/.configured + $(TARGET_CONFIGURE_OPTS) $(MAKE) CC=$(TARGET_CC) -C $(NETCAT_DIR) + +$(TARGET_DIR)/$(NETCAT_TARGET_BINARY): $(NETCAT_DIR)/$(NETCAT_BINARY) + install -D $(NETCAT_DIR)/$(NETCAT_BINARY) $(TARGET_DIR)/$(NETCAT_TARGET_BINARY) + $(STRIP) -s $@ + +netcat: uclibc $(TARGET_DIR)/$(NETCAT_TARGET_BINARY) + +netcat-clean: + rm -f $(TARGET_DIR)/$(NETCAT_TARGET_BINARY) + -$(MAKE) -C $(NETCAT_DIR) clean +netcat-dirclean: + rm -rf $(NETCAT_DIR) +############################################################# +# +# Toplevel Makefile options +# +############################################################# +ifeq ($(strip $(BR2_PACKAGE_NETCAT)),y) +TARGETS+=netcat +endif |