1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include ${ADK_TOPDIR}/rules.mk
9 PKG_HASH
:= b343fbcdbff87f15b1986e6e15d6d4fc9a7d36066be6b7fb507087ba8f966c02
10 PKG_DESCR
:= secure
shell implementation
11 PKG_SECTION
:= net
/security
13 PKG_BUILDDEP_GLIBC
:= libxcrypt
16 PKG_URL
:= http
://www.openssh.com
/
17 PKG_SITES
:= http
://ftp.openbsd.org
/pub
/OpenBSD
/OpenSSH
/portable
/
19 DISTFILES
:= ${PKG_NAME}-${PKG_VERSION}.
tar.gz
21 PKG_SUBPKGS
:= OPENSSH OPENSSH_SERVER OPENSSH_CLIENT OPENSSH_CLIENT_UTILS
22 PKG_SUBPKGS
+= OPENSSH_SFTP_CLIENT OPENSSH_SFTP_SERVER
24 PKGSD_OPENSSH_SERVER
:= secure
shell server
25 PKGSN_OPENSSH_SERVER
:= openssh
26 PKGSD_OPENSSH_CLIENT
:= secure
shell client
27 PKGSN_OPENSSH_CLIENT
:= openssh
28 PKGSD_OPENSSH_CLIENT_UTILS
:= client utilities
29 PKGSN_OPENSSH_CLIENT_UTILS
:= openssh
30 PKGSD_OPENSSH_SFTP_CLIENT
:= sftp client
31 PKGSN_OPENSSH_SFTP_CLIENT
:= openssh
32 PKGSD_OPENSSH_SFTP_SERVER
:= sftp server
33 PKGSN_OPENSSH_SFTP_SERVER
:= openssh
35 PKG_FLAVOURS_OPENSSH
:= WITH_KRB5
36 PKGFD_WITH_KRB5
:= enable kerberos
5 support
37 PKGFS_WITH_KRB5
:= libkrb5 libcom-err
38 PKGFB_WITH_KRB5
:= krb5
40 PKG_CHOICES_OPENSSH
:= WITH_OPENSSL WITH_LIBRESSL
41 PKGCD_WITH_OPENSSL
:= with openssl
42 PKGCS_WITH_OPENSSL
:= libopenssl
43 PKGCB_WITH_OPENSSL
:= openssl
44 PKGCD_WITH_LIBRESSL
:= with libressl
45 PKGCS_WITH_LIBRESSL
:= libressl
46 PKGCB_WITH_LIBRESSL
:= libressl
49 include ${ADK_TOPDIR}/mk
/package.mk
51 $(eval
$(call PKG_template
,OPENSSH
,openssh
,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
52 $(eval
$(call PKG_template
,OPENSSH_SERVER
,openssh-server
,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_SERVER},${PKGSD_OPENSSH_SERVER},${PKG_SECTION}))
53 $(eval
$(call PKG_template
,OPENSSH_CLIENT
,openssh-client
,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_CLIENT},${PKGSD_OPENSSH_CLIENT},${PKG_SECTION}))
54 $(eval
$(call PKG_template
,OPENSSH_CLIENT_UTILS
,openssh-client-utils
,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_CLIENT_UTILS},${PKGSD_OPENSSH_CLIENT_UTILS},${PKG_SECTION}))
55 $(eval
$(call PKG_template
,OPENSSH_SFTP_CLIENT
,openssh-sftp-client
,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_SFTP_CLIENT},${PKGSD_OPENSSH_SFTP_CLIENT},${PKG_SECTION}))
56 $(eval
$(call PKG_template
,OPENSSH_SFTP_SERVER
,openssh-sftp-server
,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_SFTP_SERVER},${PKGSD_OPENSSH_SFTP_SERVER},${PKG_SECTION}))
58 ifeq ($(ADK_PACKAGE_OPENSSH_WITH_KRB5
),y
)
59 CONFIGURE_ARGS
+= --with-kerberos5
="${STAGING_TARGET_DIR}/usr"
62 ifeq ($(ADK_TARGET_USE_SSP
),y
)
63 CONFIGURE_ARGS
+= --with-stackprotect
65 CONFIGURE_ARGS
+= --without-stackprotect
68 ifeq ($(ADK_TARGET_USE_PIE
),y
)
69 CONFIGURE_ARGS
+= --with-pie
71 CONFIGURE_ARGS
+= --without-pie
74 CONFIGURE_ENV
+= LD
='${TARGET_CC}' \
75 LDFLAGS
='$(TARGET_LDFLAGS) -latomic' \
76 ac_cv_func_setlogin
=no \
77 ac_cv_have_decl_PR_SET_NO_NEW_PRIVS
=no \
78 ac_cv_lib_nsl_yp_match
=no
79 CONFIGURE_ARGS
+= --disable-strip \
80 --disable-etc-default-login \
91 --without-zlib-version-check \
92 --sysconfdir
=/etc
/ssh \
93 --with-privsep-user
=sshd \
94 --with-privsep-path
=/var
/run
/sshd \
95 --with-ssl-dir
="${STAGING_TARGET_DIR}/usr"
98 ${INSTALL_DIR} ${IDIR_OPENSSH}/etc
/ssh
99 chmod
0700 ${IDIR_OPENSSH}/etc
/ssh
101 openssh-server-install
:
102 ${INSTALL_DIR} ${IDIR_OPENSSH_SERVER}/etc
/ssh
103 ${INSTALL_DIR} ${IDIR_OPENSSH_SERVER}/usr
/bin
104 ${INSTALL_DIR} ${IDIR_OPENSSH_SERVER}/usr
/sbin
105 ${INSTALL_DIR} ${IDIR_OPENSSH_SERVER}/usr
/libexec
106 ${CP} .
/files
/sshd_config
${IDIR_OPENSSH_SERVER}/etc
/ssh
107 ${INSTALL_BIN} ${WRKINST}/usr
/bin
/ssh-keygen \
108 ${IDIR_OPENSSH_SERVER}/usr
/bin
109 ${INSTALL_BIN} ${WRKINST}/usr
/sbin
/sshd \
110 ${IDIR_OPENSSH_SERVER}/usr
/sbin
111 ${INSTALL_BIN} ${WRKINST}/usr
/libexec
/sshd-session \
112 ${IDIR_OPENSSH_SERVER}/usr
/libexec
114 test -z
$(ADK_RUNTIME_SSH_PUBKEY
) ||
( \
115 mkdir
-p
$(IDIR_OPENSSH_SERVER
)/etc
/ssh
; \
116 echo
$(ADK_RUNTIME_SSH_PUBKEY
) \
117 >$(IDIR_OPENSSH_SERVER
)/etc
/ssh
/authorized_keys
; \
120 openssh-client-install
:
121 ${INSTALL_DIR} ${IDIR_OPENSSH_CLIENT}/etc
/ssh
122 ${INSTALL_DIR} ${IDIR_OPENSSH_CLIENT}/usr
/bin
123 ${INSTALL_DATA} ${WRKINST}/etc
/ssh
/ssh_config \
124 ${IDIR_OPENSSH_CLIENT}/etc
/ssh
125 ${INSTALL_BIN} ${WRKINST}/usr
/bin
/{ssh
,scp
} \
126 ${IDIR_OPENSSH_CLIENT}/usr
/bin
128 openssh-client-utils-install
:
129 ${INSTALL_DIR} ${IDIR_OPENSSH_CLIENT_UTILS}/usr
/bin
130 ${INSTALL_BIN} ${WRKINST}/usr
/bin
/ssh-
{add
,agent
,keyscan
} \
131 ${IDIR_OPENSSH_CLIENT_UTILS}/usr
/bin
133 openssh-sftp-client-install
:
134 ${INSTALL_DIR} ${IDIR_OPENSSH_SFTP_CLIENT}/usr
/bin
135 ${INSTALL_BIN} ${WRKINST}/usr
/bin
/sftp \
136 ${IDIR_OPENSSH_SFTP_CLIENT}/usr
/bin
138 openssh-sftp-server-install
:
139 ${INSTALL_DIR} ${IDIR_OPENSSH_SFTP_SERVER}/usr
/libexec
140 ${INSTALL_BIN} ${WRKINST}/usr
/libexec
/sftp-server \
141 ${IDIR_OPENSSH_SFTP_SERVER}/usr
/libexec
143 include ${ADK_TOPDIR}/mk
/pkg-bottom.mk