slackbuilds_ponce/python/distribute/distribute.SlackBuild
Audrius Kažukauskas ec51f0040d python/distribute: Updated for version 0.6.19.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
2011-07-30 13:22:10 -03:00

48 lines
1,003 B
Bash

#!/bin/sh
# Slackware build script for distribute
# Written by Audrius Kažukauskas <audrius@neutrino.lt>
PRGNAM=distribute
VERSION=${VERSION:-0.6.19}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -eu
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
# Don't need this.
rm -f setuptools/*.exe
python setup.py install --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
install -m 0644 *.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}