blob: 399aaa81fd32c54df79a9ec4da855b14d7585b34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
#############################################################
#
# 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
NETKITTELNET_CAT:=bzcat
NETKITTELNET_BINARY:=telnetd/telnetd
NETKITTELNET_TARGET_BINARY:=usr/sbin/telnetd
NETKITTELNET_PATCH:=$(SOURCE_DIR)/netkittelnet.patch
$(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)
$(NETKITTELNET_CAT) $(DL_DIR)/$(NETKITTELNET_SOURCE) | tar -C $(BUILD_DIR) -xvf -
# use ANSI syntax
perl -i -p -e "s/main\(\)/main(void)/;" $(NETKITTELNET_DIR)/configure
# Disable termcap support
perl -i -p -e "s~(.*termcap\.h.*)~/* \1 */~;" $(NETKITTELNET_DIR)/telnetd/telnetd.c
# don't try to run cross compiled binaries while configuring things
cat $(NETKITTELNET_PATCH) | patch -p1 -d $(NETKITTELNET_DIR)
touch $(NETKITTELNET_DIR)/.unpacked
$(NETKITTELNET_DIR)/.configured: $(NETKITTELNET_DIR)/.unpacked
(cd $(NETKITTELNET_DIR); rm -rf config.cache; \
PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--disable-nls \
--installroot=$(TARGET_DIR) \
--with-c-compiler=$(TARGET_CC) \
);
touch $(NETKITTELNET_DIR)/.configured
$(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY): $(NETKITTELNET_DIR)/.configured
$(MAKE) SUB=telnetd CC=$(TARGET_CC1) -C $(NETKITTELNET_DIR)
$(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
cp $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY) $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY)
# Enable telnet in inetd
perl -i -p -e "s~^#telnet.*~telnet\tstream\ttcp\tnowait\troot\t/usr/sbin/telnetd\t/usr/sbin/telnetd~;" $(TARGET_DIR)/etc/inetd.conf
#$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(NETKITTELNET_DIR) install
#rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
# $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
netkittelnet: uclibc $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY)
netkittelnet-clean:
#$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(NETKITTELNET_DIR) uninstall
-rm -f $(TARGET_DIR)/usr/sbin/telnetd
-$(MAKE) -C $(NETKITTELNET_DIR) clean
netkittelnet-dirclean:
rm -rf $(NETKITTELNET_DIR)
|