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

TARBALL=libtool-2.4.2.tar.xz
MD5SUM=2ec8997e0c07249eb4cbd072417d70fe 
SRC_URL=http://distro.ibiblio.org/fatdog/source/710/clfs-packages-3.0.0.tar
BUNDLE=clfs-packages-3.0.0.tar

SLACKREQ=
SLACKDESC='libtool32: libtool32 2.4.2 (generic library support)  
libtool32:  
libtool32: The Libtool package contains the GNU generic library support script. 
libtool32: It wraps the complexity of using shared libraries in a consistent, 
libtool32: portable interface.  
libtool32: 
libtool32: This contains 32-bit libraries for libtool.
libtool32: 
libtool32: 
libtool32: 
libtool32:
'


### override download for LFS sources bundle
# $1-src-dir $2-tarball 
pkg_download() {
	echo downloading $BUNDLE for $TARBALL
	wget -P $1 $SRC_URL
	tar -xf $1/$BUNDLE --strip-components=1 -C $1 
	rm $1/$BUNDLE
}

### default pkg_prepare
### package - only get the libraries
pkg_package() {
	rm -rf bin sbin usr/bin/libtoolize usr/sbin usr/include usr/share
}

### build
pkg_build() {
	cd /tmp/libtool*
	echo "lt_cv_sys_dlsearch_path='/lib /usr/lib /usr/local/lib /opt/lib'" > config.cache &&
	CC="gcc ${BUILD32}" ./configure --prefix=/usr \
		--cache-file=config.cache &&
	make $MAKEFLAGS && make install &&
	pkg_build_slackdesc &&
	
	# libtool isn't multilib aware, so wrap it
	mv -v /usr/bin/libtool{,-32}
}
 

