source: packages/net/openssh/Makefile @ 29085

Last change on this file since 29085 was 29085, checked in by tripolar, 5 years ago

[packages] openssh: set privsep-user and privsep-path

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 4.7 KB
Line 
1#
2# Copyright (C) 2006-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=openssh
11PKG_VERSION:=5.9p1
12PKG_RELEASE:=4
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
16                ftp://openbsd.wiretapped.net/pub/OpenBSD/OpenSSH/portable/ \
17                ftp://ftp.belnet.be/packages/openbsd/OpenSSH/portable/ \
18                ftp://ftp.de.openbsd.org/pub/unix/OpenBSD/OpenSSH/portable/
19PKG_MD5SUM:=afe17eee7e98d3b8550cc349834a85d0
20
21PKG_BUILD_DEPENDS:=libopenssl
22
23include $(INCLUDE_DIR)/package.mk
24
25define Package/openssh/Default
26  SECTION:=net
27  CATEGORY:=Network
28  DEPENDS:=+libopenssl +zlib
29  TITLE:=OpenSSH
30  MAINTAINER:=Peter Wagner <tripolar@gmx.at>
31  URL:=http://www.openssh.com/
32  SUBMENU:=SSH
33endef
34
35define Package/openssh-moduli
36  $(call Package/openssh/Default)
37  DEPENDS+= +openssh-server
38  TITLE+= moduli file
39endef
40
41define Package/openssh-moduli/description
42OpenSSH server moduli file.
43endef
44
45
46define Package/openssh-client
47  $(call Package/openssh/Default)
48  TITLE+= client
49endef
50
51define Package/openssh-client/description
52OpenSSH client.
53endef
54
55define Package/openssh-client/conffiles
56/etc/ssh/ssh_config
57endef
58
59define Package/openssh-client-utils
60  $(call Package/openssh/Default)
61  DEPENDS+= +openssh-client +openssh-keygen
62  TITLE+= client utilities
63endef
64
65define Package/openssh-client-utils/description
66OpenSSH client utilities.
67endef
68
69define Package/openssh-keygen
70  $(call Package/openssh/Default)
71  TITLE+= keygen
72endef
73
74define Package/openssh-keygen/description
75OpenSSH keygen.
76endef
77
78define Package/openssh-server
79  $(call Package/openssh/Default)
80  DEPENDS+= +openssh-keygen
81  TITLE+= server
82endef
83
84define Package/openssh-server/description
85OpenSSH server.
86endef
87
88define Package/openssh-server/conffiles
89/etc/ssh/sshd_config
90endef
91
92define Package/openssh-sftp-client
93  $(call Package/openssh/Default)
94  TITLE+= SFTP client
95endef
96
97define Package/openssh-sftp-client/description
98OpenSSH SFTP client.
99endef
100
101define Package/openssh-sftp-server
102  $(call Package/openssh/Default)
103  TITLE+= SFTP server
104endef
105
106define Package/openssh-sftp-server/description
107OpenSSH SFTP server.
108endef
109
110CONFIGURE_ARGS+= \
111        $(DISABLE_NLS) \
112        --sysconfdir=/etc/ssh \
113        --with-privsep-user=sshd \
114        --with-privsep-path=/var/empty \
115        --enable-shared \
116        --disable-static \
117        --disable-debug \
118        --disable-strip \
119        --disable-etc-default-login \
120        --disable-lastlog \
121        --disable-utmp \
122        --disable-utmpx \
123        --disable-wtmp \
124        --disable-wtmpx \
125        --without-bsd-auth \
126        --without-kerberos5 \
127        --without-pam \
128        --without-x
129
130ifneq ($(CONFIG_SSP_SUPPORT),y)
131CONFIGURE_ARGS += \
132        --without-stackprotect
133endif
134
135CONFIGURE_VARS += LD="$(TARGET_CC)"
136
137define Build/Compile
138        $(MAKE) -C $(PKG_BUILD_DIR) \
139                DESTDIR="$(PKG_INSTALL_DIR)" \
140                LIBS="" \
141                sftp-server
142        $(MAKE) -C $(PKG_BUILD_DIR) \
143                DESTDIR="$(PKG_INSTALL_DIR)" \
144                STRIP_OPT="" \
145                all install
146endef
147
148define Package/openssh-moduli/install
149        $(INSTALL_DIR) $(1)/etc/ssh
150        $(CP) $(PKG_INSTALL_DIR)/etc/ssh/moduli $(1)/etc/ssh/
151endef
152
153define Package/openssh-client/install
154        $(INSTALL_DIR) $(1)/etc/ssh
155        chmod 0700 $(1)/etc/ssh
156        $(CP) $(PKG_INSTALL_DIR)/etc/ssh/ssh_config $(1)/etc/ssh/
157        $(INSTALL_DIR) $(1)/usr/bin
158        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ssh $(1)/usr/bin/
159        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scp $(1)/usr/bin/
160endef
161
162define Package/openssh-client-utils/install
163        $(INSTALL_DIR) $(1)/usr/bin
164        $(INSTALL_BIN) $(foreach bin,add agent keyscan keysign,$(PKG_BUILD_DIR)/ssh-$(bin)) $(1)/usr/bin/
165endef
166
167define Package/openssh-keygen/install
168        $(INSTALL_DIR) $(1)/usr/bin
169        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ssh-keygen $(1)/usr/bin/
170endef
171
172
173define Package/openssh-server/install
174        $(INSTALL_DIR) $(1)/etc/ssh
175        chmod 0700 $(1)/etc/ssh
176        $(CP) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(1)/etc/ssh/
177        $(INSTALL_DIR) $(1)/etc/init.d
178        $(INSTALL_BIN) ./files/sshd.init $(1)/etc/init.d/sshd
179        $(INSTALL_DIR) $(1)/usr/sbin
180        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sshd $(1)/usr/sbin/
181endef
182
183define Package/openssh-sftp-client/install
184        $(INSTALL_DIR) $(1)/usr/bin
185        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sftp $(1)/usr/bin/
186endef
187
188define Package/openssh-sftp-server/install
189        $(INSTALL_DIR) $(1)/usr/lib
190        $(CP) $(PKG_INSTALL_DIR)/usr/lib/sftp-server $(1)/usr/lib/
191        $(INSTALL_DIR) $(1)/usr/libexec
192        ln -sf ../lib/sftp-server $(1)/usr/libexec/sftp-server
193endef
194
195$(eval $(call BuildPackage,openssh-client))
196$(eval $(call BuildPackage,openssh-moduli))
197$(eval $(call BuildPackage,openssh-client-utils))
198$(eval $(call BuildPackage,openssh-keygen))
199$(eval $(call BuildPackage,openssh-server))
200$(eval $(call BuildPackage,openssh-sftp-client))
201$(eval $(call BuildPackage,openssh-sftp-server))
Note: See TracBrowser for help on using the repository browser.