Merge pull request #14698 from lipnitsk/vpnc
vpnc: update to maintained github fork
This commit is contained in:
commit
ad2153eb28
4 changed files with 30 additions and 119 deletions
|
@ -8,19 +8,17 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=vpnc
|
PKG_NAME:=vpnc
|
||||||
PKG_REV:=550
|
PKG_SOURCE_DATE:=2021-01-31
|
||||||
PKG_VERSION:=0.5.3.r$(PKG_REV)
|
PKG_SOURCE_VERSION:=43780cecd7a61668002f73b6f8b9f9ba61af74ad
|
||||||
PKG_RELEASE:=9
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=http://svn.unix-ag.uni-kl.de/vpnc/trunk/
|
PKG_SOURCE_URL:=https://github.com/streambinder/vpnc
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
PKG_MIRROR_HASH:=df833bbe369bb96cb915da9b63e4dded0f676f06bcdada4ef94e56b8d87b187e
|
||||||
PKG_SOURCE_VERSION:=$(PKG_REV)
|
|
||||||
PKG_SOURCE_PROTO:=svn
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
|
PKG_MAINTAINER:=Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
|
||||||
PKG_LICENSE:=VARIOUS
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS:= \
|
PKG_CONFIG_DEPENDS:= \
|
||||||
CONFIG_VPNC_GNUTLS \
|
CONFIG_VPNC_GNUTLS \
|
||||||
|
@ -36,9 +34,17 @@ endef
|
||||||
define Package/vpnc
|
define Package/vpnc
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
DEPENDS:=+libgpg-error +libgcrypt +kmod-tun +VPNC_OPENSSL:libopenssl +VPNC_GNUTLS:libgnutls +vpnc-scripts +resolveip
|
DEPENDS:=\
|
||||||
|
+libgpg-error \
|
||||||
|
+libgcrypt \
|
||||||
|
+kmod-tun \
|
||||||
|
+VPNC_OPENSSL:libopenssl \
|
||||||
|
+VPNC_GNUTLS:libgnutls \
|
||||||
|
+vpnc-scripts \
|
||||||
|
+resolveip \
|
||||||
|
|
||||||
TITLE:=VPN client for Cisco EasyVPN
|
TITLE:=VPN client for Cisco EasyVPN
|
||||||
URL:=http://www.unix-ag.uni-kl.de/~massar/vpnc/
|
URL:=https://davidepucci.it/doc/vpnc/
|
||||||
SUBMENU:=VPN
|
SUBMENU:=VPN
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -54,39 +60,28 @@ define Package/vpnc/conffiles
|
||||||
/etc/vpnc/default.conf
|
/etc/vpnc/default.conf
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifeq ($(CONFIG_VPNC_OPENSSL),y)
|
OPENSSL-y:=OPENSSL_GPL_VIOLATION=yes
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
|
mkdir $(PKG_BUILD_DIR)/bin
|
||||||
$(call Build/Compile/Default, \
|
$(call Build/Compile/Default, \
|
||||||
OFLAGS="$(TARGET_CFLAGS)" \
|
OFLAGS="$(TARGET_CFLAGS)" \
|
||||||
OS="Linux" VERSION="$(PKG_VERSION)" \
|
OS="Linux" \
|
||||||
STAGING_DIR="$(STAGING_DIR)" \
|
VERSION="$(PKG_VERSION)" \
|
||||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
$(OPENSSL-$(CONFIG_VPNC_OPENSSL)) \
|
||||||
OPENSSL_GPL_VIOLATION=yes PREFIX=/usr \
|
vpnc \
|
||||||
all install \
|
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
else
|
|
||||||
define Build/Compile
|
|
||||||
$(call Build/Compile/Default, \
|
|
||||||
OFLAGS="$(TARGET_CFLAGS)" \
|
|
||||||
OS="Linux" VERSION="$(PKG_VERSION)" \
|
|
||||||
STAGING_DIR="$(STAGING_DIR)" \
|
|
||||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
||||||
PREFIX=/usr \
|
|
||||||
all install \
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
endif
|
|
||||||
|
|
||||||
define Package/vpnc/install
|
define Package/vpnc/install
|
||||||
$(INSTALL_DIR) $(1)/lib/netifd/proto
|
$(INSTALL_DIR) $(1)/lib/netifd/proto
|
||||||
$(INSTALL_BIN) ./files/vpnc.sh $(1)/lib/netifd/proto/
|
$(INSTALL_BIN) ./files/vpnc.sh $(1)/lib/netifd/proto/
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/vpnc \
|
$(CP) $(PKG_BUILD_DIR)/bin/vpnc \
|
||||||
$(PKG_INSTALL_DIR)/usr/sbin/vpnc-disconnect \
|
$(PKG_BUILD_DIR)/src/vpnc-disconnect \
|
||||||
$(1)/usr/sbin/
|
$(1)/usr/sbin/
|
||||||
$(INSTALL_DIR) $(1)/etc/vpnc
|
$(INSTALL_DIR) $(1)/etc/vpnc
|
||||||
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/vpnc/default.conf $(1)/etc/vpnc/
|
$(INSTALL_CONF) $(PKG_BUILD_DIR)/src/vpnc.conf $(1)/etc/vpnc/default.conf
|
||||||
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
||||||
$(INSTALL_DATA) ./files/vpnc.upgrade $(1)/lib/upgrade/keep.d/vpnc
|
$(INSTALL_DATA) ./files/vpnc.upgrade $(1)/lib/upgrade/keep.d/vpnc
|
||||||
endef
|
endef
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -20,7 +20,7 @@
|
|
||||||
# $Id: Makefile 539 2013-12-04 13:41:04Z Antonio Borneo $
|
|
||||||
|
|
||||||
DESTDIR=
|
|
||||||
-PREFIX=/usr/local
|
|
||||||
+PREFIX=/usr
|
|
||||||
ETCDIR=/etc/vpnc
|
|
||||||
BINDIR=$(PREFIX)/bin
|
|
||||||
SBINDIR=$(PREFIX)/sbin
|
|
||||||
@@ -57,18 +57,15 @@ OBJS = $(addsuffix .o,$(basename $(SRCS)
|
|
||||||
CRYPTO_OBJS = $(addsuffix .o,$(basename $(CRYPTO_SRCS)))
|
|
||||||
BINOBJS = $(addsuffix .o,$(BINS))
|
|
||||||
BINSRCS = $(addsuffix .c,$(BINS))
|
|
||||||
-VERSION := $(shell sh mk-version)
|
|
||||||
RELEASE_VERSION := $(shell cat VERSION)
|
|
||||||
|
|
||||||
CC ?= gcc
|
|
||||||
-CFLAGS ?= -O3 -g
|
|
||||||
CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
|
|
||||||
-CFLAGS += $(shell libgcrypt-config --cflags) $(CRYPTO_CFLAGS)
|
|
||||||
+CFLAGS += -O3 -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include $(OFLAGS) $(CRYPTO_CFLAGS)
|
|
||||||
CPPFLAGS += -DVERSION=\"$(VERSION)\"
|
|
||||||
-LDFLAGS ?= -g
|
|
||||||
-LIBS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD)
|
|
||||||
+LIBS += -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -lgcrypt -lgpg-error $(CRYPTO_LDADD)
|
|
||||||
|
|
||||||
-ifeq ($(shell uname -s), SunOS)
|
|
||||||
+ifeq ($(OS), SunOS)
|
|
||||||
LIBS += -lnsl -lresolv -lsocket
|
|
||||||
endif
|
|
||||||
ifneq (,$(findstring Apple,$(shell $(CC) --version)))
|
|
||||||
@@ -82,7 +79,7 @@ vpnc : $(OBJS) vpnc.o
|
|
||||||
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
|
||||||
|
|
||||||
vpnc.8 : vpnc.8.template makeman.pl vpnc
|
|
||||||
- ./makeman.pl
|
|
||||||
+ touch vpnc.8
|
|
||||||
|
|
||||||
cisco-decrypt : cisco-decrypt.o decrypt-utils.o
|
|
||||||
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
|
|
@ -1,42 +0,0 @@
|
||||||
--- a/sysdep.h
|
|
||||||
+++ b/sysdep.h
|
|
||||||
@@ -37,12 +37,14 @@ int tun_read(int fd, unsigned char *buf,
|
|
||||||
int tun_get_hwaddr(int fd, char *dev, uint8_t *hwaddr);
|
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
-#if defined(__linux__) || defined(__GLIBC__)
|
|
||||||
+#if defined(__GLIBC__) || defined(__UCLIBC__)
|
|
||||||
#include <error.h>
|
|
||||||
+#define HAVE_ERROR 1
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
+#if defined(__linux__) || defined(__GLIBC__)
|
|
||||||
#define HAVE_VASPRINTF 1
|
|
||||||
#define HAVE_ASPRINTF 1
|
|
||||||
-#define HAVE_ERROR 1
|
|
||||||
#define HAVE_UNSETENV 1
|
|
||||||
#define HAVE_SETENV 1
|
|
||||||
#endif
|
|
||||||
--- a/sysdep.c
|
|
||||||
+++ b/sysdep.c
|
|
||||||
@@ -59,6 +59,10 @@
|
|
||||||
#if defined(__DragonFly__)
|
|
||||||
#include <net/tun/if_tun.h>
|
|
||||||
#elif defined(__linux__)
|
|
||||||
+# if !defined(__GLIBC__) && !defined(__UCLIBC__)
|
|
||||||
+# define _LINUX_IF_ETHER_H
|
|
||||||
+# include <net/ethernet.h>
|
|
||||||
+# endif
|
|
||||||
#include <linux/if_tun.h>
|
|
||||||
#elif defined(__APPLE__)
|
|
||||||
/* no header for tun */
|
|
||||||
--- a/config.c
|
|
||||||
+++ b/config.c
|
|
||||||
@@ -28,6 +28,7 @@
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <errno.h>
|
|
||||||
+#include <sys/ttydefaults.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/utsname.h>
|
|
||||||
#include <sys/wait.h>
|
|
|
@ -1,5 +1,5 @@
|
||||||
--- a/crypto-openssl.c
|
--- a/src/crypto-openssl.c
|
||||||
+++ b/crypto-openssl.c
|
+++ b/src/crypto-openssl.c
|
||||||
@@ -20,6 +20,7 @@
|
@@ -20,6 +20,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
Loading…
Reference in a new issue