9a0bc3f9f420af14d792119c95e12d75c6f24738
[openwrt/svn-archive/archive.git] / net / vpnc / 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:=vpnc
12 PKG_VERSION:=0.4.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.unix-ag.uni-kl.de/~massar/vpnc/
17 PKG_MD5SUM:=604807e7dd90fce00a4e2344ee29c76d
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/vpnc
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=+libgpg-error +libgcrypt +kmod-tun +ip
28 TITLE:=VPN client for Cisco 3000
29 URL:=http://www.unix-ag.uni-kl.de/~massar/vpnc/
30 SUBMENU:=VPN
31 endef
32
33 define Package/vpnc/conffiles
34 /etc/vpnc/default.conf
35 /etc/vpnc/vpnc-script
36 endef
37
38 define Build/Compile
39 $(call Build/Compile/Default, \
40 OFLAGS="$(TARGET_CFLAGS)" \
41 OS="Linux" \
42 STAGING_DIR="$(STAGING_DIR)" \
43 DESTDIR="$(PKG_INSTALL_DIR)" \
44 PREFIX=/usr \
45 all install \
46 )
47 endef
48
49 define Package/vpnc/install
50 $(INSTALL_DIR) $(1)/usr/sbin
51 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/vpnc \
52 $(PKG_INSTALL_DIR)/usr/sbin/vpnc-disconnect \
53 $(1)/usr/sbin/
54 install -d -m0700 $(1)/etc/vpnc
55 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/vpnc/default.conf $(1)/etc/vpnc/
56 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/vpnc/vpnc-script $(1)/etc/vpnc/
57 endef
58
59 $(eval $(call BuildPackage,vpnc))