aboutsummaryrefslogtreecommitdiffstats
path: root/testing/vpnc
diff options
context:
space:
mode:
authorJ0WI <J0WI@users.noreply.github.com>2019-10-23 11:42:31 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2019-10-25 16:06:31 +0200
commit96509889cf5825f907d6d17bc6da053cf0eea89f (patch)
tree75db9184353ec00e5ee3b266dc1eb203a24c259b /testing/vpnc
parent00ece49a34b1dd0edfc9a25da5ec7ef28b2936af (diff)
downloadaports-96509889cf5825f907d6d17bc6da053cf0eea89f.tar.bz2
aports-96509889cf5825f907d6d17bc6da053cf0eea89f.tar.xz
testing/vpnc: modernize
* build with TLS support * use patched fork, previous source was defunct and unmaintained * See: https://github.com/alpinelinux/aports/pull/11961
Diffstat (limited to 'testing/vpnc')
-rw-r--r--testing/vpnc/APKBUILD25
-rw-r--r--testing/vpnc/musl-libc.patch (renamed from testing/vpnc/working.patch)52
2 files changed, 35 insertions, 42 deletions
diff --git a/testing/vpnc/APKBUILD b/testing/vpnc/APKBUILD
index b01169a129..7285b95950 100644
--- a/testing/vpnc/APKBUILD
+++ b/testing/vpnc/APKBUILD
@@ -2,31 +2,30 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=vpnc
pkgver=0.5.3
-pkgrel=4
+_commit=101208be5b74039ea70b9e007ce0d6c9fbe44d82
+pkgrel=5
pkgdesc="IPSec VPN client compatible with Cisco equipment"
-url="https://www.unix-ag.uni-kl.de/~massar/vpnc/"
+url="https://github.com/streambinder/vpnc"
arch="all"
-license="GPL-2.0-or-later"
-makedepends="libgcrypt-dev perl linux-headers"
+license="GPL-3.0-or-later"
+makedepends="gnutls-dev libgcrypt-dev openssl-dev perl linux-headers"
subpackages="$pkgname-doc $pkgname-openrc"
-source="https://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-$pkgver.tar.gz
- working.patch
+source="$pkgname-$pkgver.zip::https://github.com/streambinder/vpnc/archive/$_commit.zip
+ musl-libc.patch
vpnc.initd
vpnc.confd"
-builddir="$srcdir"/vpnc-$pkgver
+builddir="$srcdir/$pkgname-$_commit"
build() {
- cd "$builddir"
+ sed 's|^#OPENSSL|OPENSSL|g' -i Makefile
make PREFIX=/usr
}
check() {
- cd "$builddir"
- ./vpnc --version
+ make test
}
package() {
- cd "$builddir"
make PREFIX=/usr DESTDIR="$pkgdir" install
install -m755 -D "$srcdir"/vpnc.initd \
"$pkgdir"/etc/init.d/vpnc
@@ -34,7 +33,7 @@ package() {
"$pkgdir"/etc/conf.d/vpnc
}
-sha512sums="fd1251d200c3826ebfd7022683e38912f30c2a95fbc51259bcd1fdf0570ef3c53cd842003c117a770657f7f8ebb00ceffeea91ced0c3f83dd9c1ca0488519ea3 vpnc-0.5.3.tar.gz
-7bb2334085d98dc206853fa92368684492f5bfd62b6dee54acebd5d114bfa3b2fb5ac3d65450a102b53da9b15de84182176705031fa97e61042c4144aa8d1e45 working.patch
+sha512sums="7f49032d9032b4508b4b57ec37347025ed0ef7cc09c527e3bce2b6a6d4f33c7037a648a262f7129f8b075f843ab6d3344f6cd4908ea21ab34ed62e1dcf5bb8ac vpnc-0.5.3.zip
+4b34c1b20a865bd36a58bfaa625f77c014a7286796586727610dcc55d50fac39a58bc7e1e03f2deb9b74229301bfc4f429e231081336f6f5eb111d5ae8cd6994 musl-libc.patch
d20091a67ccd3b8e9f31ca47c49577ff3cd5bf6ba9ef7bcd9f03231d87fa64d978c60ab69c67bbafdc18d6474d932d6ec68de02d13bea41ae6a7d31b845635e9 vpnc.initd
1254f687dcd9822becfcccabbb34d8343d715d70247dbf4b5e018835fff24b33f5272368f77199d697c8d11d913182b1f756d5e08a46b2057849779f09b19633 vpnc.confd"
diff --git a/testing/vpnc/working.patch b/testing/vpnc/musl-libc.patch
index 52ec3975cc..b4ac86612f 100644
--- a/testing/vpnc/working.patch
+++ b/testing/vpnc/musl-libc.patch
@@ -1,48 +1,42 @@
-Author: Rien Maertens <maertensrien@gmail.com>
-Description: Fixes VPNC not working. Patch taken and modified from OpenWRT.
-URL: https://github.com/openwrt/packages/blob/master/net/vpnc/patches/100-musl-compat.patch
---- orig/config.c
-+++ patched/config.c
-@@ -26,7 +26,10 @@
+--- a/src/config.c
++++ b/src/config.c
+@@ -29,6 +29,7 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
+#include <sys/ttydefaults.h>
-+#include <sys/types.h>
+ #include <sys/types.h>
#include <sys/utsname.h>
-+#include <sys/wait.h>
-
- #include <gcrypt.h>
-
---- orig/sysdep.c
-+++ patched/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 */
---- orig/sysdep.h
-+++ patched/sysdep.h
+ #include <sys/wait.h>
+--- a/src/sysdep.h
++++ b/src/sysdep.h
@@ -37,12 +37,14 @@
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_GETLINE 1
#define HAVE_UNSETENV 1
#define HAVE_SETENV 1
+ #endif
+--- a/src/sysdep.c
++++ b/src/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 */