void-packages/srcpkgs/vpnc/template

40 lines
1.1 KiB
Bash

# Template file for 'vpnc'
pkgname=vpnc
version=0.5.3
revision=9
_githash=43780cecd7a61668002f73b6f8b9f9ba61af74ad
build_style=gnu-makefile
make_use_env=yes
make_build_args="SBINDIR=/usr/bin"
make_check_target=test
hostmakedepends="perl"
makedepends="libgcrypt-devel openssl-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
}