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

# source: CLFS 3.0 updated to 5.31 with debian and step patches
TARBALL=file-$PKGVER.tar.gz
MD5SUM=4f2503752ff041895090ed6435610435
BUNDLE=fatdog-base-8.2.tar
SRC_URL=http://distro.ibiblio.org/fatdog/source/800/$BUNDLE

SLACKREQ=
SLACKDESC="file32: file32 $PKGVER (Determine file types)  
file32:  
file32: The File package contains a utility for determining the type of a given 
file32: file or files.  
file32: 
file32: This package contains 32-bit libraries for file.
file32: 
file32: 
file32: 
file32: http://darwinsys.com/file/
file32:
"

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

### prepare
pkg_prepare() {
	local patches
	
	pkg_prepare_default &&
	cd tmp/file* &&
	
	patches=../pkg/patch/Debian &&
	while read p; do
		case $p in ''|\#*) continue ;; esac
		patch -p1 -i "$patches/$p" || return 1
	done < $patches/series &&
	
	patches=../pkg/patch &&
	for p in $patches/*; do
		[ -d "$p" ] && continue
		patch -p1 -i "$p" || return 1
	done
}

### package - only collect the libraries
pkg_package() {
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share
}

### default pkg_build (autoconf and slackdesc)
