### this file is sourced not run
PKGVER=3.0.1
PKGBUILD=1
PKGARCH=noarch

# source: post BLFS 7.8 updated to 3.0.1 (3.0.0 from BLFS 8.2 is **BUGGY**)
TARBALL=scons-$PKGVER.tar.gz
MD5SUM=b6a292e251b34b82c203b56cfa3968b3
SRC_URL=http://downloads.sourceforge.net/scons/$TARBALL
BUNDLE=

SLACKREQ=python
SLACKDESC="python-scons: python-scons $PKGVER (SCONS build system)  
python-scons:  
python-scons: SCons is a tool for building software (and other files) implemented in 
python-scons: Python. It is similar to the ever popular Make.  
python-scons: 
python-scons: This is python2 of scons. Useful for older packages.
python-scons: 
python-scons: 
python-scons: 
python-scons: 
python-scons:
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/scons* &&
	tar -xf ../pkg/scons_3.0.1-1.debian.tar.xz &&
	for p in $(cat debian/patches/series); do
		case $p in \#*) continue ;;
		*) patch -Np1 -i debian/patches/$p || return 1 ;;
		esac
	done &&
	true
}

### default pkg_package
### build
pkg_build() {
	cd /tmp/scons* &&
	python setup.py build --build-base=build64 &&
	python setup.py install \
		--prefix=/usr  \
		--standard-lib \
		--prefix=/usr  \
		--install-data=/usr/share &&
	pkg_build_slackdesc &&
	scons --version # run it for the first time so its byte code gets generated
}


