Tcl build fix
[gumsense-br.git] / package / openssh / openssh.mk
blobf75398b2c7d8a26de383dc1473fafa6652478b24
1 #############################################################
3 # openssh
5 #############################################################
7 OPENSSH_SITE:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable
8 OPENSSH_DIR:=$(BUILD_DIR)/openssh-3.9p1
9 OPENSSH_SOURCE:=openssh-3.9p1.tar.gz
11 $(DL_DIR)/$(OPENSSH_SOURCE):
12 $(WGET) -P $(DL_DIR) $(OPENSSH_SITE)/$(OPENSSH_SOURCE)
14 $(OPENSSH_DIR)/.unpacked: $(DL_DIR)/$(OPENSSH_SOURCE)
15 zcat $(DL_DIR)/$(OPENSSH_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
16 toolchain/patch-kernel.sh $(OPENSSH_DIR) package/openssh/ openssh\*.patch
17 touch $(OPENSSH_DIR)/.unpacked
19 $(OPENSSH_DIR)/.configured: $(OPENSSH_DIR)/.unpacked
20 (cd $(OPENSSH_DIR); rm -rf config.cache; autoconf; \
21 $(TARGET_CONFIGURE_OPTS) \
22 LD=$(TARGET_CROSS)gcc \
23 CFLAGS="$(TARGET_CFLAGS)" \
24 ./configure \
25 --target=$(GNU_TARGET_NAME) \
26 --host=$(GNU_TARGET_NAME) \
27 --build=$(GNU_HOST_NAME) \
28 --prefix=/usr \
29 --exec-prefix=/usr \
30 --bindir=/usr/bin \
31 --sbindir=/usr/sbin \
32 --libexecdir=/usr/sbin \
33 --sysconfdir=/etc \
34 --datadir=/usr/share \
35 --localstatedir=/var \
36 --mandir=/usr/man \
37 --infodir=/usr/info \
38 --includedir=$(STAGING_DIR)/include \
39 --disable-lastlog --disable-utmp \
40 --disable-utmpx --disable-wtmp --disable-wtmpx \
41 --without-x \
42 $(DISABLE_NLS) \
43 $(DISABLE_LARGEFILE) \
45 touch $(OPENSSH_DIR)/.configured
47 $(OPENSSH_DIR)/ssh: $(OPENSSH_DIR)/.configured
48 $(MAKE) CC=$(TARGET_CC) -C $(OPENSSH_DIR)
49 -$(STRIP) $(OPENSSH_DIR)/scp
50 -$(STRIP) $(OPENSSH_DIR)/sftp
51 -$(STRIP) $(OPENSSH_DIR)/sftp-server
52 -$(STRIP) $(OPENSSH_DIR)/ssh
53 -$(STRIP) $(OPENSSH_DIR)/ssh-add
54 -$(STRIP) $(OPENSSH_DIR)/ssh-agent
55 -$(STRIP) $(OPENSSH_DIR)/ssh-keygen
56 -$(STRIP) $(OPENSSH_DIR)/ssh-keyscan
57 -$(STRIP) $(OPENSSH_DIR)/ssh-keysign
58 -$(STRIP) $(OPENSSH_DIR)/ssh-rand-helper
59 -$(STRIP) $(OPENSSH_DIR)/sshd
61 $(TARGET_DIR)/usr/bin/ssh: $(OPENSSH_DIR)/ssh
62 $(MAKE) CC=$(TARGET_CC) DESTDIR=$(TARGET_DIR) -C $(OPENSSH_DIR) install
63 mkdir -p $(TARGET_DIR)/etc/init.d/
64 cp $(OPENSSH_DIR)/S50sshd $(TARGET_DIR)/etc/init.d/
65 chmod a+x $(TARGET_DIR)/etc/init.d/S50sshd
66 rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
68 openssh: openssl zlib $(TARGET_DIR)/usr/bin/ssh
70 openssh-source: $(DL_DIR)/$(OPENSSH_SOURCE)
72 openssh-clean:
73 $(MAKE) -C $(OPENSSH_DIR) clean
75 openssh-dirclean:
76 rm -rf $(OPENSSH_DIR)
77 #############################################################
79 # Toplevel Makefile options
81 #############################################################
82 ifeq ($(strip $(BR2_PACKAGE_OPENSSH)),y)
83 TARGETS+=openssh
84 endif