Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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:= 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. SUB_INSTALLS-y:=
  53. SUB_INSTALLS-m:=
  54. SUB_INSTALLS-${OPENVPN_EASY_RSA}+= openvpn-easy-rsa-install
  55. post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
  56. ${INSTALL_DIR} $(IDIR_OPENVPN)/usr/sbin $(IDIR_OPENVPN)/etc/openvpn
  57. ${INSTALL_BIN} $(WRKINST)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/
  58. $(CP) ./files/openvpn.conf $(IDIR_OPENVPN)/etc/openvpn/
  59. openvpn-easy-rsa-install:
  60. ${INSTALL_DIR} $(IDIR_OPENVPN_EASY_RSA)/usr/sbin \
  61. $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys
  62. touch $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys/index.txt
  63. $(CP) ./files/serial $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys
  64. $(CP) $(WRKBUILD)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} \
  65. $(IDIR_OPENVPN_EASY_RSA)/usr/sbin
  66. ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/openssl.cnf \
  67. $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/openssl.cnf
  68. ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/vars \
  69. $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/vars
  70. include ${TOPDIR}/mk/pkg-bottom.mk