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

# source: post BLFS 8.2 2018-06-09
TARBALL=stunnel-$PKGVER.tar.gz
MD5SUM=2836e0740d4a16fa489445d969ec0b7d
SRC_URL=ftp://ftp.stunnel.org/stunnel/archive/5.x/$TARBALL
BUNDLE=

SLACKREQ=openssl
SLACKDESC="stunnel: stunnel $PKGVER (SSL Tunnel tool)  
stunnel:  
stunnel: The stunnel package contains a program that allows you to encrypt 
stunnel: arbitrary TCP connections inside SSL (Secure Sockets Layer) so you 
stunnel: can easily communicate with clients over secure channels. stunnel can 
stunnel: be used to add SSL functionality to commonly used Inetd daemons like 
stunnel: POP-2, POP-3, and IMAP servers, to standalone daemons like NNTP, SMTP 
stunnel: and HTTP, and in tunneling PPP over network sockets without changes 
stunnel: to the server package source code.  
stunnel: 
stunnel: 
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	mkdir -p etc/stunnel &&
	cp tmp/pkg/stunnel.pem tmp/pkg/stunnel.conf-sample etc/stunnel
}

### default pkg_package
### build
pkg_build() {
#	return 1
	CONFFLAGS="$CONFFLAGS --disable-libwrap --enable-ipv6 --disable-fips --disable-systemd"
	MAKEINSTALLFLAGS="$MAKEINSTALLFLAGS docdir=/usr/share/doc/stunnel-$PKGVER"
	pkg_build_autoconf &&
	pkg_build_slackdesc
}
