### this file is sourced not run
PKGVER=0.30.1
PKGBUILD=1
PKGARCH=i686

# source: post BLFS 7.8 2016-01-07
TARBALL=neon-$PKGVER.tar.gz
MD5SUM=231adebe5c2f78fded3e3df6e958878e
SRC_URL=http://www.webdav.org/neon/$TARBALL
BUNDLE=

SLACKREQ='expat32 openssl32'
SLACKDESC="libneon32: libneon32 $PKGVER (HTTP and WebDAV client library)  
libneon32:  
libneon32: libneon is an HTTP and WebDAV client library, with a C interface.  
libneon32: 
libneon32: This contains 32-bit version of the library.
libneon32:
libneon32: 
libneon32: 
libneon32: 
libneon32: 
libneon32:  
"

### default pkg_download
### default pkg_prepare
### package - only collect the libraries
pkg_package() {
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share
	mkdir -p usr/bin &&
	mv -v tmp/*-32 usr/bin
}

### build
pkg_build() {
	cd /tmp/neon*
	# BLFS 7.8 patch for newer gnutls 3.4
	sed -e 's/client_set/set/'  \
		-e 's/gnutls_retr/&2/'  \
		-e 's/type = t/cert_&/' \
		-i src/ne_gnutls.c &&
	
	CONFFLAGS="$CONFFLAGS --enable-shared --with-ssl --disable-static \
		--with-ca-bundle=/etc/ssl/ca-bundle.crt --with-expat" # or --with-libxml2 or --with-ssl=gnutls

	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	
	# multilib
	mv -v /usr/bin/neon-config /tmp/neon-config-32
}


