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

TARBALL=libtool-$PKGVER.tar.xz
MD5SUM=1bfb9b923f2c1339b4d2ce1807064aa5
BUNDLE=fatdog-base-8.2.tar
SRC_URL=http://distro.ibiblio.org/fatdog/source/800/$BUNDLE

SLACKREQ=
SLACKDESC="libtool32: libtool32 $PKGVER (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='/$LIBDIR /usr/$LIBDIR /usr/local/$LIBDIR /opt/$LIBDIR'" > 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}
}
 

