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

# source: BLFS 8.2 updated to latest
TARBALL=curl-$PKGVER.tar.xz
MD5SUM=131f76c84016c45806b902330a74164f
SRC_URL=http://curl.haxx.se/download/$TARBALL
BUNDLE=

SLACKREQ='openssl libssh2 librtmp libidn2 libzstd' # libc-ares (build-time only)
SLACKDESC="curl: curl $PKGVER (Versatile file transfer)  
curl:  
curl: The cURL package contains an utility and a library used for transferring 
curl: files both download and *upload* with URL syntax to any of the following 
curl: protocols: DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS POP3 POP3S 
curl: RTSP SCP SFTP SMTP SMTPS TELNET TFTP SSH SMB/CIFS.
curl: 
curl: 
curl: 
curl: 
curl: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	# threaded-resolver much faster than c-ares
	#CONFFLAGS="$CONFFLAGS --disable-static --disable-threaded-resolver --enable-ares \
	#--enable-smb --with-libssh2 \
	#--with-openssl --with-ca-path=/etc/ssl/certs"

	CONFFLAGS="$CONFFLAGS --disable-static --enable-threaded-resolver --disable-ares \
	--enable-smb --with-libssh2 \
	--with-openssl --with-ca-path=/etc/ssl/certs"	

	pkg_build_autoconf &&

	# docs
	rm -rf docs/examples/.deps &&
	find docs \( -name "Makefile*" -o -name "*.1" -o -name "*.3" \) -exec rm {} \; &&
	install -v -d -m755 /usr/share/doc/curl-$PKGVER &&
	cp -v -R docs/*     /usr/share/doc/curl-$PKGVER &&

	ln -sf /usr/$LIBDIR/libcurl.so.4.5.0 /usr/$LIBDIR/libcurl.so.3 && # Some games link to the older curl.

	pkg_build_slackdesc &&

	# CBLFS multilib patch
	mv -v /usr/bin/curl-config{,-64} &&
	ln -sfv multiarch_wrapper /usr/bin/curl-config
}


