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.

93 lines
2.9 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.8
  10. PKG_RELEASE:=2
  11. PKG_SOURCE_URL:=https://codeload.github.com/OpenVPN/easy-rsa/tar.gz/v$(PKG_VERSION)?
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_HASH:=fd6b67d867c3b8afd53efa2ca015477f6658a02323e1799432083472ac0dd200
  14. # For git snapshots
  15. #PKG_SOURCE_PROTO:=git
  16. #PKG_RELEASE=0git$(PKG_SOURCE_DATE)
  17. #PKG_SOURCE_URL:=https://github.com/OpenVPN/easy-rsa.git
  18. #PKG_SOURCE_DATE:=2020-03-30
  19. #PKG_SOURCE_VERSION:=945c9359f6ae3796df21e2986e49489718e0d5f8
  20. #PKG_MIRROR_HASH:=
  21. PKG_LICENSE:=GPL-2.0
  22. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
  23. PKG_BUILD_DIR:=$(BUILD_DIR)/easy-rsa-$(PKG_VERSION)
  24. include $(INCLUDE_DIR)/package.mk
  25. define Package/openvpn-easy-rsa
  26. TITLE:=CLI utility to build and manage a PKI CA.
  27. SECTION:=net
  28. CATEGORY:=Network
  29. URL:=http://openvpn.net
  30. SUBMENU:=VPN
  31. DEPENDS:=+openssl-util
  32. PKGARCH:=all
  33. endef
  34. define Package/openvpn-easy-rsa/conffiles
  35. /etc/easy-rsa/vars
  36. /etc/easy-rsa/openssl-1.0.cnf
  37. /etc/easy-rsa/openssl-easyrsa.cnf
  38. endef
  39. define Build/Configure
  40. endef
  41. define Build/Compile
  42. cd $(PKG_BUILD_DIR); \
  43. $(PKG_BUILD_DIR)/build/build-dist.sh \
  44. --no-windows \
  45. --no-compress \
  46. --dist-clean \
  47. --version=$(PKG_VERSION)
  48. endef
  49. define Package/openvpn-easy-rsa/install
  50. $(INSTALL_DIR) $(1)/usr/lib/easy-rsa/
  51. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dist-staging/unix/EasyRSA-$(PKG_VERSION)/easyrsa $(1)/usr/lib/easy-rsa/
  52. $(INSTALL_DIR) $(1)/usr/bin
  53. $(LN) ../lib/easy-rsa/easyrsa $(1)/usr/bin/easyrsa
  54. $(INSTALL_DIR) $(1)/etc/easy-rsa
  55. $(INSTALL_DATA) $(PKG_BUILD_DIR)/dist-staging/unix/EasyRSA-$(PKG_VERSION)/openssl-easyrsa.cnf $(1)/etc/easy-rsa/openssl-1.0.cnf
  56. $(LN) openssl-1.0.cnf $(1)/etc/easy-rsa/openssl-easyrsa.cnf
  57. $(LN) ../../../etc/easy-rsa/openssl-easyrsa.cnf $(1)/usr/lib/easy-rsa/openssl-easyrsa.cnf
  58. $(INSTALL_DATA) $(PKG_BUILD_DIR)/dist-staging/unix/EasyRSA-$(PKG_VERSION)/vars.example $(1)/etc/easy-rsa/vars
  59. $(LN) ../../../etc/easy-rsa/vars $(1)/usr/lib/easy-rsa/vars
  60. $(INSTALL_DIR) $(1)/etc/easy-rsa/pki
  61. chmod 700 $(1)/etc/easy-rsa/pki
  62. $(INSTALL_DIR) $(1)/etc/easy-rsa/pki/private
  63. chmod 700 $(1)/etc/easy-rsa/pki/private
  64. $(INSTALL_DIR) $(1)/etc/easy-rsa/pki/reqs
  65. chmod 700 $(1)/etc/easy-rsa/pki/reqs
  66. $(INSTALL_DIR) $(1)/etc/easy-rsa/x509-types
  67. $(INSTALL_DATA) $(PKG_BUILD_DIR)/dist-staging/unix/EasyRSA-$(PKG_VERSION)/x509-types/* $(1)/etc/easy-rsa/x509-types/
  68. $(LN) ../../../etc/easy-rsa/x509-types $(1)/usr/lib/easy-rsa/x509-types
  69. $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
  70. $(INSTALL_DATA) files/openvpn-easy-rsa.upgrade $(1)/lib/upgrade/keep.d/$(PKG_NAME)
  71. $(INSTALL_DIR) $(1)/etc/profile.d
  72. $(INSTALL_DATA) files/openvpn-easy-rsa.profile $(1)/etc/profile.d/50-$(PKG_NAME).sh
  73. endef
  74. $(eval $(call BuildPackage,openvpn-easy-rsa))