2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://openvpn.net/release @SF/openvpn
17 PKG_MD5SUM:=60745008b90b7dbe25fe8337c550fec6
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23 include $(INCLUDE_DIR)/package.mk
25 define Package/openvpn
28 DEPENDS:=+kmod-tun +libopenssl +liblzo
29 TITLE:=Open source VPN solution using SSL
30 URL:=http://openvpn.net
34 define Package/openvpn/description
35 Open source VPN solution using SSL
38 define Package/openvpn-easy-rsa
39 $(call Package/openvpn)
40 DEPENDS:=openvpn +openssl-util
41 TITLE:=Simple shell scripts to manage a Certificate Authority
44 define Build/Configure
45 $(call Build/Configure/Default, \
51 --enable-password-save \
56 $(MAKE) -C $(PKG_BUILD_DIR) \
57 DESTDIR="$(PKG_INSTALL_DIR)" \
61 define Package/openvpn/install
62 $(INSTALL_DIR) $(1)/usr/sbin
63 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(1)/usr/sbin/
64 $(INSTALL_DIR) $(1)/etc/init.d/
65 $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
66 $(INSTALL_DIR) $(1)/etc/default
67 $(INSTALL_BIN) files/$(PKG_NAME).default $(1)/etc/default/$(PKG_NAME)
70 define Package/openvpn-easy-rsa/install
71 $(INSTALL_DIR) $(1)/usr/sbin
72 $(CP) $(PKG_BUILD_DIR)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} $(1)/usr/sbin/
73 $(INSTALL_DIR) $(1)/etc/easy-rsa
74 install -m 0644 $(PKG_BUILD_DIR)/easy-rsa/2.0/openssl.cnf $(1)/etc/easy-rsa/openssl.cnf
75 install -m 0644 $(PKG_BUILD_DIR)/easy-rsa/2.0/vars $(1)/etc/easy-rsa/vars
78 $(eval $(call BuildPackage,openvpn))
79 $(eval $(call BuildPackage,openvpn-easy-rsa))