aboutsummaryrefslogtreecommitdiff
path: root/python
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
parent8955145d74543cb98796a393309094d66513f8fa (diff)
python/pycld2: Added (a Python wrapper around the cld2 library)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'python')
-rw-r--r--python/pycld2/README1
-rw-r--r--python/pycld2/pycld2.SlackBuild68
-rw-r--r--python/pycld2/pycld2.info10
-rw-r--r--python/pycld2/slack-desc19
4 files changed, 98 insertions, 0 deletions
diff --git a/python/pycld2/README b/python/pycld2/README
new file mode 100644
index 0000000000000..64c65c067ff2e
--- /dev/null
+++ b/python/pycld2/README
@@ -0,0 +1 @@
+pycld2 is a Python wrapper around the cld2 language-detection library.
diff --git a/python/pycld2/pycld2.SlackBuild b/python/pycld2/pycld2.SlackBuild
new file mode 100644
index 0000000000000..1703ba521b275
--- /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}
diff --git a/python/pycld2/pycld2.info b/python/pycld2/pycld2.info
new file mode 100644
index 0000000000000..4c6807af3ff7a
--- /dev/null
+++ b/python/pycld2/pycld2.info
@@ -0,0 +1,10 @@
+PRGNAM="pycld2"
+VERSION="20130728"
+HOMEPAGE="https://code.google.com/p/chromium-compact-language-detector/"
+DOWNLOAD="http://jaxartes.net/files/pycld2-20130728.tar.bz2"
+MD5SUM="e4c07168d718a86c6e87a307b7235dda"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="cld2"
+MAINTAINER="Benjamin Trigona-Harany"
+EMAIL="slackbuilds@jaxartes.net"
diff --git a/python/pycld2/slack-desc b/python/pycld2/slack-desc
new file mode 100644
index 0000000000000..7e1f9944ef39f
--- /dev/null
+++ b/python/pycld2/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+pycld2: pycld2 (a Python wrapper around the cld2 library)
+pycld2:
+pycld2: pycld2 is a Python wrapper around the cld2 library. It provides both
+pycld2: the cld2 and cld2full modules.
+pycld2:
+pycld2:
+pycld2:
+pycld2:
+pycld2:
+pycld2:
+pycld2: