2020-12-01 20:36:27 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2010-2013 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=openvpn-easy-rsa
|
|
|
|
|
2023-05-23 21:03:26 +00:00
|
|
|
PKG_VERSION:=3.1.3
|
|
|
|
PKG_RELEASE:=1
|
2020-12-07 21:00:37 +00:00
|
|
|
PKG_SOURCE_URL:=https://codeload.github.com/OpenVPN/easy-rsa/tar.gz/v$(PKG_VERSION)?
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2023-05-23 21:03:26 +00:00
|
|
|
PKG_HASH:=f2967aa598cb603dd20791002e767d0ce58e300b04c9cff1b6d6b14fedae6a80
|
2020-12-07 21:00:37 +00:00
|
|
|
|
|
|
|
# For git snapshots
|
|
|
|
#PKG_SOURCE_PROTO:=git
|
|
|
|
#PKG_RELEASE=0git$(PKG_SOURCE_DATE)
|
|
|
|
#PKG_SOURCE_URL:=https://github.com/OpenVPN/easy-rsa.git
|
|
|
|
#PKG_SOURCE_DATE:=2020-03-30
|
|
|
|
#PKG_SOURCE_VERSION:=945c9359f6ae3796df21e2986e49489718e0d5f8
|
|
|
|
#PKG_MIRROR_HASH:=
|
|
|
|
|
2020-12-01 20:36:27 +00:00
|
|
|
PKG_LICENSE:=GPL-2.0
|
2020-12-07 21:00:37 +00:00
|
|
|
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/easy-rsa-$(PKG_VERSION)
|
2020-12-01 20:36:27 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/openvpn-easy-rsa
|
|
|
|
TITLE:=CLI utility to build and manage a PKI CA.
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
URL:=http://openvpn.net
|
|
|
|
SUBMENU:=VPN
|
|
|
|
DEPENDS:=+openssl-util
|
2020-12-07 21:00:37 +00:00
|
|
|
PKGARCH:=all
|
2020-12-01 20:36:27 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/openvpn-easy-rsa/conffiles
|
|
|
|
/etc/easy-rsa/vars
|
|
|
|
/etc/easy-rsa/openssl-1.0.cnf
|
|
|
|
/etc/easy-rsa/openssl-easyrsa.cnf
|
2021-04-12 21:09:52 +00:00
|
|
|
/etc/profile.d/50-$(PKG_NAME).sh
|
2020-12-01 20:36:27 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
2020-12-07 21:00:37 +00:00
|
|
|
cd $(PKG_BUILD_DIR); \
|
|
|
|
$(PKG_BUILD_DIR)/build/build-dist.sh \
|
|
|
|
--no-windows \
|
|
|
|
--no-compress \
|
|
|
|
--dist-clean \
|
|
|
|
--version=$(PKG_VERSION)
|
2020-12-01 20:36:27 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/openvpn-easy-rsa/install
|
2020-12-07 21:00:37 +00:00
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/easy-rsa/
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dist-staging/unix/EasyRSA-$(PKG_VERSION)/easyrsa $(1)/usr/lib/easy-rsa/
|
|
|
|
|
2020-12-01 20:36:27 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
2020-12-18 00:31:29 +00:00
|
|
|
$(LN) ../lib/easy-rsa/easyrsa $(1)/usr/bin/easyrsa
|
2020-12-01 20:36:27 +00:00
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/etc/easy-rsa
|
2020-12-07 21:00:37 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/dist-staging/unix/EasyRSA-$(PKG_VERSION)/openssl-easyrsa.cnf $(1)/etc/easy-rsa/openssl-1.0.cnf
|
2020-12-18 00:31:29 +00:00
|
|
|
$(LN) openssl-1.0.cnf $(1)/etc/easy-rsa/openssl-easyrsa.cnf
|
|
|
|
$(LN) ../../../etc/easy-rsa/openssl-easyrsa.cnf $(1)/usr/lib/easy-rsa/openssl-easyrsa.cnf
|
2020-12-07 21:00:37 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/dist-staging/unix/EasyRSA-$(PKG_VERSION)/vars.example $(1)/etc/easy-rsa/vars
|
2020-12-18 00:31:29 +00:00
|
|
|
$(LN) ../../../etc/easy-rsa/vars $(1)/usr/lib/easy-rsa/vars
|
2020-12-01 20:36:27 +00:00
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/etc/easy-rsa/pki
|
|
|
|
chmod 700 $(1)/etc/easy-rsa/pki
|
|
|
|
$(INSTALL_DIR) $(1)/etc/easy-rsa/pki/private
|
|
|
|
chmod 700 $(1)/etc/easy-rsa/pki/private
|
|
|
|
$(INSTALL_DIR) $(1)/etc/easy-rsa/pki/reqs
|
|
|
|
chmod 700 $(1)/etc/easy-rsa/pki/reqs
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/etc/easy-rsa/x509-types
|
2020-12-07 21:00:37 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/dist-staging/unix/EasyRSA-$(PKG_VERSION)/x509-types/* $(1)/etc/easy-rsa/x509-types/
|
2020-12-18 00:31:29 +00:00
|
|
|
$(LN) ../../../etc/easy-rsa/x509-types $(1)/usr/lib/easy-rsa/x509-types
|
2020-12-01 20:36:27 +00:00
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
|
|
|
$(INSTALL_DATA) files/openvpn-easy-rsa.upgrade $(1)/lib/upgrade/keep.d/$(PKG_NAME)
|
2020-12-07 21:00:37 +00:00
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/etc/profile.d
|
|
|
|
$(INSTALL_DATA) files/openvpn-easy-rsa.profile $(1)/etc/profile.d/50-$(PKG_NAME).sh
|
2020-12-01 20:36:27 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,openvpn-easy-rsa))
|