fix compile error
[openwrt.git] / package / openssh / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=openssh
6 PKG_VERSION:=4.2p1
7 PKG_RELEASE:=2
8 PKG_MD5SUM:=df899194a340c933944b193477c628fa
9
10 PKG_SOURCE_URL:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
11 ftp://openbsd.wiretapped.net/pub/OpenBSD/OpenSSH/portable/ \
12 ftp://ftp.belnet.be/packages/openbsd/OpenSSH/portable/ \
13 ftp://ftp.de.openbsd.org/pub/unix/OpenBSD/OpenSSH/portable/
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_CAT:=zcat
16
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
18 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
19
20 include $(TOPDIR)/package/rules.mk
21
22 PKG_DEPEND:="openssl"
23
24 $(eval $(call PKG_template,OPENSSH_CLIENT,openssh-client,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
25 $(eval $(call PKG_template,OPENSSH_CLIENT_UTILS,openssh-client-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
26 $(eval $(call PKG_template,OPENSSH_SERVER,openssh-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
27 $(eval $(call PKG_template,OPENSSH_SFTP_CLIENT,openssh-sftp-client,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
28 $(eval $(call PKG_template,OPENSSH_SFTP_SERVER,openssh-sftp-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
29
30 $(PKG_BUILD_DIR)/.configured:
31 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
32 $(TARGET_CONFIGURE_OPTS) \
33 CFLAGS="$(TARGET_CFLAGS)" \
34 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
35 LD="$(TARGET_CC)" \
36 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
37 ./configure \
38 --target=$(GNU_TARGET_NAME) \
39 --host=$(GNU_TARGET_NAME) \
40 --build=$(GNU_HOST_NAME) \
41 --program-prefix="" \
42 --program-suffix="" \
43 --prefix=/usr \
44 --exec-prefix=/usr \
45 --bindir=/usr/bin \
46 --datadir=/usr/share \
47 --includedir=/usr/include \
48 --infodir=/usr/share/info \
49 --libdir=/usr/lib \
50 --libexecdir=/usr/lib \
51 --localstatedir=/var \
52 --mandir=/usr/share/man \
53 --sbindir=/usr/sbin \
54 --sysconfdir=/etc/ssh \
55 $(DISABLE_LARGEFILE) \
56 $(DISABLE_NLS) \
57 --enable-shared \
58 --disable-static \
59 --disable-debug \
60 --disable-strip \
61 --disable-etc-default-login \
62 --disable-lastlog \
63 --disable-utmp \
64 --disable-utmpx \
65 --disable-wtmp \
66 --disable-wtmpx \
67 --without-bsd-auth \
68 --without-kerberos5 \
69 --without-pam \
70 --without-x \
71 );
72 touch $@
73
74 $(PKG_BUILD_DIR)/.built:
75 rm -rf $(PKG_INSTALL_DIR)
76 mkdir -p $(PKG_INSTALL_DIR)
77 $(MAKE) -C $(PKG_BUILD_DIR) \
78 DESTDIR="$(PKG_INSTALL_DIR)" \
79 all install
80 touch $@
81
82 $(IPKG_OPENSSH_CLIENT):
83 install -m0755 -d $(IDIR_OPENSSH_CLIENT)/etc/ssh
84 chmod 0700 $(IDIR_OPENSSH_CLIENT)/etc/ssh
85 $(CP) $(PKG_INSTALL_DIR)/etc/ssh/ssh_config $(IDIR_OPENSSH_CLIENT)/etc/ssh/
86 install -m0755 -d $(IDIR_OPENSSH_CLIENT)/usr/bin
87 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh $(IDIR_OPENSSH_CLIENT)/usr/bin/
88 $(CP) $(PKG_INSTALL_DIR)/usr/bin/scp $(IDIR_OPENSSH_CLIENT)/usr/bin/
89 $(RSTRIP) $(IDIR_OPENSSH_CLIENT)
90 $(IPKG_BUILD) $(IDIR_OPENSSH_CLIENT) $(PACKAGE_DIR)
91
92 $(IPKG_OPENSSH_CLIENT_UTILS):
93 install -m0755 -d $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin
94 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-add $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/
95 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-agent $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/
96 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-keyscan $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/
97 $(RSTRIP) $(IDIR_OPENSSH_CLIENT_UTILS)
98 $(IPKG_BUILD) $(IDIR_OPENSSH_CLIENT_UTILS) $(PACKAGE_DIR)
99
100 $(IPKG_OPENSSH_SERVER):
101 install -m0755 -d $(IDIR_OPENSSH_SERVER)/etc/ssh
102 chmod 0700 $(IDIR_OPENSSH_SERVER)/etc/ssh
103 $(CP) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(IDIR_OPENSSH_SERVER)/etc/ssh/
104 install -m0755 -d $(IDIR_OPENSSH_SERVER)/etc/init.d
105 install -m0755 ./files/S50sshd $(IDIR_OPENSSH_SERVER)/etc/init.d/
106 install -m0755 -d $(IDIR_OPENSSH_SERVER)/usr/bin
107 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-keygen $(IDIR_OPENSSH_SERVER)/usr/bin/
108 install -m0755 -d $(IDIR_OPENSSH_SERVER)/usr/sbin
109 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/sshd $(IDIR_OPENSSH_SERVER)/usr/sbin/
110 $(RSTRIP) $(IDIR_OPENSSH_SERVER)
111 $(IPKG_BUILD) $(IDIR_OPENSSH_SERVER) $(PACKAGE_DIR)
112
113 $(IPKG_OPENSSH_SFTP_CLIENT):
114 install -m0755 -d $(IDIR_OPENSSH_SFTP_CLIENT)/usr/bin
115 $(CP) $(PKG_INSTALL_DIR)/usr/bin/sftp $(IDIR_OPENSSH_SFTP_CLIENT)/usr/bin/
116 $(RSTRIP) $(IDIR_OPENSSH_SFTP_CLIENT)
117 $(IPKG_BUILD) $(IDIR_OPENSSH_SFTP_CLIENT) $(PACKAGE_DIR)
118
119 $(IPKG_OPENSSH_SFTP_SERVER):
120 install -m0755 -d $(IDIR_OPENSSH_SFTP_SERVER)/usr/lib
121 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sftp-server $(IDIR_OPENSSH_SFTP_SERVER)/usr/lib/
122 install -m0755 -d $(IDIR_OPENSSH_SFTP_SERVER)/usr/libexec
123 ln -sf ../lib/sftp-server $(IDIR_OPENSSH_SFTP_SERVER)/usr/libexec/sftp-server
124 $(RSTRIP) $(IDIR_OPENSSH_SFTP_SERVER)
125 $(IPKG_BUILD) $(IDIR_OPENSSH_SFTP_SERVER) $(PACKAGE_DIR)
126
This page took 0.043268 seconds and 5 git commands to generate.