summaryrefslogtreecommitdiff
path: root/python/pycld2/pycld2.SlackBuild
diff options
context:
space:
mode:
authorBenjamin Trigona-Harany <slackbuilds@jaxartes.net>2013-10-27 17:33:46 -0500
committerRobby Workman <rworkman@slackbuilds.org>2013-10-27 23:39:05 -0500
commitad7c59a14a67bb07da7e7dd2e7f0be177da62cf3 (patch)
treee7fdaa087e563716556e2e7cb3a3d93dee750671 /python/pycld2/pycld2.SlackBuild
parent8955145d74543cb98796a393309094d66513f8fa (diff)
downloadslackbuilds-ad7c59a14a67bb07da7e7dd2e7f0be177da62cf3.tar.gz
python/pycld2: Added (a Python wrapper around the cld2 library)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'python/pycld2/pycld2.SlackBuild')
-rw-r--r--python/pycld2/pycld2.SlackBuild68
1 files changed, 68 insertions, 0 deletions
diff --git a/python/pycld2/pycld2.SlackBuild b/python/pycld2/pycld2.SlackBuild
new file mode 100644
index 0000000000..1703ba521b
--- /dev/null
+++ b/python/pycld2/pycld2.SlackBuild
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+# SlackBuild script for pycld2
+
+# Copyright 2013 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=pycld2
+VERSION=${VERSION:-20130728}
+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 -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+
+# Fix location of header files
+sed -i "s/^CLD2_PATH.*$/CLD2_PATH = \'\/usr\/include\/cld2\'/" setup*.py
+
+/usr/bin/python setup.py install --prefix=/usr --root=$PKG
+/usr/bin/python setup_full.py install --prefix=/usr --root=$PKG
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README $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}