summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
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"