1
0

Makefile 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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.1.3
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 7486d3e270ba4b033e311d3e022a0ad7
  8. PKG_DESCR:= Open Source VPN solution using SSL
  9. PKG_SECTION:= net/security
  10. PKG_DEPENDS:= kmod-tun libopenssl
  11. PKG_BUILDDEP:= openssl
  12. PKG_URL:= http://openvpn.net/
  13. PKG_SITES:= http://openvpn.net/release/
  14. PKG_SUBPKGS:= OPENVPN OPENVPN_EASY_RSA
  15. PKG_FLAVOURS_OPENVPN:= WITH_LZO WITH_MANAGEMENT WITH_HTTPPROXY WITH_SOCKS
  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. include $(TOPDIR)/mk/package.mk
  23. $(eval $(call PKG_template,OPENVPN,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  24. $(eval $(call PKG_template,OPENVPN_EASY_RSA,openvpn-easy-rsa,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  25. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_LZO),)
  26. CONFIGURE_ARGS+= --enable-lzo
  27. else
  28. CONFIGURE_ARGS+= --disable-lzo
  29. endif
  30. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_MANAGEMENT),)
  31. CONFIGURE_ARGS+= --enable-management
  32. else
  33. CONFIGURE_ARGS+= --disable-management
  34. endif
  35. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_HTTPPROXY),)
  36. CONFIGURE_ARGS+= --enable-http
  37. else
  38. CONFIGURE_ARGS+= --disable-http
  39. endif
  40. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_SOCKS),)
  41. CONFIGURE_ARGS+= --enable-socks
  42. else
  43. CONFIGURE_ARGS+= --disable-socks
  44. endif
  45. CONFIGURE_ARGS+= --disable-pthread \
  46. --disable-plugins \
  47. --enable-small \
  48. --enable-iproute2 \
  49. --with-iproute-path=ip \
  50. --without-ifconfig-path \
  51. --without-route-path
  52. post-install:
  53. ${INSTALL_DIR} $(IDIR_OPENVPN)/usr/sbin $(IDIR_OPENVPN)/etc/openvpn
  54. ${INSTALL_BIN} $(WRKINST)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/
  55. $(CP) ./files/openvpn.conf $(IDIR_OPENVPN)/etc/openvpn/
  56. openvpn-easy-rsa-install:
  57. ${INSTALL_DIR} $(IDIR_OPENVPN_EASY_RSA)/usr/sbin \
  58. $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys
  59. touch $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys/index.txt
  60. $(CP) ./files/serial $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys
  61. $(CP) $(WRKBUILD)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} \
  62. $(IDIR_OPENVPN_EASY_RSA)/usr/sbin
  63. ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/openssl.cnf \
  64. $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/openssl.cnf
  65. ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/vars \
  66. $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/vars
  67. include ${TOPDIR}/mk/pkg-bottom.mk