diff options
Diffstat (limited to 'development/PyOpenGL/PyOpenGL.SlackBuild')
-rw-r--r-- | development/PyOpenGL/PyOpenGL.SlackBuild | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/development/PyOpenGL/PyOpenGL.SlackBuild b/development/PyOpenGL/PyOpenGL.SlackBuild index b44e39bf77..d13e9d6088 100644 --- a/development/PyOpenGL/PyOpenGL.SlackBuild +++ b/development/PyOpenGL/PyOpenGL.SlackBuild @@ -14,27 +14,38 @@ VERSION=3.0.0a5 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=${PKG:-$TMP/package-$NAME} OUTPUT=${OUTPUT:-/tmp} +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP || exit 1 +cd $TMP rm -rf $NAME-$VERSION -tar -zxvf $CWD/$NAME-$VERSION.tar.gz || exit 1 -cd $NAME-$VERSION || exit 1 +tar -zxvf $CWD/$NAME-$VERSION.tar.gz +cd $NAME-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . -python setup.py bdist || exit 1 -tar -C $PKG -zxvf $TMP/$NAME-$VERSION/dist/$NAME-$VERSION.linux-i686.tar.gz +python setup.py install --root=$PKG -( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -) +find $PKG | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : \ + | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$NAME-$VERSION install -m 0644 PKG-INFO documentation/{development,using}.html \ @@ -46,4 +57,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$NAME-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$NAME-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |