summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBenjamin Trigona-Harany <bosth@alumni.sfu.ca>2018-10-18 23:34:47 -0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-10-27 09:27:34 +0700
commitcb27f764099512f1d7e0fd500e467681be5a0673 (patch)
treed7a5160718127db10e6d2a721b79620d14cf1eda /python
parent1d9f9a41ccaa9c27d875886d5146de649bfdc6c2 (diff)
downloadslackbuilds-cb27f764099512f1d7e0fd500e467681be5a0673.tar.gz
python/pycld2: Script clean up.
Signed-off-by: Benjamin Trigona-Harany <bosth@alumni.sfu.ca>
Diffstat (limited to 'python')
-rw-r--r--python/pycld2/pycld2.SlackBuild52
-rw-r--r--python/pycld2/pycld2.info2
2 files changed, 26 insertions, 28 deletions
diff --git a/python/pycld2/pycld2.SlackBuild b/python/pycld2/pycld2.SlackBuild
index 96de1bb340..076ad3588a 100644
--- a/python/pycld2/pycld2.SlackBuild
+++ b/python/pycld2/pycld2.SlackBuild
@@ -1,34 +1,32 @@
#!/bin/sh
-# SlackBuild script for pycld2
+# Slackware build script for pycld2
-# Copyright 2013 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2013-2018 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:
+# Redistribution and use of this script, with or without modification, is
+# 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.
+# 1. Redistributions of this script 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.
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "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 AUTHOR 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
SRCNAM=chromium-compact-language-detector
SRCREV=baaa737cb7fbd073df3ce3627b9d9e24e0f2753b
VERSION=${VERSION:-20151111}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -54,17 +52,17 @@ tar xvf $CWD/$SRCNAM-$SRCREV.tar.gz
cd $SRCNAM-$SRCREV
# Fix location of header files
-sed -i "s/^CLD2_PATH.*$/CLD2_PATH = \'\/usr\/include\/cld2\'/" setup*.py
+sed -i "s/^CLD2_PATH.*$/CLD2_PATH = \'\/usr\/include\/cld2\'/" setup.py setup_full.py
-python setup.py install --prefix=/usr --root=$PKG
-python setup_full.py install --prefix=/usr --root=$PKG
-if $(python3 -c 'import sys' 2>/dev/null); then
- python3 setup.py install --prefix=/usr --root=$PKG
- python3 setup_full.py install --prefix=/usr --root=$PKG
-fi
+python2 setup.py install --prefix=/usr --root=$PKG
+python2 setup_full.py install --prefix=/usr --root=$PKG
+python3 setup.py install --prefix=/usr --root=$PKG
+python3 setup_full.py install --prefix=/usr --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a README $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
diff --git a/python/pycld2/pycld2.info b/python/pycld2/pycld2.info
index b085e758a6..1c3d4dba00 100644
--- a/python/pycld2/pycld2.info
+++ b/python/pycld2/pycld2.info
@@ -5,6 +5,6 @@ DOWNLOAD="https://github.com/mikemccand/chromium-compact-language-detector/archi
MD5SUM="c526197ab1bd42b4e9c707ae15257106"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="cld2"
+REQUIRES="cld2 python3"
MAINTAINER="Benjamin Trigona-Harany"
EMAIL="slackbuilds@jaxartes.net"