Makefile 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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_BUILDDEP:= autotool
  11. PKG_DEPENDS:= kmod-tun ip
  12. PKG_URL:= http://openvpn.net/
  13. PKG_SITES:= http://swupdate.openvpn.org/community/releases/
  14. PKG_FLAVOURS_OPENVPN:= WITH_LZO WITH_MANAGEMENT WITH_HTTPPROXY WITH_SOCKS SERVER CLIENT
  15. PKGFD_SERVER:= deliver server example configuration
  16. PKGFD_CLIENT:= deliver client example configuration
  17. PKGFD_WITH_LZO:= enable LZO compression support
  18. PKGFS_WITH_LZO:= liblzo
  19. PKGFB_WITH_LZO:= liblzo
  20. PKGFD_WITH_MANAGEMENT:= enable management server support
  21. PKGFD_WITH_HTTPPROXY:= enable http proxy support
  22. PKGFD_WITH_SOCKS:= enable socks proxy support
  23. PKG_CHOICES_OPENVPN:= WITH_OPENSSL WITH_POLARSSL
  24. PKGCD_WITH_OPENSSL:= use OpenSSL for crypto
  25. PKGCS_WITH_OPENSSL:= libopenssl
  26. PKGCB_WITH_OPENSSL:= openssl
  27. PKGCD_WITH_POLARSSL:= use PolarSSL for crypto
  28. PKGCS_WITH_POLARSSL:= libpolarssl
  29. PKGCB_WITH_POLARSSL:= polarssl
  30. include $(TOPDIR)/mk/package.mk
  31. $(eval $(call PKG_template,OPENVPN,openvpn,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  32. AUTOTOOL_STYLE:= autoreconf
  33. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_LZO),)
  34. CONFIGURE_ARGS+= --enable-lzo
  35. else
  36. CONFIGURE_ARGS+= --disable-lzo
  37. endif
  38. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_MANAGEMENT),)
  39. CONFIGURE_ARGS+= --enable-management
  40. else
  41. CONFIGURE_ARGS+= --disable-management
  42. endif
  43. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_HTTPPROXY),)
  44. CONFIGURE_ARGS+= --enable-http-proxy
  45. else
  46. CONFIGURE_ARGS+= --disable-http-proxy
  47. endif
  48. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_SOCKS),)
  49. CONFIGURE_ARGS+= --enable-socks
  50. else
  51. CONFIGURE_ARGS+= --disable-socks
  52. endif
  53. ifeq (${ADK_PACKAGE_OPENVPN_WITH_OPENSSL},y)
  54. CONFIGURE_ARGS+= --with-crypto-library=openssl
  55. endif
  56. ifeq (${ADK_PACKAGE_OPENVPN_WITH_POLARSSL},y)
  57. CONFIGURE_ARGS+= --with-crypto-library=polarssl
  58. endif
  59. CONFIGURE_ARGS+= --disable-plugins \
  60. --enable-small \
  61. --disable-debug \
  62. --enable-iproute2
  63. openvpn-install:
  64. ${INSTALL_DIR} $(IDIR_OPENVPN)/usr/sbin $(IDIR_OPENVPN)/etc/openvpn
  65. ${INSTALL_BIN} $(WRKINST)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/
  66. ifeq ($(ADK_PACKAGE_OPENVPN_SERVER),y)
  67. $(CP) ./files/server.conf $(IDIR_OPENVPN)/etc/openvpn/
  68. echo "/etc/openvpn/server.conf" > ./files/openvpn.conffiles
  69. endif
  70. ifeq ($(ADK_PACKAGE_OPENVPN_CLIENT),y)
  71. $(CP) ./files/client.conf $(IDIR_OPENVPN)/etc/openvpn/
  72. echo "/etc/openvpn/client.conf" > ./files/openvpn.conffiles
  73. endif
  74. include ${TOPDIR}/mk/pkg-bottom.mk