unfs3: add support for compiling with the external librpc
[openwrt/svn-archive/archive.git] / net / openvpn / Makefile
1 #
2 # Copyright (C) 2006-2010 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.3
12 PKG_RELEASE:=4
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://openvpn.net/release @SF/openvpn
16 PKG_MD5SUM:=7486d3e270ba4b033e311d3e022a0ad7
17
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/openvpn
23 SECTION:=net
24 CATEGORY:=Network
25 DEPENDS:=+kmod-tun +libopenssl +PACKAGE_openvpn_complzo:liblzo
26 TITLE:=Open source VPN solution using SSL
27 URL:=http://openvpn.net
28 SUBMENU:=VPN
29 endef
30
31 define Package/openvpn/config
32 config PACKAGE_openvpn_complzo
33 bool "Enable --comp-lzo compression option"
34 depends on PACKAGE_openvpn
35 default y
36 endef
37
38 define Package/openvpn/conffiles
39 /etc/config/openvpn
40 endef
41
42 define Package/openvpn/description
43 Open source VPN solution using SSL
44 endef
45
46 define Package/openvpn-easy-rsa
47 $(call Package/openvpn)
48 DEPENDS:=openvpn +openssl-util
49 TITLE:=Simple shell scripts to manage a Certificate Authority
50 endef
51
52 define Package/openvpn-easy-rsa/conffiles
53 /etc/easy-rsa/keys/serial
54 /etc/easy-rsa/keys/index.txt
55 /etc/easy-rsa/vars
56 endef
57
58 CONFIGURE_ARGS+= \
59 --disable-pthread \
60 --disable-debug \
61 --disable-plugins \
62 --enable-management \
63 --disable-socks \
64 --enable-password-save \
65 --enable-small
66
67 ifndef CONFIG_PACKAGE_openvpn_complzo
68 CONFIGURE_ARGS += \
69 --disable-lzo
70 endif
71
72 define Package/openvpn/install
73 $(INSTALL_DIR) $(1)/usr/sbin
74 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(1)/usr/sbin/
75 $(INSTALL_DIR) $(1)/etc/init.d/
76 $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
77 $(INSTALL_DIR) $(1)/etc/config
78 $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
79 $(INSTALL_DIR) $(1)/etc/openvpn
80 endef
81
82 define Package/openvpn-easy-rsa/install
83 $(INSTALL_DIR) $(1)/usr/sbin
84 $(CP) $(PKG_BUILD_DIR)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} $(1)/usr/sbin/
85 $(INSTALL_DIR) $(1)/etc/easy-rsa
86 $(INSTALL_DATA) $(PKG_BUILD_DIR)/easy-rsa/2.0/openssl.cnf $(1)/etc/easy-rsa/openssl.cnf
87 $(INSTALL_DATA) $(PKG_BUILD_DIR)/easy-rsa/2.0/vars $(1)/etc/easy-rsa/vars
88 $(INSTALL_DIR) $(1)/etc/easy-rsa/keys
89 $(INSTALL_DATA) files/easy-rsa.index $(1)/etc/easy-rsa/keys/index.txt
90 $(INSTALL_DATA) files/easy-rsa.serial $(1)/etc/easy-rsa/keys/serial
91 endef
92
93 $(eval $(call BuildPackage,openvpn))
94 $(eval $(call BuildPackage,openvpn-easy-rsa))