5d354ac1a8189680e42f971f379823401c8ff78e
[openwrt/svn-archive/archive.git] / net / openvpn / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=openvpn
12 PKG_VERSION:=2.0.9
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=60745008b90b7dbe25fe8337c550fec6
15
16 PKG_SOURCE_URL:=http://openvpn.net/release @SF/openvpn
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 PKG_CONFIGURE_OPTIONS := --enable-shared \
26 --disable-static \
27 --disable-pthread \
28 --disable-debug \
29 --disable-plugins \
30 --enable-management \
31 --disable-socks \
32 --enable-password-save \
33
34 define Package/openvpn
35 SECTION:=net
36 CATEGORY:=Network
37 DEPENDS:=+kmod-tun +libopenssl +liblzo
38 TITLE:=Open source VPN solution using SSL
39 DESCRIPTION:=\
40 Open source VPN solution using SSL
41 URL:=http://openvpn.net
42 MENU:=1
43 endef
44
45 define Package/openvpn-easy-rsa
46 $(call Package/openvpn)
47 DEPENDS:=openvpn +openssl-util
48 TITLE:=Simple shell scripts to manage a Certificate Authority
49 MENU:=0
50 endef
51
52 define Build/Configure
53 $(call Build/Configure/Default,$(PKG_CONFIGURE_OPTIONS))
54 endef
55
56 define Build/Compile
57 $(call Build/Compile/Default,DESTDIR="$(PKG_INSTALL_DIR)" \
58 install)
59 endef
60
61 define Package/openvpn/install
62 install -d -m0755 $(1)/usr/sbin
63 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(1)/usr/sbin/
64 endef
65
66 define Package/openvpn-easy-rsa/install
67 install -d -m0755 $(1)/usr/sbin $(1)/etc/easy-rsa
68 $(CP) $(PKG_BUILD_DIR)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req} $(1)/usr/sbin
69 install -m 0644 $(PKG_BUILD_DIR)/easy-rsa/2.0/openssl.cnf $(1)/etc/easy-rsa/openssl.cnf
70 install -m 0644 $(PKG_BUILD_DIR)/easy-rsa/2.0/vars $(1)/etc/easy-rsa/vars
71 endef
72
73 $(eval $(call BuildPackage,openvpn))
74 $(eval $(call BuildPackage,openvpn-easy-rsa))