1 ################################################################################
5 ################################################################################
7 OPENSSH_VERSION
= 7.3p1
8 OPENSSH_SITE
= http
://ftp.openbsd.org
/pub
/OpenBSD
/OpenSSH
/portable
9 OPENSSH_LICENSE
= BSD-3c BSD-2c Public Domain
10 OPENSSH_LICENSE_FILES
= LICENCE
11 OPENSSH_CONF_ENV
= LD
="$(TARGET_CC)" LDFLAGS
="$(TARGET_CFLAGS)"
13 --sysconfdir
=/etc
/ssh \
22 sshd
-1 sshd
-1 * - - - SSH drop priv user
25 ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE
),)
26 OPENSSH_CONF_OPTS
+= --without-pie
29 OPENSSH_DEPENDENCIES
= zlib openssl
31 ifeq ($(BR2_PACKAGE_LINUX_PAM
),y
)
32 define OPENSSH_INSTALL_PAM_CONF
33 $(INSTALL
) -D
-m
644 $(@D
)/contrib
/sshd.pam.generic
$(TARGET_DIR
)/etc
/pam.d
/sshd
34 $(SED
) '\%password required /lib/security/pam_cracklib.so%d' $(TARGET_DIR
)/etc
/pam.d
/sshd
35 $(SED
) 's/\#UsePAM no/UsePAM yes/' $(TARGET_DIR
)/etc
/ssh
/sshd_config
38 OPENSSH_DEPENDENCIES
+= linux-pam
39 OPENSSH_CONF_OPTS
+= --with-pam
40 OPENSSH_POST_INSTALL_TARGET_HOOKS
+= OPENSSH_INSTALL_PAM_CONF
42 OPENSSH_CONF_OPTS
+= --without-pam
45 ifeq ($(BR2_PACKAGE_LIBSELINUX
),y
)
46 OPENSSH_DEPENDENCIES
+= libselinux
47 OPENSSH_CONF_OPTS
+= --with-selinux
49 OPENSSH_CONF_OPTS
+= --without-selinux
52 define OPENSSH_INSTALL_INIT_SYSTEMD
53 $(INSTALL
) -D
-m
644 package
/openssh
/sshd.service \
54 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/sshd.service
55 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
56 ln
-fs ..
/..
/..
/..
/usr
/lib
/systemd
/system
/sshd.service \
57 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/sshd.service
60 define OPENSSH_INSTALL_INIT_SYSV
61 $(INSTALL
) -D
-m
755 package
/openssh
/S50sshd \
62 $(TARGET_DIR
)/etc
/init.d
/S50sshd
65 $(eval
$(autotools-package
))