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

# source: BLFS 11.3
TARBALL=apr-$PKGVER.tar.bz2
MD5SUM=9a00835e4da8c215348e263b550fc130
SRC_URL=http://archive.apache.org/dist/apr/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC="libapr32: libapr32 $PKGVER (Apache Portable Runtime library)  
libapr32:  
libapr32: The Apache Portable Runtime (APR) is a supporting library for the 
libapr32: Apache web server. It provides a set of application programming 
libapr32: interfaces (APIs) that map to the underlying Operating System (OS). 
libapr32: Where the OS doesn't support a particular function, APR will provide 
libapr32: an emulation. Thus programmers can use the APR to make a program 
libapr32: portable across different platforms.  
libapr32: 
libapr32: This contains 32-bit version of the library.
libapr32:
"

### 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/apr* &&

	# BLFS 11.3 - fix issue checking location
	sed -e '/^case "$0"/s;$0;$(readlink -f $0);' \
		-i apr-config.in &&
		
	CONFFLAGS="$CONFFLAGS --disable-static \
		--with-installbuilddir=/usr/$LIBDIR/apr-1/build" &&
	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	
	# multilib
	mv -v /usr/bin/apr-1-config /tmp/apr-1-config-32
}


