summaryrefslogtreecommitdiff
path: root/python/python-Levenshtein/python-Levenshtein.SlackBuild
diff options
context:
space:
mode:
authorJanis Eisaks <jancs@dv.lv>2012-05-05 12:21:09 -0400
committerErik Hanson <erik@slackbuilds.org>2012-05-07 12:18:08 -0500
commit2d41f5ec0ff540a6b326d2d06b38b7fc70aef5c0 (patch)
tree450e5ff75ea30d010e76788eaa126e3d2a17303c /python/python-Levenshtein/python-Levenshtein.SlackBuild
parent6f8dd33bc840e28312843c48aa8eed66a435f696 (diff)
downloadslackbuilds-2d41f5ec0ff540a6b326d2d06b38b7fc70aef5c0.tar.gz
python/python-Levenshtein: Added (string distance calculation)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'python/python-Levenshtein/python-Levenshtein.SlackBuild')
-rw-r--r--python/python-Levenshtein/python-Levenshtein.SlackBuild64
1 files changed, 64 insertions, 0 deletions
diff --git a/python/python-Levenshtein/python-Levenshtein.SlackBuild b/python/python-Levenshtein/python-Levenshtein.SlackBuild
new file mode 100644
index 0000000000..536c3305ec
--- /dev/null
+++ b/python/python-Levenshtein/python-Levenshtein.SlackBuild
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+# Slackware build script for MySQL-python.
+
+# Written by Jick Nan (jick.nan@gmail.com)
+
+PRGNAM=python-Levenshtein
+VERSION=0.10.2
+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}
+
+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"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar -xvf $CWD/$PRGNAM-$VERSION.tar.?z*
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+python setup.py install --root=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a PKG-INFO README.rst COPYING NEWS HISTORY.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}