2d35e756110f911d32da76b4e7967a1b4575d0b9
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / stunnel / stunnel.mk
1 ################################################################################
2 #
3 # stunnel
4 #
5 ################################################################################
6
7 STUNNEL_VERSION = 5.17
8 STUNNEL_SITE = http://www.usenix.org.uk/mirrors/stunnel/archive/5.x
9 STUNNEL_DEPENDENCIES = openssl
10 STUNNEL_CONF_OPTS = --with-ssl=$(STAGING_DIR)/usr --with-threads=fork \
11         --disable-libwrap
12 STUNNEL_CONF_ENV = \
13         ax_cv_check_cflags___fstack_protector=$(if $(BR2_ENABLE_SSP),yes,no)
14 STUNNEL_LICENSE = GPLv2+
15 STUNNEL_LICENSE_FILES = COPYING COPYRIGHT.GPL
16
17 ifeq ($(BR2_INIT_SYSTEMD),y)
18 STUNNEL_DEPENDENCIES += systemd
19 else
20 STUNNEL_CONF_OPTS += --disable-systemd
21 endif
22
23 define STUNNEL_INSTALL_CONF
24         $(INSTALL) -m 0644 -D $(@D)/tools/stunnel.conf \
25                 $(TARGET_DIR)/etc/stunnel/stunnel.conf
26         rm -f $(TARGET_DIR)/etc/stunnel/stunnel.conf-sample
27 endef
28
29 STUNNEL_POST_INSTALL_TARGET_HOOKS += STUNNEL_INSTALL_CONF
30
31 define STUNNEL_INSTALL_INIT_SYSV
32         $(INSTALL) -m 0755 -D package/stunnel/S50stunnel $(TARGET_DIR)/etc/init.d/S50stunnel
33 endef
34
35 $(eval $(autotools-package))