package/nodejs: security bump for 0.10.x to version 0.10.42
[buildroot-gz.git] / package / openssh / openssh.mk
blob4e97849eec5518bfc35282faf5e3ee3076262cba
1 ################################################################################
3 # openssh
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)"
12 OPENSSH_CONF_OPTS = \
13 --sysconfdir=/etc/ssh \
14 --disable-lastlog \
15 --disable-utmp \
16 --disable-utmpx \
17 --disable-wtmp \
18 --disable-wtmpx \
19 --disable-strip
21 define OPENSSH_USERS
22 sshd -1 sshd -1 * - - - SSH drop priv user
23 endef
25 # uClibc toolchain for ARC doesn't support PIE at the moment
26 ifeq ($(BR2_arc),y)
27 OPENSSH_CONF_OPTS += --without-pie
28 endif
29 # PIE and static does not work on Linux
30 ifeq ($(BR2_STATIC_LIBS),y)
31 OPENSSH_CONF_OPTS += --without-pie
32 endif
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
41 endef
43 OPENSSH_DEPENDENCIES += linux-pam
44 OPENSSH_CONF_OPTS += --with-pam
45 OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_PAM_CONF
46 else
47 OPENSSH_CONF_OPTS += --without-pam
48 endif
50 ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
51 OPENSSH_DEPENDENCIES += libselinux
52 OPENSSH_CONF_OPTS += --with-selinux
53 else
54 OPENSSH_CONF_OPTS += --without-selinux
55 endif
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
63 endef
65 define OPENSSH_INSTALL_INIT_SYSV
66 $(INSTALL) -D -m 755 package/openssh/S50sshd \
67 $(TARGET_DIR)/etc/init.d/S50sshd
68 endef
70 $(eval $(autotools-package))