openvpn: update to 2.1_rc19 (patch from #5900)
[openwrt/svn-archive/archive.git] / net / openvpn / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=openvpn
11 PKG_VERSION:=2.1_rc19
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://openvpn.net/release @SF/openvpn
16 PKG_MD5SUM:=ba2ee667a8b7606b125b7d32f47ca578
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/openvpn
21 SECTION:=net
22 CATEGORY:=Network
23 DEPENDS:=+kmod-tun +libopenssl +liblzo
24 TITLE:=Open source VPN solution using SSL
25 URL:=http://openvpn.net
26 SUBMENU:=VPN
27 endef
28
29 define Package/openvpn/conffiles
30 /etc/config/openvpn
31 endef
32
33 define Package/openvpn/description
34 Open source VPN solution using SSL
35 endef
36
37 define Package/openvpn-easy-rsa
38 $(call Package/openvpn)
39 DEPENDS:=openvpn +openssl-util
40 TITLE:=Simple shell scripts to manage a Certificate Authority
41 endef
42
43 define Package/openvpn-easy-rsa/conffiles
44 /etc/easy-rsa/keys/serial
45 /etc/easy-rsa/keys/index.txt
46 /etc/easy-rsa/vars
47 endef
48
49 define Build/Configure
50 $(call Build/Configure/Default, \
51 --disable-pthread \
52 --disable-debug \
53 --disable-plugins \
54 --enable-management \
55 --disable-socks \
56 --enable-password-save \
57 ,\
58 ac_cv_func_epoll_create=no \
59 )
60 endef
61
62 define Build/Compile
63 $(MAKE) -C $(PKG_BUILD_DIR) \
64 DESTDIR="$(PKG_INSTALL_DIR)" \
65 all install
66 endef
67
68 define Package/openvpn/install
69 $(INSTALL_DIR) $(1)/usr/sbin
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(1)/usr/sbin/
71 $(INSTALL_DIR) $(1)/etc/init.d/
72 $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
73 $(INSTALL_DIR) $(1)/etc/config
74 $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
75 $(INSTALL_DIR) $(1)/etc/openvpn
76 endef
77
78 define Package/openvpn-easy-rsa/install
79 $(INSTALL_DIR) $(1)/usr/sbin
80 $(CP) $(PKG_BUILD_DIR)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} $(1)/usr/sbin/
81 $(INSTALL_DIR) $(1)/etc/easy-rsa
82 $(INSTALL_DATA) $(PKG_BUILD_DIR)/easy-rsa/2.0/openssl.cnf $(1)/etc/easy-rsa/openssl.cnf
83 $(INSTALL_DATA) $(PKG_BUILD_DIR)/easy-rsa/2.0/vars $(1)/etc/easy-rsa/vars
84 $(INSTALL_DIR) $(1)/etc/easy-rsa/keys
85 $(INSTALL_DATA) files/easy-rsa.index $(1)/etc/easy-rsa/keys/index.txt
86 $(INSTALL_DATA) files/easy-rsa.serial $(1)/etc/easy-rsa/keys/serial
87 endef
88
89 $(eval $(call BuildPackage,openvpn))
90 $(eval $(call BuildPackage,openvpn-easy-rsa))