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.

94 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:=4
  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. /etc/profile.d/50-$(PKG_NAME).sh
  39. endef
  40. define Build/Configure
  41. endef
  42. define Build/Compile
  43. cd $(PKG_BUILD_DIR); \
  44. $(PKG_BUILD_DIR)/build/build-dist.sh \
  45. --no-windows \
  46. --no-compress \
  47. --dist-clean \
  48. --version=$(PKG_VERSION)
  49. endef
  50. define Package/openvpn-easy-rsa/install
  51. $(INSTALL_DIR) $(1)/usr/lib/easy-rsa/
  52. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dist-staging/unix/EasyRSA-$(PKG_VERSION)/easyrsa $(1)/usr/lib/easy-rsa/
  53. $(INSTALL_DIR) $(1)/usr/bin
  54. $(LN) ../lib/easy-rsa/easyrsa $(1)/usr/bin/easyrsa
  55. $(INSTALL_DIR) $(1)/etc/easy-rsa
  56. $(INSTALL_DATA) $(PKG_BUILD_DIR)/dist-staging/unix/EasyRSA-$(PKG_VERSION)/openssl-easyrsa.cnf $(1)/etc/easy-rsa/openssl-1.0.cnf
  57. $(LN) openssl-1.0.cnf $(1)/etc/easy-rsa/openssl-easyrsa.cnf
  58. $(LN) ../../../etc/easy-rsa/openssl-easyrsa.cnf $(1)/usr/lib/easy-rsa/openssl-easyrsa.cnf
  59. $(INSTALL_DATA) $(PKG_BUILD_DIR)/dist-staging/unix/EasyRSA-$(PKG_VERSION)/vars.example $(1)/etc/easy-rsa/vars
  60. $(LN) ../../../etc/easy-rsa/vars $(1)/usr/lib/easy-rsa/vars
  61. $(INSTALL_DIR) $(1)/etc/easy-rsa/pki
  62. chmod 700 $(1)/etc/easy-rsa/pki
  63. $(INSTALL_DIR) $(1)/etc/easy-rsa/pki/private
  64. chmod 700 $(1)/etc/easy-rsa/pki/private
  65. $(INSTALL_DIR) $(1)/etc/easy-rsa/pki/reqs
  66. chmod 700 $(1)/etc/easy-rsa/pki/reqs
  67. $(INSTALL_DIR) $(1)/etc/easy-rsa/x509-types
  68. $(INSTALL_DATA) $(PKG_BUILD_DIR)/dist-staging/unix/EasyRSA-$(PKG_VERSION)/x509-types/* $(1)/etc/easy-rsa/x509-types/
  69. $(LN) ../../../etc/easy-rsa/x509-types $(1)/usr/lib/easy-rsa/x509-types
  70. $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
  71. $(INSTALL_DATA) files/openvpn-easy-rsa.upgrade $(1)/lib/upgrade/keep.d/$(PKG_NAME)
  72. $(INSTALL_DIR) $(1)/etc/profile.d
  73. $(INSTALL_DATA) files/openvpn-easy-rsa.profile $(1)/etc/profile.d/50-$(PKG_NAME).sh
  74. endef
  75. $(eval $(call BuildPackage,openvpn-easy-rsa))