Makefile 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(TOPDIR)/rules.mk
  4. PKG_NAME:= openvpn
  5. PKG_VERSION:= 2.3.2
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 06e5f93dbf13f2c19647ca15ffc23ac1
  8. PKG_DESCR:= Open Source VPN solution using SSL
  9. PKG_SECTION:= net/security
  10. PKG_DEPENDS:= kmod-tun ip
  11. PKG_URL:= http://openvpn.net/
  12. PKG_SITES:= http://swupdate.openvpn.org/community/releases/
  13. PKG_FLAVOURS_OPENVPN:= WITH_LZO WITH_MANAGEMENT WITH_HTTPPROXY WITH_SOCKS SERVER CLIENT
  14. PKGFD_SERVER:= deliver server example configuration
  15. PKGFD_CLIENT:= deliver client example configuration
  16. PKGFD_WITH_LZO:= enable LZO compression support
  17. PKGFS_WITH_LZO:= liblzo
  18. PKGFB_WITH_LZO:= liblzo
  19. PKGFD_WITH_MANAGEMENT:= enable management server support
  20. PKGFD_WITH_HTTPPROXY:= enable http proxy support
  21. PKGFD_WITH_SOCKS:= enable socks proxy support
  22. PKG_CHOICES_OPENVPN:= WITH_OPENSSL WITH_POLARSSL
  23. PKGCD_WITH_OPENSSL:= use OpenSSL for crypto
  24. PKGCS_WITH_OPENSSL:= libopenssl
  25. PKGCB_WITH_OPENSSL:= openssl
  26. PKGCD_WITH_POLARSSL:= use PolarSSL for crypto
  27. PKGCS_WITH_POLARSSL:= libpolarssl
  28. PKGCB_WITH_POLARSSL:= polarssl
  29. include $(TOPDIR)/mk/package.mk
  30. $(eval $(call PKG_template,OPENVPN,openvpn,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  31. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_LZO),)
  32. CONFIGURE_ARGS+= --enable-lzo
  33. else
  34. CONFIGURE_ARGS+= --disable-lzo
  35. endif
  36. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_MANAGEMENT),)
  37. CONFIGURE_ARGS+= --enable-management
  38. else
  39. CONFIGURE_ARGS+= --disable-management
  40. endif
  41. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_HTTPPROXY),)
  42. CONFIGURE_ARGS+= --enable-http-proxy
  43. else
  44. CONFIGURE_ARGS+= --disable-http-proxy
  45. endif
  46. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_SOCKS),)
  47. CONFIGURE_ARGS+= --enable-socks
  48. else
  49. CONFIGURE_ARGS+= --disable-socks
  50. endif
  51. ifeq (${ADK_PACKAGE_OPENVPN_WITH_OPENSSL},y)
  52. CONFIGURE_ARGS+= --with-crypto-library=openssl
  53. endif
  54. ifeq (${ADK_PACKAGE_OPENVPN_WITH_POLARSSL},y)
  55. CONFIGURE_ARGS+= --with-crypto-library=polarssl
  56. endif
  57. CONFIGURE_ARGS+= --disable-plugins \
  58. --enable-small \
  59. --disable-debug \
  60. --enable-iproute2
  61. openvpn-install:
  62. ${INSTALL_DIR} $(IDIR_OPENVPN)/usr/sbin $(IDIR_OPENVPN)/etc/openvpn
  63. ${INSTALL_BIN} $(WRKINST)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/
  64. ifeq ($(ADK_PACKAGE_OPENVPN_SERVER),y)
  65. $(CP) ./files/server.conf $(IDIR_OPENVPN)/etc/openvpn/
  66. echo "/etc/openvpn/server.conf" > ./files/openvpn.conffiles
  67. endif
  68. ifeq ($(ADK_PACKAGE_OPENVPN_CLIENT),y)
  69. $(CP) ./files/client.conf $(IDIR_OPENVPN)/etc/openvpn/
  70. echo "/etc/openvpn/client.conf" > ./files/openvpn.conffiles
  71. endif
  72. include ${TOPDIR}/mk/pkg-bottom.mk