Upgrade xinetd to 2.3.14 (#3669)
[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:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://openvpn.net/release @SF/openvpn
17 PKG_MD5SUM:=60745008b90b7dbe25fe8337c550fec6
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/openvpn
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=+kmod-tun +libopenssl +liblzo
28 TITLE:=Open source VPN solution using SSL
29 URL:=http://openvpn.net
30 SUBMENU:=VPN
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 Build/Configure
44 $(call Build/Configure/Default, \
45 --disable-pthread \
46 --disable-debug \
47 --disable-plugins \
48 --enable-management \
49 --disable-socks \
50 --enable-password-save \
51 ,\
52 ac_cv_func_epoll_create=no \
53 )
54 endef
55
56 define Build/Compile
57 $(MAKE) -C $(PKG_BUILD_DIR) \
58 DESTDIR="$(PKG_INSTALL_DIR)" \
59 all install
60 endef
61
62 define Package/openvpn/install
63 $(INSTALL_DIR) $(1)/usr/sbin
64 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(1)/usr/sbin/
65 $(INSTALL_DIR) $(1)/etc/init.d/
66 $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
67 $(INSTALL_DIR) $(1)/etc/default
68 $(INSTALL_BIN) files/$(PKG_NAME).default $(1)/etc/default/$(PKG_NAME)
69 endef
70
71 define Package/openvpn-easy-rsa/install
72 $(INSTALL_DIR) $(1)/usr/sbin
73 $(CP) $(PKG_BUILD_DIR)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} $(1)/usr/sbin/
74 $(INSTALL_DIR) $(1)/etc/easy-rsa
75 install -m 0644 $(PKG_BUILD_DIR)/easy-rsa/2.0/openssl.cnf $(1)/etc/easy-rsa/openssl.cnf
76 install -m 0644 $(PKG_BUILD_DIR)/easy-rsa/2.0/vars $(1)/etc/easy-rsa/vars
77 endef
78
79 $(eval $(call BuildPackage,openvpn))
80 $(eval $(call BuildPackage,openvpn-easy-rsa))