### this file is sourced not run
PKGVER=3.0
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=gvpe-$PKGVER.tar.gz
MD5SUM=f21066334da7abd93403bf87f67c37db
SRC_URL=http://ftp.gnu.org/gnu/gvpe/$TARBALL
BUNDLE=

SLACKREQ='openssl' # 
SLACKDESC="gvpe: gvpe $PKGVER (GNU VPE VPN)  
gvpe:  
gvpe: GVPE - GNU Virtual Private Ethernet - is a suite designed to provide a 
gvpe: virtual private network for multiple nodes over an untrusted network. It 
gvpe: is small, fast, and supports many tunneling options (raw IP, UDP, TCP, 
gvpe: HTTP, ICMP and DNS). This package is build with blowfish as its cipher 
gvpe: and sha1 as its digest.
gvpe: 
gvpe: http://software.schmorp.de/pkg/gvpe.html
gvpe: 
gvpe:  
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/gvpe* &&

	# these are debian 3.0-2 patches
	patch -Np1 -i ../pkg/openssl1.1.patch &&
	patch -Np1 -i ../pkg/bundled_lib.patch &&
	true
}

### default pkg_package
### build
pkg_build() {
	cd /tmp/gvpe* &&
	autoreconf -fi &&
	CONFFLAGS="$CONFFLAGS \
		--enable-dns --enable-cipher=aes-256 \
		--enable-hmac-digest=sha512  --enable-auth-digest=sha512 \
		--enable-rsa-length=4096 --enable-hmac-length=16"
	pkg_build_autoconf &&
	pkg_build_slackdesc
}
