### this file is sourced not run
PKGVER=3.6
PKGBUILD=1
PKGARCH=x86_64

TARBALL=diffutils-$PKGVER.tar.xz
MD5SUM=07cf286672ced26fba54cd0313bdc071
BUNDLE=fatdog-base-8.2.tar
SRC_URL=http://distro.ibiblio.org/fatdog/source/800/$BUNDLE

SLACKREQ=
SLACKDESC="diffutils: diffutils $PKGVER (show file differences)  
diffutils:  
diffutils: The Diffutils package contains programs that show the differences 
diffutils: between files or directories.  
diffutils: 
diffutils: 
diffutils: 
diffutils: 
diffutils: 
diffutils: 
diffutils: 
"


### 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
### default pkg_package
### build
pkg_build() {
	cd /tmp/diffutils*
	
	# LFS - prevent locale files from being installed
	sed -i 's:= @mkdir_p@:= /bin/mkdir -p:' po/Makefile.in.in &&
	
	CC="gcc ${BUILD64}" ./configure $CONFFLAGS &&
	
	# replace ed with vi as default editor for sdiff
	sed -i 's@\(^#define DEFAULT_EDITOR_PROGRAM \).*@\1"vi"@' lib/config.h &&
	make && make install &&
	
	pkg_build_slackdesc
}


