Makefile 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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.2.2
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= c5181e27b7945fa6276d21873329c5c7
  8. PKG_DESCR:= Open Source VPN solution using SSL
  9. PKG_SECTION:= net/security
  10. PKG_DEPENDS:= kmod-tun libopenssl ip
  11. PKG_BUILDDEP:= openssl
  12. PKG_URL:= http://openvpn.net/
  13. PKG_SITES:= http://swupdate.openvpn.org/community/releases/
  14. PKG_SUBPKGS:= OPENVPN OPENVPN_EASY_RSA
  15. PKG_FLAVOURS_OPENVPN:= WITH_LZO WITH_MANAGEMENT WITH_HTTPPROXY WITH_SOCKS SERVER CLIENT
  16. PKGSS_OPENVPN_EASY_RSA:=openssl-util
  17. PKGFD_SERVER:= deliver server example configuration
  18. PKGFD_CLIENT:= deliver client example configuration
  19. PKGFD_WITH_LZO:= enable LZO compression support
  20. PKGFS_WITH_LZO:= liblzo
  21. PKGFB_WITH_LZO:= liblzo
  22. PKGFD_WITH_MANAGEMENT:= enable management server support
  23. PKGFD_WITH_HTTPPROXY:= enable http proxy support
  24. PKGFD_WITH_SOCKS:= enable socks proxy support
  25. include $(TOPDIR)/mk/package.mk
  26. $(eval $(call PKG_template,OPENVPN,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  27. $(eval $(call PKG_template,OPENVPN_EASY_RSA,openvpn-easy-rsa,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  28. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_LZO),)
  29. CONFIGURE_ARGS+= --enable-lzo
  30. else
  31. CONFIGURE_ARGS+= --disable-lzo
  32. endif
  33. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_MANAGEMENT),)
  34. CONFIGURE_ARGS+= --enable-management
  35. else
  36. CONFIGURE_ARGS+= --disable-management
  37. endif
  38. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_HTTPPROXY),)
  39. CONFIGURE_ARGS+= --enable-http
  40. else
  41. CONFIGURE_ARGS+= --disable-http
  42. endif
  43. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_SOCKS),)
  44. CONFIGURE_ARGS+= --enable-socks
  45. else
  46. CONFIGURE_ARGS+= --disable-socks
  47. endif
  48. CONFIGURE_ARGS+= --disable-pthread \
  49. --disable-plugins \
  50. --enable-small \
  51. --enable-iproute2 \
  52. --with-iproute-path=/usr/sbin/ip \
  53. --without-ifconfig-path \
  54. --without-route-path
  55. post-install:
  56. ${INSTALL_DIR} $(IDIR_OPENVPN)/usr/sbin $(IDIR_OPENVPN)/etc/openvpn
  57. ${INSTALL_BIN} $(WRKINST)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/
  58. ifeq ($(ADK_PACKAGE_OPENVPN_SERVER),y)
  59. $(CP) ./files/server.conf $(IDIR_OPENVPN)/etc/openvpn/
  60. echo "/etc/openvpn/server.conf" > ./files/openvpn.conffiles
  61. endif
  62. ifeq ($(ADK_PACKAGE_OPENVPN_CLIENT),y)
  63. $(CP) ./files/client.conf $(IDIR_OPENVPN)/etc/openvpn/
  64. echo "/etc/openvpn/client.conf" > ./files/openvpn.conffiles
  65. endif
  66. openvpn-easy-rsa-install:
  67. ${INSTALL_DIR} $(IDIR_OPENVPN_EASY_RSA)/usr/sbin \
  68. $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys
  69. touch $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys/index.txt
  70. $(CP) ./files/serial $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys
  71. $(CP) $(WRKBUILD)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} \
  72. $(IDIR_OPENVPN_EASY_RSA)/usr/sbin
  73. ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/openssl-1.0.0.cnf \
  74. $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/openssl.cnf
  75. ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/vars \
  76. $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/vars
  77. include ${TOPDIR}/mk/pkg-bottom.mk