6156171642760d0424c1a7def06025d4281e7875
[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
29 TITLE:=VPN client for Cisco 3000
30 URL:=http://www.unix-ag.uni-kl.de/~massar/vpnc/
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))