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

# source: james
TARBALL=openvpn-$PKGVER.tar.gz
MD5SUM=ef70ed036018b21403c921f72ff518af
SRC_URL=https://swupdate.openvpn.org/community/releases/$TARBALL
BUNDLE=

SLACKREQ='openssl iproute2 libcap-ng' # liblzo2 build-time dependency
SLACKDESC="openvpn25: openvpn25 $PKGVER (SSL VPN server and client)  
openvpn25:  
openvpn25: OpenVPN is a full-featured open source SSL VPN solution that 
openvpn25: accommodates a wide range of configurations, including remote access, 
openvpn25: site-to-site VPNs, Wi-Fi security, and enterprise-scale remote access 
openvpn25: solutions with load balancing, failover, and fine-grained 
openvpn25: access-controls. 
openvpn25: 
openvpn25: This is 2.5-series of openvpn.
openvpn25: 
openvpn25:
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS --disable-static --enable-x509-alt-username \
	--enable-password-save  --disable-plugin-auth-pam --enable-iproute2 --with-crypto-library=openssl \
	ac_cv_path_IPROUTE=/sbin/ip"
	# ac_cv_path_ROUTE=/sbin/route ac_cv_path_IFCONFIG=/sbin/ifconfig " - if we don't use iproute2
	## route and ifconfig don't exist in build tree, so override with the correct future location
	
	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	cp -a sample/* /usr/share/doc/openvpn &&
	rm /usr/share/doc/openvpn/Makefile* &&
	
	## initscripts
	install -d m755 /etc/init.d &&
	install -m 644 ../pkg/99-openvpn /etc/init.d
}
 
