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