You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.8 KiB

  1. #
  2. # Copyright (C) 2010-2013 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=openvpn-easy-rsa
  9. PKG_VERSION:=3.0.4
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_URL:=https://github.com/OpenVPN/easy-rsa/releases/download/v$(PKG_VERSION)/
  12. PKG_SOURCE:=EasyRSA-$(PKG_VERSION).tgz
  13. PKG_HASH:=472167f976c6cb7c860cec6150a5616e163ae20365c81f179811d6ee0779ec5a
  14. PKG_LICENSE:=GPL-2.0
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/EasyRSA-$(PKG_VERSION)
  16. PKGARCH:=all
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/openvpn-easy-rsa
  19. TITLE:=CLI utility to build and manage a PKI CA.
  20. SECTION:=net
  21. CATEGORY:=Network
  22. URL:=http://openvpn.net
  23. SUBMENU:=VPN
  24. DEPENDS:=+openssl-util
  25. endef
  26. define Package/openvpn-easy-rsa/conffiles
  27. /etc/easy-rsa/vars
  28. /etc/easy-rsa/openssl-1.0.cnf
  29. /etc/easy-rsa/openssl-easyrsa.cnf
  30. endef
  31. define Build/Configure
  32. endef
  33. define Build/Compile
  34. endef
  35. define Package/openvpn-easy-rsa/install
  36. $(INSTALL_DIR) $(1)/usr/bin
  37. $(INSTALL_BIN) $(PKG_BUILD_DIR)/easyrsa $(1)/usr/bin/
  38. $(INSTALL_DIR) $(1)/etc/easy-rsa
  39. $(INSTALL_DATA) $(PKG_BUILD_DIR)/openssl-easyrsa.cnf $(1)/etc/easy-rsa/openssl-1.0.cnf
  40. $(LN) /etc/easy-rsa/openssl-1.0.cnf $(1)/etc/easy-rsa/openssl-easyrsa.cnf
  41. $(INSTALL_DATA) $(PKG_BUILD_DIR)/vars.example $(1)/etc/easy-rsa/vars
  42. $(INSTALL_DIR) $(1)/etc/easy-rsa/pki
  43. chmod 700 $(1)/etc/easy-rsa/pki
  44. $(INSTALL_DIR) $(1)/etc/easy-rsa/pki/private
  45. chmod 700 $(1)/etc/easy-rsa/pki/private
  46. $(INSTALL_DIR) $(1)/etc/easy-rsa/pki/reqs
  47. chmod 700 $(1)/etc/easy-rsa/pki/reqs
  48. $(INSTALL_DIR) $(1)/etc/easy-rsa/x509-types
  49. $(INSTALL_DATA) $(PKG_BUILD_DIR)/x509-types/* $(1)/etc/easy-rsa/x509-types/
  50. $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
  51. $(INSTALL_DATA) files/openvpn-easy-rsa.upgrade $(1)/lib/upgrade/keep.d/$(PKG_NAME)
  52. endef
  53. $(eval $(call BuildPackage,openvpn-easy-rsa))