6940c20e9280880615b8655611169bab82037bfb
[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 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/vpnc
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libgpg-error +libgcrypt +kmod-tun +ip
29 TITLE:=VPN client for Cisco 3000
30 URL:=http://www.unix-ag.uni-kl.de/~massar/vpnc/
31 SUBMENU:=vpn
32 endef
33
34 define Package/vpnc/conffiles
35 /etc/vpnc/default.conf
36 /etc/vpnc/vpnc-script
37 endef
38
39 define Build/Compile
40 $(call Build/Compile/Default, \
41 OFLAGS="$(TARGET_CFLAGS)" \
42 OS="Linux" \
43 STAGING_DIR="$(STAGING_DIR)" \
44 DESTDIR="$(PKG_INSTALL_DIR)" \
45 PREFIX=/usr \
46 all install \
47 )
48 endef
49
50 define Package/vpnc/install
51 $(INSTALL_DIR) $(1)/usr/sbin
52 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/vpnc \
53 $(PKG_INSTALL_DIR)/usr/sbin/vpnc-disconnect \
54 $(1)/usr/sbin/
55 install -d -m0700 $(1)/etc/vpnc
56 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/vpnc/default.conf $(1)/etc/vpnc/
57 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/vpnc/vpnc-script $(1)/etc/vpnc/
58 endef
59
60 $(eval $(call BuildPackage,vpnc))