c7feba20c607a3f5985ea2720e26a304954991ca
[openwrt.git] / obsolete-buildroot / make / openssh.mk
1 #############################################################
2 #
3 # openssh
4 #
5 #############################################################
6
7 OPENSSH_SITE:=ftp://ftp.tux.org/bsd/openbsd/OpenSSH/portable/
8 OPENSSH_DIR:=$(BUILD_DIR)/openssh-3.8p1
9 OPENSSH_SOURCE:=openssh-3.8p1.tar.gz
10 OPENSSH_PATCH:=$(SOURCE_DIR)/openssh.patch
11
12 $(DL_DIR)/$(OPENSSH_SOURCE):
13 $(WGET) -P $(DL_DIR) $(OPENSSH_SITE)/$(OPENSSH_SOURCE)
14
15 $(OPENSSH_DIR)/.unpacked: $(DL_DIR)/$(OPENSSH_SOURCE) $(OPENSSH_PATCH)
16 zcat $(DL_DIR)/$(OPENSSH_SOURCE) | tar -C $(BUILD_DIR) -xvf -
17 cat $(OPENSSH_PATCH) | patch -p1 -d $(OPENSSH_DIR)
18 touch $(OPENSSH_DIR)/.unpacked
19
20 $(OPENSSH_DIR)/.configured: $(OPENSSH_DIR)/.unpacked
21 (cd $(OPENSSH_DIR); rm -rf config.cache; autoconf; \
22 $(TARGET_CONFIGURE_OPTS) \
23 LD=$(TARGET_CROSS)gcc \
24 CFLAGS="$(TARGET_CFLAGS)" \
25 ./configure \
26 --target=$(GNU_TARGET_NAME) \
27 --host=$(GNU_TARGET_NAME) \
28 --build=$(GNU_HOST_NAME) \
29 --prefix=/usr \
30 --exec-prefix=/usr \
31 --bindir=/usr/bin \
32 --sbindir=/usr/sbin \
33 --libexecdir=/usr/sbin \
34 --sysconfdir=/etc \
35 --datadir=/usr/share \
36 --localstatedir=/var \
37 --mandir=/usr/man \
38 --infodir=/usr/info \
39 --includedir=$(STAGING_DIR)/include \
40 --disable-lastlog --disable-utmp \
41 --disable-utmpx --disable-wtmp --disable-wtmpx \
42 --without-x \
43 $(DISABLE_NLS) \
44 $(DISABLE_LARGEFILE) \
45 );
46 touch $(OPENSSH_DIR)/.configured
47
48 $(OPENSSH_DIR)/ssh: $(OPENSSH_DIR)/.configured
49 $(MAKE) CC=$(TARGET_CC) -C $(OPENSSH_DIR)
50 -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/scp
51 -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/sftp
52 -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/sftp-server
53 -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh
54 -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-add
55 -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-agent
56 -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-keygen
57 -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-keyscan
58 -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-keysign
59 -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-rand-helper
60 -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/sshd
61
62 $(TARGET_DIR)/usr/bin/ssh: $(OPENSSH_DIR)/ssh
63 $(MAKE) CC=$(TARGET_CC) DESTDIR=$(TARGET_DIR) -C $(OPENSSH_DIR) install
64 mkdir -p $(TARGET_DIR)/etc/init.d/
65 cp $(OPENSSH_DIR)/S50sshd $(TARGET_DIR)/etc/init.d/
66 chmod a+x $(TARGET_DIR)/etc/init.d/S50sshd
67 rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
68
69 openssh: $(TARGET_DIR)/usr/bin/ssh
70
71 openssh-source: $(DL_DIR)/$(OPENSSH_SOURCE)
72
73 openssh-clean:
74 $(MAKE) -C $(OPENSSH_DIR) clean
75
76 openssh-dirclean:
77 rm -rf $(OPENSSH_DIR)
78
This page took 0.038441 seconds and 3 git commands to generate.