openvpn.mk 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. ################################################################################
  2. #
  3. # openvpn
  4. #
  5. ################################################################################
  6. OPENVPN_VERSION = 2.6.12
  7. OPENVPN_SITE = https://swupdate.openvpn.net/community/releases
  8. OPENVPN_DEPENDENCIES = host-pkgconf libcap-ng
  9. OPENVPN_LICENSE = GPL-2.0
  10. OPENVPN_LICENSE_FILES = COPYRIGHT.GPL
  11. OPENVPN_CPE_ID_VENDOR = openvpn
  12. OPENVPN_SELINUX_MODULES = openvpn
  13. OPENVPN_CONF_OPTS = \
  14. --disable-unit-tests \
  15. $(if $(BR2_STATIC_LIBS),--disable-plugins)
  16. OPENVPN_CONF_ENV = NETSTAT=/bin/netstat
  17. ifeq ($(BR2_PACKAGE_LIBNL)$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16),yy)
  18. OPENVPN_CONF_OPTS += --enable-dco
  19. OPENVPN_DEPENDENCIES += libnl
  20. else
  21. OPENVPN_CONF_OPTS += --disable-dco
  22. endif
  23. ifeq ($(BR2_PACKAGE_OPENVPN_SMALL),y)
  24. OPENVPN_CONF_OPTS += \
  25. --enable-small \
  26. --disable-plugins
  27. endif
  28. ifeq ($(BR2_PACKAGE_OPENVPN_LZ4),y)
  29. OPENVPN_DEPENDENCIES += lz4
  30. else
  31. OPENVPN_CONF_OPTS += --disable-lz4
  32. endif
  33. ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y)
  34. OPENVPN_DEPENDENCIES += lzo
  35. else
  36. OPENVPN_CONF_OPTS += --disable-lzo
  37. endif
  38. ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
  39. OPENVPN_DEPENDENCIES += libselinux
  40. OPENVPN_CONF_OPTS += --enable-selinux
  41. else
  42. OPENVPN_CONF_OPTS += --disable-selinux
  43. endif
  44. ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
  45. OPENVPN_DEPENDENCIES += linux-pam
  46. OPENVPN_CONF_OPTS += --enable-plugin-auth-pam
  47. else
  48. OPENVPN_CONF_OPTS += --disable-plugin-auth-pam
  49. endif
  50. ifeq ($(BR2_PACKAGE_OPENSSL),y)
  51. OPENVPN_DEPENDENCIES += openssl
  52. OPENVPN_CONF_OPTS += --with-crypto-library=openssl
  53. else ifeq ($(BR2_PACKAGE_MBEDTLS),y)
  54. OPENVPN_DEPENDENCIES += mbedtls
  55. OPENVPN_CONF_OPTS += --with-crypto-library=mbedtls
  56. endif
  57. ifeq ($(BR2_PACKAGE_PKCS11_HELPER),y)
  58. OPENVPN_DEPENDENCIES += pkcs11-helper
  59. OPENVPN_CONF_OPTS += --enable-pkcs11
  60. else
  61. OPENVPN_CONF_OPTS += --disable-pkcs11
  62. endif
  63. ifeq ($(BR2_PACKAGE_SYSTEMD),y)
  64. OPENVPN_DEPENDENCIES += systemd
  65. OPENVPN_CONF_OPTS += --enable-systemd
  66. else
  67. OPENVPN_CONF_OPTS += --disable-systemd
  68. endif
  69. define OPENVPN_INSTALL_INIT_SYSV
  70. $(INSTALL) -m 755 -D package/openvpn/S60openvpn \
  71. $(TARGET_DIR)/etc/init.d/S60openvpn
  72. endef
  73. $(eval $(autotools-package))