CWD=`pwd`

VERSION=2.3.1
ARCH=noarch
BUILD=1

TMP=/tmp
PKG=$TMP/package-python-demo
rm -rf $PKG
mkdir -p $PKG
cd $TMP
rm -rf Python-$VERSION
tar xjvf $CWD/Python-$VERSION.tar.bz2
cd Python-$VERSION
chown -R root.root .
find . -type d -exec chmod 755 {} \;
find . -type f -perm 775 -exec chmod 755 {} \;
find . -type f -perm 664 -exec chmod 644 {} \;
find . -type d -name CVS -exec rm -r {} \;
mkdir -p $PKG/usr/doc/python-$VERSION
cp -a Demo $PKG/usr/doc/python-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc.python-demo > $PKG/install/slack-desc

cd $PKG
makepkg -l y -c n $TMP/python-demo-$VERSION-$ARCH-$BUILD.tgz