mtr: moved to github
[packages.git] / net / vtun / 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:=vtun
11 PKG_VERSION:=3.0.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/vtun
16 PKG_MD5SUM:=d3d8bc4d58886498a1c338670eab9315
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/vtun
21   SECTION:=net
22   CATEGORY:=Network
23   DEPENDS:=+kmod-tun +VTUN_LZO:liblzo +VTUN_LZO:zlib +VTUN_SSL:libopenssl
24   TITLE:=VPN tunneling daemon
25   URL:=http://vtun.sourceforge.net
26   SUBMENU:=VPN
27   MENU:=1
28 endef
29
30 define Package/vtun/config
31 menu "Configuration"
32         depends on PACKAGE_vtun
33
34 config VTUN_config
35         bool
36
37         depends on PACKAGE_vtun
38         config VTUN_LZO
39                 bool "enable vtun compression"
40                 help
41                         vtun tunnels will be compressed
42                 default y
43
44         config VTUN_SSL
45                 bool "enable vtun ssl encryption"
46                 help
47                         vtun tunnels will be encrypted
48                 default y
49 endmenu
50 endef
51
52 define Package/vtun/conffiles
53 /etc/vtund.conf
54 endef
55
56 CONFIGURE_ARGS += \
57         $(if $(CONFIG_VTUN_LZO),--with-lzo-lib="$(STAGING_DIR)/usr/lib/",--disable-zlib) \
58         $(if $(CONFIG_VTUN_LZO),--with-lzo-headers="$(STAGING_DIR)/usr/include/lzo",--disable-lzo) \
59         $(if $(CONFIG_VTUN_SSL),--with-ssl-headers="$(STAGING_DIR)/usr/lib/",--disable-ssl) \
60
61 CONFIGURE_VARS += \
62         LIBS="$(TARGET_LDFLAGS)" \
63         $(if $(CONFIG_VTUN_LZO),LZO_HDR_DIR="$(STAGING_DIR)/usr/include/lzo") \
64         $(if $(CONFIG_VTUN_SSL),BLOWFISH_HDR_DIR="$(STAGING_DIR)/usr/include/openssl") \
65         $(if $(CONFIG_VTUN_SSL),SSL_HDR_DIR="$(STAGING_DIR)/usr/include/openssl") \
66
67 define Build/Compile
68         $(call Build/Compile/Default,vtund)
69 endef
70
71 define Package/vtun/install
72         $(INSTALL_DIR) $(1)/etc
73         $(INSTALL_CONF) $(PKG_BUILD_DIR)/vtund.conf $(1)/etc/
74         $(INSTALL_DIR) $(1)/usr/sbin
75         $(INSTALL_BIN) $(PKG_BUILD_DIR)/vtund $(1)/usr/sbin/
76 endef
77
78 $(eval $(call BuildPackage,vtun))