imagemagick: bump version to 7.0.3-7 (security)
[buildroot-gz.git] / package / openssh / openssh.mk
blobce85513614a682d9c2a252639dba300fdd756fea
1 ################################################################################
3 # openssh
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)"
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 ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),)
26 OPENSSH_CONF_OPTS += --without-pie
27 endif
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
36 endef
38 OPENSSH_DEPENDENCIES += linux-pam
39 OPENSSH_CONF_OPTS += --with-pam
40 OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_PAM_CONF
41 else
42 OPENSSH_CONF_OPTS += --without-pam
43 endif
45 ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
46 OPENSSH_DEPENDENCIES += libselinux
47 OPENSSH_CONF_OPTS += --with-selinux
48 else
49 OPENSSH_CONF_OPTS += --without-selinux
50 endif
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
58 endef
60 define OPENSSH_INSTALL_INIT_SYSV
61 $(INSTALL) -D -m 755 package/openssh/S50sshd \
62 $(TARGET_DIR)/etc/init.d/S50sshd
63 endef
65 $(eval $(autotools-package))