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

# source: BLFS 7.5 updated to to latest
TARBALL=curl-$PKGVER.tar.bz2
MD5SUM=6b952ca00e5473b16a11f05f06aa8dae
SRC_URL=http://curl.haxx.se/download/$TARBALL
BUNDLE=

SLACKREQ='openssl libssh2 librtmp' # 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.  
curl: 
curl: 
curl: 
curl: 
curl: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	#CONFFLAGS="$CONFFLAGS --disable-static --enable-threaded-resolver --disable-smb \
	#--with-ca-path=/etc/ssl/certs"
	CONFFLAGS="$CONFFLAGS --disable-static --disable-smb --enable-ares \
	--with-ca-path=/etc/ssl/certs"	
	
	pkg_build_autoconf && 
	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.4.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 &&
	mv -v /usr/include/curl/curlbuild{,-64}.h &&	
	install -m644 /tmp/pkg/curlbuild.h /usr/include/curl
}


