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

TARBALL=flex-$PKGVER.tar.bz2
MD5SUM=77d44c6bb8c0705e0017ab9a84a1502b 
SRC_URL=http://distro.ibiblio.org/fatdog/source/710/clfs-packages-3.0.0.tar
BUNDLE=clfs-packages-3.0.0.tar

SLACKREQ=
SLACKDESC="flex32: flex32 $PKGVER (Fast lexical generator)  
flex32:  
flex32: The Flex package contains a utility for generating programs that 
flex32: recognize patterns in text.  
flex32: 
flex32: This is the 32-bit version of flex.
flex32: 
flex32: 
flex32: 
flex32: 
flex32:
"


### 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 collect the libraries
pkg_package() {
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share
}

### build
pkg_build() {
	cd /tmp/flex*
	
	CC="gcc ${BUILD32}" ./configure --prefix=/usr \
		--docdir=/usr/share/doc/flex-2.5.39 &&
	make $MAKEFLAGS && make install &&
	pkg_build_slackdesc
}
