Added ctorrent, statically compiled for the moment (need uClibc++ fixes)
[openwrt.git] / openwrt / package / openssh / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=openssh
6 PKG_VERSION:=4.2p1
7 PKG_RELEASE:=1
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 -m0700 -d $(IDIR_OPENSSH_CLIENT)/etc/ssh
84 $(CP) $(PKG_INSTALL_DIR)/etc/ssh/ssh_config $(IDIR_OPENSSH_CLIENT)/etc/ssh/
85 install -m0755 -d $(IDIR_OPENSSH_CLIENT)/usr/bin
86 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh $(IDIR_OPENSSH_CLIENT)/usr/bin/
87 $(CP) $(PKG_INSTALL_DIR)/usr/bin/scp $(IDIR_OPENSSH_CLIENT)/usr/bin/
88 $(RSTRIP) $(IDIR_OPENSSH_CLIENT)
89 $(IPKG_BUILD) $(IDIR_OPENSSH_CLIENT) $(PACKAGE_DIR)
90
91 $(IPKG_OPENSSH_CLIENT_UTILS):
92 install -m0755 -d $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin
93 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-add $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/
94 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-agent $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/
95 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-keyscan $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/
96 $(RSTRIP) $(IDIR_OPENSSH_CLIENT_UTILS)
97 $(IPKG_BUILD) $(IDIR_OPENSSH_CLIENT_UTILS) $(PACKAGE_DIR)
98
99 $(IPKG_OPENSSH_SERVER):
100 install -m0700 -d $(IDIR_OPENSSH_SERVER)/etc/ssh
101 $(CP) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(IDIR_OPENSSH_SERVER)/etc/ssh/
102 install -m0755 -d $(IDIR_OPENSSH_SERVER)/etc/init.d
103 install -m0755 ./files/S50sshd $(IDIR_OPENSSH_SERVER)/etc/init.d/
104 install -m0755 -d $(IDIR_OPENSSH_SERVER)/usr/bin
105 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-keygen $(IDIR_OPENSSH_SERVER)/usr/bin/
106 install -m0755 -d $(IDIR_OPENSSH_SERVER)/usr/sbin
107 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/sshd $(IDIR_OPENSSH_SERVER)/usr/sbin/
108 $(RSTRIP) $(IDIR_OPENSSH_SERVER)
109 $(IPKG_BUILD) $(IDIR_OPENSSH_SERVER) $(PACKAGE_DIR)
110
111 $(IPKG_OPENSSH_SFTP_CLIENT):
112 install -m0755 -d $(IDIR_OPENSSH_SFTP_CLIENT)/usr/bin
113 $(CP) $(PKG_INSTALL_DIR)/usr/bin/sftp $(IDIR_OPENSSH_SFTP_CLIENT)/usr/bin/
114 $(RSTRIP) $(IDIR_OPENSSH_SFTP_CLIENT)
115 $(IPKG_BUILD) $(IDIR_OPENSSH_SFTP_CLIENT) $(PACKAGE_DIR)
116
117 $(IPKG_OPENSSH_SFTP_SERVER):
118 install -m0755 -d $(IDIR_OPENSSH_SFTP_SERVER)/usr/lib
119 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sftp-server $(IDIR_OPENSSH_SFTP_SERVER)/usr/lib/
120 install -m0755 -d $(IDIR_OPENSSH_SFTP_SERVER)/usr/libexec
121 ln -sf ../lib/sftp-server $(IDIR_OPENSSH_SFTP_SERVER)/usr/libexec/sftp-server
122 $(RSTRIP) $(IDIR_OPENSSH_SFTP_SERVER)
123 $(IPKG_BUILD) $(IDIR_OPENSSH_SFTP_SERVER) $(PACKAGE_DIR)
124
This page took 0.052254 seconds and 5 git commands to generate.