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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=openvpn-easy-rsa
11
12PKG_REV:=ff5bfd1dd8e548cb24d302742af3894f893ef92f
13PKG_VERSION:=2013-01-30
14PKG_RELEASE=2
15
16PKG_SOURCE_PROTO:=git
17PKG_SOURCE_URL:=https://github.com/OpenVPN/easy-rsa.git
18PKG_SOURCE_VERSION:=$(PKG_REV)
19PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
20PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
21PKG_LICENSE:=GPL-2.0
22
23include $(INCLUDE_DIR)/package.mk
24
25define Package/openvpn-easy-rsa
26  TITLE:=Simple shell scripts to manage a Certificate Authority
27  SECTION:=net
28  CATEGORY:=Network
29  URL:=http://openvpn.net
30  SUBMENU:=VPN
31  DEPENDS:=+openssl-util
32endef
33
34define Package/openvpn-easy-rsa/conffiles
35/etc/easy-rsa/keys/serial
36/etc/easy-rsa/keys/index.txt
37/etc/easy-rsa/vars
38endef
39
40define Build/Configure
41
42endef
43
44define Build/Compile
45
46endef
47
48define Package/openvpn-easy-rsa/install
49	$(INSTALL_DIR) $(1)/usr/sbin
50	$(CP) $(PKG_BUILD_DIR)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} $(1)/usr/sbin/
51	$(INSTALL_DIR) $(1)/etc/easy-rsa
52	$(INSTALL_DATA) $(PKG_BUILD_DIR)/easy-rsa/2.0/openssl-1.0.0.cnf $(1)/etc/easy-rsa/openssl-1.0.0.cnf
53	$(INSTALL_DATA) $(PKG_BUILD_DIR)/easy-rsa/2.0/vars $(1)/etc/easy-rsa/vars
54	$(INSTALL_DIR) $(1)/etc/easy-rsa/keys
55	$(INSTALL_DATA) files/easy-rsa.index $(1)/etc/easy-rsa/keys/index.txt
56	$(INSTALL_DATA) files/easy-rsa.serial $(1)/etc/easy-rsa/keys/serial
57endef
58
59$(eval $(call BuildPackage,openvpn-easy-rsa))
60