Makefile 2.8 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.1.1
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= b273ed2b5ec8616fb9834cde8634bce7
  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. ifeq ($(ADK_PACKAGE_OPENVPN_WITH_LZO),y)
  13. PKG_BUILDDEP+= liblzo
  14. endif
  15. PKG_URL:= http://openvpn.net
  16. PKG_SITES:= http://openvpn.net/release/ \
  17. ${MASTER_SITE_SOURCEFORGE:=openvpn/}
  18. PKG_FLAVOURS:= WITH_LZO WITH_MANAGEMENT WITH_HTTPPROXY WITH_SOCKS
  19. PKGFD_WITH_LZO:= enable LZO compression support
  20. PKGFS_WITH_LZO:= liblzo
  21. PKGFD_WITH_MANAGEMENT:= enable management server support
  22. PKGFD_WITH_HTTPPROXY:= enable http proxy support
  23. PKGFD_WITH_SOCKS:= enable socks proxy support
  24. include $(TOPDIR)/mk/package.mk
  25. $(eval $(call PKG_template,OPENVPN,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  26. $(eval $(call PKG_template,OPENVPN_EASY_RSA,openvpn-easy-rsa,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  27. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_LZO),)
  28. CONFIGURE_ARGS+= --enable-lzo
  29. else
  30. CONFIGURE_ARGS+= --disable-lzo
  31. endif
  32. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_MANAGEMENT),)
  33. CONFIGURE_ARGS+= --enable-management
  34. else
  35. CONFIGURE_ARGS+= --disable-management
  36. endif
  37. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_HTTPPROXY),)
  38. CONFIGURE_ARGS+= --enable-http
  39. else
  40. CONFIGURE_ARGS+= --disable-http
  41. endif
  42. ifneq ($(ADK_PACKAGE_OPENVPN_WITH_SOCKS),)
  43. CONFIGURE_ARGS+= --enable-socks
  44. else
  45. CONFIGURE_ARGS+= --disable-socks
  46. endif
  47. CONFIGURE_ARGS+= --disable-pthread \
  48. --disable-plugins \
  49. --enable-small \
  50. --enable-iproute2 \
  51. --with-iproute-path=ip \
  52. --without-ifconfig-path \
  53. --without-route-path
  54. SUB_INSTALLS-y:=
  55. SUB_INSTALLS-m:=
  56. SUB_INSTALLS-${OPENVPN_EASY_RSA}+= openvpn-easy-rsa-install
  57. post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
  58. ${INSTALL_DIR} $(IDIR_OPENVPN)/usr/sbin $(IDIR_OPENVPN)/etc/openvpn
  59. ${INSTALL_BIN} $(WRKINST)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/
  60. $(CP) ./files/openvpn.conf $(IDIR_OPENVPN)/etc/openvpn/
  61. openvpn-easy-rsa-install:
  62. ${INSTALL_DIR} $(IDIR_OPENVPN_EASY_RSA)/usr/sbin \
  63. $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys
  64. touch $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys/index.txt
  65. $(CP) ./files/serial $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys
  66. $(CP) $(WRKBUILD)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} \
  67. $(IDIR_OPENVPN_EASY_RSA)/usr/sbin
  68. ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/openssl.cnf \
  69. $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/openssl.cnf
  70. ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/vars \
  71. $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/vars
  72. include ${TOPDIR}/mk/pkg-bottom.mk