Makefile 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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.0
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 452a83326ae198cf961e9ae02539c8fb
  8. PKG_DESCR:= Open Source VPN solution using SSL
  9. PKG_SECTION:= net
  10. PKG_DEPENDS:= kmod-tun
  11. ifeq ($(ADK_COMPILE_OPENVPN_WITH_OPENSSL),y)
  12. PKG_DEPENDS+= libopenssl
  13. PKG_BUILDDEP+= openssl
  14. endif
  15. ifneq ($(ADK_COMPILE_OPENVPN_WITH_LZO),y)
  16. PKG_DEPENDS+= liblzo
  17. PKG_BUILDDEP+= liblzo
  18. endif
  19. PKG_URL:= http://openvpn.net
  20. PKG_SITES:= http://openvpn.net/release/ \
  21. ${MASTER_SITE_SOURCEFORGE:=openvpn/}
  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_COMPILE_OPENVPN_WITH_OPENSSL),y)
  26. DISABLE_OPENSSL:=--disable-ssl --disable-crypto
  27. endif
  28. ifneq ($(ADK_COMPILE_OPENVPN_WITH_LZO),y)
  29. DISABLE_LZO:=--disable-lzo
  30. endif
  31. ifneq ($(ADK_COMPILE_OPENVPN_WITH_SERVER),y)
  32. DISABLE_SERVER:=--disable-server
  33. endif
  34. ifneq ($(ADK_COMPILE_OPENVPN_WITH_HTTP),y)
  35. DISABLE_HTTP:=--disable-http
  36. endif
  37. ifeq ($(ADK_COMPILE_OPENVPN_WITH_PASSWORD_SAVE),y)
  38. ENABLE_PASSWORD_SAVE:=--enable-password-save
  39. endif
  40. ifeq ($(ADK_COMPILE_OPENVPN_WITH_SMALL),y)
  41. ENABLE_SMALL:=--enable-small
  42. endif
  43. CONFIGURE_ARGS+= --disable-pthread \
  44. --disable-plugins \
  45. --disable-management \
  46. --disable-socks \
  47. --enable-iproute2 \
  48. --with-iproute-path=ip \
  49. --without-ifconfig-path \
  50. --without-route-path \
  51. $(DISABLE_LZO) \
  52. $(DISABLE_OPENSSL) \
  53. $(DISABLE_SERVER) \
  54. $(DISABLE_HTTP) \
  55. $(ENABLE_PASSWORD_SAVE) \
  56. $(ENABLE_SMALL)
  57. post-install:
  58. # main package
  59. ${INSTALL_DIR} $(IDIR_OPENVPN)/usr/sbin $(IDIR_OPENVPN)/etc/openvpn
  60. ${INSTALL_BIN} $(WRKINST)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/
  61. $(CP) ./files/openvpn.conf $(IDIR_OPENVPN)/etc/openvpn/
  62. # subpackage easy-rsa
  63. ${INSTALL_DIR} $(IDIR_OPENVPN_EASY_RSA)/usr/sbin \
  64. $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys
  65. touch $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys/index.txt
  66. $(CP) ./files/serial $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys
  67. $(CP) $(WRKBUILD)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} \
  68. $(IDIR_OPENVPN_EASY_RSA)/usr/sbin
  69. ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/openssl.cnf \
  70. $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/openssl.cnf
  71. ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/vars \
  72. $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/vars
  73. include ${TOPDIR}/mk/pkg-bottom.mk