summaryrefslogtreecommitdiffstats
path: root/python/pycld2/pycld2.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/pycld2/pycld2.SlackBuild')
-rw-r--r--python/pycld2/pycld2.SlackBuild20
1 files changed, 14 insertions, 6 deletions
diff --git a/python/pycld2/pycld2.SlackBuild b/python/pycld2/pycld2.SlackBuild
index 076ad3588a..70504f7a33 100644
--- a/python/pycld2/pycld2.SlackBuild
+++ b/python/pycld2/pycld2.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for pycld2
-# Copyright 2013-2018 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2013-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,12 +22,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=pycld2
SRCNAM=chromium-compact-language-detector
SRCREV=baaa737cb7fbd073df3ce3627b9d9e24e0f2753b
VERSION=${VERSION:-20151111}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +40,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -54,8 +64,6 @@ cd $SRCNAM-$SRCREV
# Fix location of header files
sed -i "s/^CLD2_PATH.*$/CLD2_PATH = \'\/usr\/include\/cld2\'/" setup.py setup_full.py
-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
@@ -69,4 +77,4 @@ 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}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE