summaryrefslogtreecommitdiff
path: root/python/pycld2/pycld2.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/pycld2/pycld2.SlackBuild')
-rw-r--r--python/pycld2/pycld2.SlackBuild12
1 files changed, 8 insertions, 4 deletions
diff --git a/python/pycld2/pycld2.SlackBuild b/python/pycld2/pycld2.SlackBuild
index b000cc9b40..96de1bb340 100644
--- a/python/pycld2/pycld2.SlackBuild
+++ b/python/pycld2/pycld2.SlackBuild
@@ -33,7 +33,7 @@ TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -50,14 +50,18 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$SRCREV
-tar xvf $CWD/$SRCNAM-$SRCREV.tar.gz || tar xvf $CWD/$SRCREV.tar.gz
+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
-/usr/bin/python setup.py install --prefix=/usr --root=$PKG
-/usr/bin/python setup_full.py install --prefix=/usr --root=$PKG
+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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README $PKG/usr/doc/$PRGNAM-$VERSION