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

# source: post BLFS 7.8 2-16-01-06
TARBALL=serf-$PKGVER.tar.bz2
MD5SUM=2e4efe57ff28cb3202a112e90f0c2889
SRC_URL=https://serf.googlecode.com/svn/src_releases/$TARBALL
BUNDLE=

SLACKREQ='libapr-util32 openssl32' # require scons to build
SLACKDESC="libserf32: libserf32 $PKGVER (HTTP client library)  
libserf32:  
libserf32: The Serf package contains a C-based HTTP client library built upon 
libserf32: the Apache Portable Runtime (APR) library. It multiplexes 
libserf32: connections, running the read/write communication asynchronously. 
libserf32: Memory copies and transformations are kept to a minimum to provide 
libserf32: high performance operation.  
libserf32: 
libserf32: 
libserf32: 
libserf32:
"

### 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
}

### build
pkg_build() {
	! [ -e /usr/bin/env ] && ln -s /tools/bin/env /usr/bin/env
	! [ -e /usr/bin/sed ] && ln -s /tools/bin/sed /usr/bin/sed
	cd /tmp/serf*
	sed -i "/Append/s:RPATH=libdir,::" SConstruct &&
	sed -i "/Default/s:lib_static,::" SConstruct &&
	sed -i "/Alias/s:install_static,::" SConstruct &&
	scons PREFIX=/usr LIBDIR=/usr/$LIBDIR &&
	scons PREFIX=/usr LIBDIR=/usr/$LIBDIR install &&
	pkg_build_slackdesc &&
	rm -f /usr/bin/env /usr/bin/sed
}


