openvpn.mk 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. ################################################################################
  2. #
  3. # openvpn
  4. #
  5. ################################################################################
  6. OPENVPN_VERSION = 2.4.9
  7. OPENVPN_SOURCE = openvpn-$(OPENVPN_VERSION).tar.xz
  8. OPENVPN_SITE = http://swupdate.openvpn.net/community/releases
  9. OPENVPN_DEPENDENCIES = host-pkgconf
  10. OPENVPN_LICENSE = GPL-2.0
  11. OPENVPN_LICENSE_FILES = COPYRIGHT.GPL
  12. OPENVPN_CONF_OPTS = \
  13. --enable-iproute2 \
  14. $(if $(BR2_STATIC_LIBS),--disable-plugins)
  15. OPENVPN_CONF_ENV = IFCONFIG=/sbin/ifconfig \
  16. NETSTAT=/bin/netstat \
  17. ROUTE=/sbin/route \
  18. IPROUTE=/sbin/ip
  19. ifeq ($(BR2_PACKAGE_OPENVPN_SMALL),y)
  20. OPENVPN_CONF_OPTS += \
  21. --enable-small \
  22. --disable-plugins
  23. endif
  24. ifeq ($(BR2_PACKAGE_OPENVPN_LZ4),y)
  25. OPENVPN_DEPENDENCIES += lz4
  26. else
  27. OPENVPN_CONF_OPTS += --disable-lz4
  28. endif
  29. ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y)
  30. OPENVPN_DEPENDENCIES += lzo
  31. else
  32. OPENVPN_CONF_OPTS += --disable-lzo
  33. endif
  34. ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
  35. OPENVPN_DEPENDENCIES += libselinux
  36. OPENVPN_CONF_OPTS += --enable-selinux
  37. else
  38. OPENVPN_CONF_OPTS += --disable-selinux
  39. endif
  40. ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
  41. OPENVPN_DEPENDENCIES += linux-pam
  42. OPENVPN_CONF_OPTS += --enable-plugin-auth-pam
  43. else
  44. OPENVPN_CONF_OPTS += --disable-plugin-auth-pam
  45. endif
  46. ifeq ($(BR2_PACKAGE_OPENSSL),y)
  47. OPENVPN_DEPENDENCIES += openssl
  48. OPENVPN_CONF_OPTS += --with-crypto-library=openssl
  49. else ifeq ($(BR2_PACKAGE_MBEDTLS),y)
  50. OPENVPN_DEPENDENCIES += mbedtls
  51. OPENVPN_CONF_OPTS += --with-crypto-library=mbedtls
  52. endif
  53. ifeq ($(BR2_PACKAGE_PKCS11_HELPER),y)
  54. OPENVPN_DEPENDENCIES += pkcs11-helper
  55. OPENVPN_CONF_OPTS += --enable-pkcs11
  56. else
  57. OPENVPN_CONF_OPTS += --disable-pkcs11
  58. endif
  59. ifeq ($(BR2_PACKAGE_SYSTEMD),y)
  60. OPENVPN_DEPENDENCIES += systemd
  61. OPENVPN_CONF_OPTS += --enable-systemd
  62. else
  63. OPENVPN_CONF_OPTS += --disable-systemd
  64. endif
  65. define OPENVPN_INSTALL_TARGET_CMDS
  66. $(INSTALL) -m 755 $(@D)/src/openvpn/openvpn \
  67. $(TARGET_DIR)/usr/sbin/openvpn
  68. endef
  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))