void-packages/srcpkgs/vpnc/template
Enno Boland d74e6e841d vpnc: change upstream to fork
fixes #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
* Switch to build_style=gnu-makefile instead of manually calling make.
2021-02-01 10:00:11 +01:00

40 lines
1.2 KiB
Bash

# Template file for 'vpnc'
pkgname=vpnc
version=0.5.3
revision=8
_githash=43780cecd7a61668002f73b6f8b9f9ba61af74ad
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 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://github.com/streambinder/vpnc/archive/$_githash.tar.gz"
checksum=190493d792c8d5b2f7ba6a621fa14daf5602b2dcfcf31c202255fd08b1a943a4
conf_files="
/etc/vpnc/default.conf
/etc/vpnc/vpnc-script"
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" vpnc"
fi
post_patch() {
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
vsed -e 's%^my \$vpnc = .*;%my \$vpnc = "/usr/bin/vpnc";%' -i src/makeman.pl
fi
}
post_install() {
rm -r $DESTDIR/usr/lib/systemd/system
vinstall $FILESDIR/vpnc-script 755 etc/vpnc
}