1 ################################################################################
5 ################################################################################
7 OPENSSH_VERSION
= 7.1p2
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 # uClibc toolchain for ARC doesn't support PIE at the moment
27 OPENSSH_CONF_OPTS
+= --without-pie
29 # PIE and static does not work on Linux
30 ifeq ($(BR2_STATIC_LIBS
),y
)
31 OPENSSH_CONF_OPTS
+= --without-pie
34 OPENSSH_DEPENDENCIES
= zlib openssl
36 ifeq ($(BR2_PACKAGE_LINUX_PAM
),y
)
37 define OPENSSH_INSTALL_PAM_CONF
38 $(INSTALL
) -D
-m
644 $(@D
)/contrib
/sshd.pam.generic
$(TARGET_DIR
)/etc
/pam.d
/sshd
39 $(SED
) '\%password required /lib/security/pam_cracklib.so%d' $(TARGET_DIR
)/etc
/pam.d
/sshd
40 $(SED
) 's/\#UsePAM no/UsePAM yes/' $(TARGET_DIR
)/etc
/ssh
/sshd_config
43 OPENSSH_DEPENDENCIES
+= linux-pam
44 OPENSSH_CONF_OPTS
+= --with-pam
45 OPENSSH_POST_INSTALL_TARGET_HOOKS
+= OPENSSH_INSTALL_PAM_CONF
47 OPENSSH_CONF_OPTS
+= --without-pam
50 ifeq ($(BR2_PACKAGE_LIBSELINUX
),y
)
51 OPENSSH_DEPENDENCIES
+= libselinux
52 OPENSSH_CONF_OPTS
+= --with-selinux
54 OPENSSH_CONF_OPTS
+= --without-selinux
57 define OPENSSH_INSTALL_INIT_SYSTEMD
58 $(INSTALL
) -D
-m
644 package
/openssh
/sshd.service \
59 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/sshd.service
60 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
61 ln
-fs ..
/..
/..
/..
/usr
/lib
/systemd
/system
/sshd.service \
62 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/sshd.service
65 define OPENSSH_INSTALL_INIT_SYSV
66 $(INSTALL
) -D
-m
755 package
/openssh
/S50sshd \
67 $(TARGET_DIR
)/etc
/init.d
/S50sshd
70 $(eval
$(autotools-package
))