add USE_* variables to the makefiles
[openwrt.git] / obsolete-buildroot / make / netkittelnet.mk
1 #############################################################
2 #
3 # netkittelnet
4 #
5 #############################################################
6 NETKITTELNET_SOURCE:=netkit-telnet-0.17.tar.gz
7 NETKITTELNET_SITE:=ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/
8 NETKITTELNET_DIR:=$(BUILD_DIR)/netkit-telnet-0.17
9 NETKITTELNET_CAT:=zcat
10 NETKITTELNET_BINARY:=telnetd/telnetd
11 NETKITTELNET_TARGET_BINARY:=usr/sbin/telnetd
12 NETKITTELNET_PATCH:=$(SOURCE_DIR)/netkittelnet.patch
13
14 $(DL_DIR)/$(NETKITTELNET_SOURCE):
15 $(WGET) -P $(DL_DIR) $(NETKITTELNET_SITE)/$(NETKITTELNET_SOURCE)
16
17 netkittelnet-source: $(DL_DIR)/$(NETKITTELNET_SOURCE)
18
19 $(NETKITTELNET_DIR)/.unpacked: $(DL_DIR)/$(NETKITTELNET_SOURCE)
20 $(NETKITTELNET_CAT) $(DL_DIR)/$(NETKITTELNET_SOURCE) | tar -C $(BUILD_DIR) -xvf -
21 # use ANSI syntax
22 $(SED) "s/main()/main(void)/;" $(NETKITTELNET_DIR)/configure
23 # Disable termcap support
24 $(SED) "s~\(.*termcap\.h.*\)~/* \1 */~;" $(NETKITTELNET_DIR)/telnetd/telnetd.c
25 # don't try to run cross compiled binaries while configuring things
26 cat $(NETKITTELNET_PATCH) | patch -p1 -d $(NETKITTELNET_DIR)
27 touch $(NETKITTELNET_DIR)/.unpacked
28
29 $(NETKITTELNET_DIR)/.configured: $(NETKITTELNET_DIR)/.unpacked
30 (cd $(NETKITTELNET_DIR); PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
31 ./configure --installroot=$(TARGET_DIR) --with-c-compiler=$(TARGET_CC) \
32 )
33 touch $(NETKITTELNET_DIR)/.configured
34
35 $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY): $(NETKITTELNET_DIR)/.configured
36 $(MAKE) SUB=telnetd CC=$(TARGET_CC) -C $(NETKITTELNET_DIR)
37 $(STRIP) $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY)
38
39 $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY): $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY)
40 # Only install a few selected items...
41 mkdir -p $(TARGET_DIR)/usr/sbin
42 rm -f $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY)
43 cp $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY) $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY)
44 # Enable telnet in inetd
45 $(SED) "s~^#telnet.*~telnet\tstream\ttcp\tnowait\troot\t/usr/sbin/telnetd\t/usr/sbin/telnetd~;" $(TARGET_DIR)/etc/inetd.conf
46 #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NETKITTELNET_DIR) install
47 #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
48 # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
49
50 netkittelnet: uclibc netkitbase $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY)
51
52 netkittelnet-clean:
53 #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NETKITTELNET_DIR) uninstall
54 -rm -f $(TARGET_DIR)/usr/sbin/telnetd
55 -$(MAKE) -C $(NETKITTELNET_DIR) clean
56
57 netkittelnet-dirclean:
58 rm -rf $(NETKITTELNET_DIR)
59
This page took 0.046599 seconds and 5 git commands to generate.