2003-01-18 22:27:22 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# netkittelnet
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
NETKITTELNET_SOURCE:=netkit-telnet-0.17.tar.gz
|
|
|
|
NETKITTELNET_SITE:=ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/
|
|
|
|
NETKITTELNET_DIR:=$(BUILD_DIR)/netkit-telnet-0.17
|
2006-10-01 17:17:52 +02:00
|
|
|
NETKITTELNET_CAT:=$(ZCAT)
|
2003-01-18 22:27:22 +01:00
|
|
|
NETKITTELNET_BINARY:=telnetd/telnetd
|
|
|
|
NETKITTELNET_TARGET_BINARY:=usr/sbin/telnetd
|
|
|
|
|
|
|
|
$(DL_DIR)/$(NETKITTELNET_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(NETKITTELNET_SITE)/$(NETKITTELNET_SOURCE)
|
|
|
|
|
|
|
|
netkittelnet-source: $(DL_DIR)/$(NETKITTELNET_SOURCE)
|
|
|
|
|
|
|
|
$(NETKITTELNET_DIR)/.unpacked: $(DL_DIR)/$(NETKITTELNET_SOURCE)
|
2004-10-09 23:19:47 +02:00
|
|
|
$(NETKITTELNET_CAT) $(DL_DIR)/$(NETKITTELNET_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2003-01-18 22:27:22 +01:00
|
|
|
# use ANSI syntax
|
2003-11-19 18:17:56 +01:00
|
|
|
$(SED) "s/main()/main(void)/;" $(NETKITTELNET_DIR)/configure
|
2003-01-18 22:27:22 +01:00
|
|
|
# Disable termcap support
|
2003-11-19 18:17:56 +01:00
|
|
|
$(SED) "s~\(.*termcap\.h.*\)~/* \1 */~;" $(NETKITTELNET_DIR)/telnetd/telnetd.c
|
2003-01-18 22:27:22 +01:00
|
|
|
# don't try to run cross compiled binaries while configuring things
|
2004-10-09 04:49:33 +02:00
|
|
|
toolchain/patch-kernel.sh $(NETKITTELNET_DIR) package/netkittelnet/ netkittelnet\*.patch
|
2003-01-18 22:27:22 +01:00
|
|
|
touch $(NETKITTELNET_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(NETKITTELNET_DIR)/.configured: $(NETKITTELNET_DIR)/.unpacked
|
2003-02-12 09:10:40 +01:00
|
|
|
(cd $(NETKITTELNET_DIR); PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
|
2003-01-19 01:09:44 +01:00
|
|
|
./configure --installroot=$(TARGET_DIR) --with-c-compiler=$(TARGET_CC) \
|
|
|
|
)
|
2005-11-24 07:53:24 +01:00
|
|
|
touch $(NETKITTELNET_DIR)/.configured
|
2003-01-18 22:27:22 +01:00
|
|
|
|
|
|
|
$(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY): $(NETKITTELNET_DIR)/.configured
|
2003-01-19 07:07:22 +01:00
|
|
|
$(MAKE) SUB=telnetd CC=$(TARGET_CC) -C $(NETKITTELNET_DIR)
|
2003-01-18 22:27:22 +01:00
|
|
|
$(STRIP) $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY)
|
|
|
|
|
|
|
|
$(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY): $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY)
|
|
|
|
# Only install a few selected items...
|
|
|
|
mkdir -p $(TARGET_DIR)/usr/sbin
|
2003-01-20 20:24:02 +01:00
|
|
|
rm -f $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY)
|
2003-01-18 22:27:22 +01:00
|
|
|
cp $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY) $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY)
|
|
|
|
# Enable telnet in inetd
|
2003-11-19 18:17:56 +01:00
|
|
|
$(SED) "s~^#telnet.*~telnet\tstream\ttcp\tnowait\troot\t/usr/sbin/telnetd\t/usr/sbin/telnetd~;" $(TARGET_DIR)/etc/inetd.conf
|
2003-01-19 07:07:22 +01:00
|
|
|
#$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NETKITTELNET_DIR) install
|
2003-01-18 22:27:22 +01:00
|
|
|
#rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
|
|
|
|
# $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
|
|
|
|
|
2003-11-18 18:56:52 +01:00
|
|
|
netkittelnet: uclibc netkitbase $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY)
|
2003-01-18 22:27:22 +01:00
|
|
|
|
|
|
|
netkittelnet-clean:
|
2003-01-19 07:07:22 +01:00
|
|
|
#$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NETKITTELNET_DIR) uninstall
|
2003-01-18 22:27:22 +01:00
|
|
|
-rm -f $(TARGET_DIR)/usr/sbin/telnetd
|
|
|
|
-$(MAKE) -C $(NETKITTELNET_DIR) clean
|
|
|
|
|
|
|
|
netkittelnet-dirclean:
|
|
|
|
rm -rf $(NETKITTELNET_DIR)
|
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_NETKITTELNET)),y)
|
|
|
|
TARGETS+=netkittelnet
|
|
|
|
endif
|