24af0798f4e6d51d3fcb4cd795db4fc6602a094c
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / openssh / openssh.mk
1 ################################################################################
2 #
3 # openssh
4 #
5 ################################################################################
6
7 OPENSSH_VERSION = 6.8p1
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
20
21 define OPENSSH_USERS
22         sshd -1 sshd -1 * - - - SSH drop priv user
23 endef
24
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
30 OPENSSH_DEPENDENCIES = zlib openssl
31
32 ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
33 OPENSSH_DEPENDENCIES += linux-pam
34 OPENSSH_CONF_OPTS += --with-pam
35 endif
36
37 define OPENSSH_INSTALL_INIT_SYSTEMD
38         $(INSTALL) -D -m 644 package/openssh/sshd.service \
39                 $(TARGET_DIR)/usr/lib/systemd/system/sshd.service
40         mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
41         ln -fs ../../../../usr/lib/systemd/system/sshd.service \
42                 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/sshd.service
43 endef
44
45 define OPENSSH_INSTALL_INIT_SYSV
46         $(INSTALL) -D -m 755 package/openssh/S50sshd \
47                 $(TARGET_DIR)/etc/init.d/S50sshd
48 endef
49
50 $(eval $(autotools-package))