+++ /dev/null
-#
-# Copyright (C) 2006-2012 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=vpnc
-PKG_VERSION:=0.5.3
-PKG_RELEASE:=3
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.unix-ag.uni-kl.de/~massar/vpnc/
-PKG_MD5SUM:=4378f9551d5b077e1770bbe09995afb3
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/vpnc
- SECTION:=net
- CATEGORY:=Network
- DEPENDS:=+libgpg-error +libgcrypt +kmod-tun +vpnc-scripts
- TITLE:=VPN client for Cisco EasyVPN
- URL:=http://www.unix-ag.uni-kl.de/~massar/vpnc/
- SUBMENU:=VPN
-endef
-
-define Package/vpnc/description
- A VPN client compatible with Cisco's EasyVPN equipment.
-
- Supports IPSec (ESP) with Mode Configuration and Xauth. Supports only
- shared-secret IPSec authentication with Xauth, AES (256, 192, 128),
- 3DES, 1DES, MD5, SHA1, DH1/2/5 and IP tunneling.
-endef
-
-define Package/vpnc/conffiles
-/etc/vpnc/default.conf
-endef
-
-define Build/Compile
- $(call Build/Compile/Default, \
- OFLAGS="$(TARGET_CFLAGS)" \
- OS="Linux" \
- STAGING_DIR="$(STAGING_DIR)" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- PREFIX=/usr \
- all install \
- )
-endef
-
-define Package/vpnc/install
- $(INSTALL_DIR) $(1)/usr/sbin
- $(CP) $(PKG_INSTALL_DIR)/usr/sbin/vpnc \
- $(PKG_INSTALL_DIR)/usr/sbin/vpnc-disconnect \
- $(1)/usr/sbin/
- $(INSTALL_DIR) $(1)/etc/vpnc
- $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/vpnc/default.conf $(1)/etc/vpnc/
-endef
-
-$(eval $(call BuildPackage,vpnc))
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -20,7 +20,7 @@
- # $Id: Makefile 312 2008-06-15 18:09:42Z Joerg Mayer $
-
- DESTDIR=
--PREFIX=/usr/local
-+PREFIX=/usr
- ETCDIR=/etc/vpnc
- BINDIR=$(PREFIX)/bin
- SBINDIR=$(PREFIX)/sbin
-@@ -51,14 +51,11 @@ RELEASE_VERSION := $(shell cat VERSION)
- #OPENSSLLIBS = -lcrypto
-
- CC=gcc
--CFLAGS ?= -O3 -g
--CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
--CFLAGS += $(shell libgcrypt-config --cflags)
-+CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include $(OFLAGS) '-DVERSION="$(shell cat VERSION)"'
- CPPFLAGS += -DVERSION=\"$(VERSION)\" $(OPENSSL_GPL_VIOLATION)
--LDFLAGS ?= -g
--LDFLAGS += $(shell libgcrypt-config --libs) $(OPENSSLLIBS)
-+LDFLAGS = -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -lgcrypt -lgpg-error
-
--ifeq ($(shell uname -s), SunOS)
-+ifeq ($(OS), SunOS)
- LDFLAGS += -lnsl -lresolv -lsocket
- endif
- ifneq (,$(findstring Apple,$(shell $(CC) --version)))
+++ /dev/null
---- a/vpnc-script.in
-+++ b/vpnc-script.in
-@@ -97,7 +97,7 @@ do_ifconfig() {
- fi
-
- # Point to point interface require a netmask of 255.255.255.255 on some systems
-- ifconfig "$TUNDEV" inet "$INTERNAL_IP4_ADDRESS" $ifconfig_syntax_ptp "$INTERNAL_IP4_ADDRESS" netmask 255.255.255.255 mtu ${MTU} up
-+ ifconfig "$TUNDEV" "$INTERNAL_IP4_ADDRESS" $ifconfig_syntax_ptp "$INTERNAL_IP4_ADDRESS" netmask 255.255.255.255 mtu ${MTU} up
-
- if [ -n "$INTERNAL_IP4_NETMASK" ]; then
- set_network_route $INTERNAL_IP4_NETADDR $INTERNAL_IP4_NETMASK $INTERNAL_IP4_NETMASKLEN
-@@ -503,6 +503,18 @@ do_disconnect() {
- destroy_tun_device
- }
-
-+start_vpn_nat() {
-+ iptables -A forwarding_rule -o $TUNDEV -j ACCEPT
-+ iptables -A forwarding_rule -i $TUNDEV -j ACCEPT
-+ iptables -t nat -A postrouting_rule -o $TUNDEV -j MASQUERADE
-+}
-+
-+stop_vpn_nat() {
-+ iptables -t nat -D postrouting_rule -o $TUNDEV -j MASQUERADE
-+ iptables -D forwarding_rule -i $TUNDEV -j ACCEPT
-+ iptables -D forwarding_rule -o $TUNDEV -j ACCEPT
-+}
-+
- #### Main
-
- if [ -z "$reason" ]; then
-@@ -516,8 +528,10 @@ case "$reason" in
- ;;
- connect)
- do_connect
-+ start_vpn_nat
- ;;
- disconnect)
-+ stop_vpn_nat
- do_disconnect
- ;;
- *)
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -69,7 +69,7 @@ vpnc : $(OBJS) vpnc.o
- $(CC) -o $@ $^ $(LDFLAGS)
-
- vpnc.8 : vpnc.8.template makeman.pl vpnc
-- ./makeman.pl
-+ touch vpnc.8
-
- vpnc-script : vpnc-script.in
- sed -e 's,@''PREFIX''@,$(PREFIX),g' $< > $@ && chmod 755 $@