diff options
Diffstat (limited to 'development/MySQL-python/MySQL-python.SlackBuild')
-rw-r--r-- | development/MySQL-python/MySQL-python.SlackBuild | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/development/MySQL-python/MySQL-python.SlackBuild b/development/MySQL-python/MySQL-python.SlackBuild index c367b99dc9..0a8158e45c 100644 --- a/development/MySQL-python/MySQL-python.SlackBuild +++ b/development/MySQL-python/MySQL-python.SlackBuild @@ -1,14 +1,17 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for MySQL-python. # Written by Jick Nan (jick.nan@gmail.com) # Modified by the Slackbuilds.org project +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=MySQL-python -VERSION=${VERSION:-1.2.4} -BUILD=${BUILD:-3} +VERSION=${VERSION:-1.2.5} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -18,7 +21,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -52,12 +62,7 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Avoid downloading distribute -patch -p1 < $CWD/patches/no_distribute_download.patch -# Include my_config.h first -patch -p1 < $CWD/patches/MySQL-python-1.2.4-include-my_config-first.patch - -python setup.py install --root=$PKG +CPPFLAGS="-I/usr/include/mysql/server" python setup.py install --root=$PKG find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -72,4 +77,4 @@ 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} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |