]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/openvpn/openvpn.mk
package/openvpn: bump version to 2.4.5
[coffee/buildroot.git] / package / openvpn / openvpn.mk
1 ################################################################################
2 #
3 # openvpn
4 #
5 ################################################################################
6
7 OPENVPN_VERSION = 2.4.5
8 OPENVPN_SOURCE = openvpn-$(OPENVPN_VERSION).tar.xz
9 OPENVPN_SITE = http://swupdate.openvpn.net/community/releases
10 OPENVPN_DEPENDENCIES = host-pkgconf openssl
11 OPENVPN_LICENSE = GPL-2.0
12 OPENVPN_LICENSE_FILES = COPYRIGHT.GPL
13 OPENVPN_CONF_OPTS = \
14         --disable-plugin-auth-pam \
15         --enable-iproute2 \
16         --with-crypto-library=openssl \
17         $(if $(BR2_STATIC_LIBS),--disable-plugins)
18 OPENVPN_CONF_ENV = IFCONFIG=/sbin/ifconfig \
19         NETSTAT=/bin/netstat \
20         ROUTE=/sbin/route
21
22 ifeq ($(BR2_PACKAGE_OPENVPN_SMALL),y)
23 OPENVPN_CONF_OPTS += \
24         --enable-small \
25         --disable-plugins
26 endif
27
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
37
38 ifeq ($(BR2_PACKAGE_OPENVPN_LZ4),y)
39 OPENVPN_DEPENDENCIES += lz4
40 else
41 OPENVPN_CONF_OPTS += --disable-lz4
42 endif
43
44 ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y)
45 OPENVPN_DEPENDENCIES += lzo
46 else
47 OPENVPN_CONF_OPTS += --disable-lzo
48 endif
49
50 define OPENVPN_INSTALL_TARGET_CMDS
51         $(INSTALL) -m 755 $(@D)/src/openvpn/openvpn \
52                 $(TARGET_DIR)/usr/sbin/openvpn
53 endef
54
55 define OPENVPN_INSTALL_INIT_SYSV
56         $(INSTALL) -m 755 -D package/openvpn/S60openvpn \
57                 $(TARGET_DIR)/etc/init.d/S60openvpn
58 endef
59
60 $(eval $(autotools-package))