package/dhcp/S80dhcp-server: allow empty INTERFACES
[buildroot-gz.git] / package / openvpn / openvpn.mk
blob8f02792c892478dfa461c44fcbbd94d905dd769f
1 ################################################################################
3 # openvpn
5 ################################################################################
7 OPENVPN_VERSION = 2.3.9
8 OPENVPN_SOURCE = openvpn-$(OPENVPN_VERSION).tar.xz
9 OPENVPN_SITE = http://swupdate.openvpn.net/community/releases
10 OPENVPN_DEPENDENCIES = host-pkgconf
11 OPENVPN_LICENSE = GPLv2
12 OPENVPN_LICENSE_FILES = COPYRIGHT.GPL
13 OPENVPN_CONF_OPTS = \
14 --disable-plugin-auth-pam \
15 --enable-iproute2 \
16 $(if $(BR2_STATIC_LIBS),--disable-plugins)
17 OPENVPN_CONF_ENV = IFCONFIG=/sbin/ifconfig \
18 NETSTAT=/bin/netstat \
19 ROUTE=/sbin/route
21 ifeq ($(BR2_PACKAGE_OPENVPN_SMALL),y)
22 OPENVPN_CONF_OPTS += \
23 --enable-small \
24 --disable-plugins \
25 --disable-eurephia
26 endif
28 # BusyBox 1.21+ places the ip applet in the "correct" place
29 # but previous versions didn't.
30 ifeq ($(BR2_PACKAGE_IPROUTE2),y)
31 OPENVPN_CONF_ENV += IPROUTE=/sbin/ip
32 else ifeq ($(BR2_BUSYBOX_VERSION_1_19_X)$(BR2_BUSYBOX_VERSION_1_20_X),y)
33 OPENVPN_CONF_ENV += IPROUTE=/bin/ip
34 else
35 OPENVPN_CONF_ENV += IPROUTE=/sbin/ip
36 endif
38 ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y)
39 OPENVPN_DEPENDENCIES += lzo
40 else
41 OPENVPN_CONF_OPTS += --disable-lzo
42 endif
44 ifeq ($(BR2_PACKAGE_OPENVPN_PWSAVE),y)
45 OPENVPN_CONF_OPTS += --enable-password-save
46 else
47 OPENVPN_CONF_OPTS += --disable-password-save
48 endif
50 ifeq ($(BR2_PACKAGE_OPENVPN_CRYPTO_OPENSSL),y)
51 OPENVPN_CONF_OPTS += --with-crypto-library=openssl
52 OPENVPN_DEPENDENCIES += openssl
53 endif
55 ifeq ($(BR2_PACKAGE_OPENVPN_CRYPTO_POLARSSL),y)
56 OPENVPN_CONF_OPTS += --with-crypto-library=polarssl
57 OPENVPN_DEPENDENCIES += polarssl
58 endif
60 define OPENVPN_INSTALL_TARGET_CMDS
61 $(INSTALL) -m 755 $(@D)/src/openvpn/openvpn \
62 $(TARGET_DIR)/usr/sbin/openvpn
63 endef
65 define OPENVPN_INSTALL_INIT_SYSV
66 $(INSTALL) -m 755 -D package/openvpn/S60openvpn \
67 $(TARGET_DIR)/etc/init.d/S60openvpn
68 endef
70 $(eval $(autotools-package))