Skip to content

Commit

Permalink
vpnc: change upstream to fork
Browse files Browse the repository at this point in the history
fixes void-linux#26798.

* Changes upstream to https://github.com/streambinder/vpnc/. That's a fork
  that's a fork which is at least used in alpine.
* Depends on vpnc-scripts. New upstream doesn't ship those files anymore
* Add wrapper script to stay backwards compatible
  • Loading branch information
Gottox committed Jan 30, 2021
1 parent d00fa5c commit 65fb8ea
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 125 deletions.
3 changes: 3 additions & 0 deletions srcpkgs/vpnc/files/vpnc-script
@@ -0,0 +1,3 @@
#!/bin/sh

exec /usr/libexec/vpnc-scripts/vpnc-script "$@"
81 changes: 0 additions & 81 deletions srcpkgs/vpnc/patches/00-fix-fritzbox.diff

This file was deleted.

13 changes: 13 additions & 0 deletions srcpkgs/vpnc/patches/0001-fix-sys-includes-for-musl.patch
@@ -0,0 +1,13 @@
diff --git a/src/vpnc.c b/src/vpnc.c
index ef1930a..36cae9b 100644
--- ./src/vpnc.c
+++ ./src/vpnc.c
@@ -24,7 +24,7 @@
#define _GNU_SOURCE
#include <assert.h>
#include <unistd.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
33 changes: 0 additions & 33 deletions srcpkgs/vpnc/patches/2-fix-musl.patch

This file was deleted.

30 changes: 19 additions & 11 deletions srcpkgs/vpnc/template
@@ -1,17 +1,22 @@
# Template file for 'vpnc'
pkgname=vpnc
version=0.5.3
revision=7
revision=8
_githash=6fd5f0662f076cfd38c00835ec561b05f46d998c
wrksrc="vpnc-$_githash"
build_style=gnu-makefile
make_use_env=yes
make_build_args="SBINDIR=/usr/bin"
make_check_target=test
hostmakedepends="perl"
makedepends="libgcrypt-devel"
depends="net-tools"
makedepends="libgcrypt-devel libressl-devel"
depends="net-tools vpnc-scripts"
short_desc="Client for cisco vpn concentrator"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.unix-ag.uni-kl.de/~massar/vpnc/"
distfiles="https://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-${version}.tar.gz"
checksum=46cea3bd02f207c62c7c6f2f22133382602baeda1dc320747809e94881414884

distfiles="https://github.com/streambinder/vpnc/archive/$_githash.tar.gz"
checksum=473449da6be522eea43c2b16e6b2214d6ace49a2eac0a625405981193fc43170
conf_files="
/etc/vpnc/default.conf
/etc/vpnc/vpnc-script"
Expand All @@ -20,14 +25,17 @@ if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" vpnc"
fi

do_configure() {
pre_configure() {
vsed -e 's/^#OPENSSL/OPENSSL/' -i Makefile
vsed -e 's/^install:.*/install: install-common/' -i Makefile
vsed -e 's#^SBINDIR=.*#SBINDIR=/$(PREFIX)/bin#' -i Makefile
if [ "$CROSS_BUILD" ]; then
sed -i 's%^my \$vpnc = .*;%my \$vpnc = "/usr/bin/vpnc";%' makeman.pl
fi
}
do_build() {
make CC=$CC ${makejobs}
}
do_install() {

post_install() {
rm -r $DESTDIR/usr/lib/systemd/system
make PREFIX=/usr SBINDIR=/usr/bin DESTDIR=${DESTDIR} install
vinstall $FILESDIR/vpnc-script 755 etc/vpnc
}

0 comments on commit 65fb8ea

Please sign in to comment.