summaryrefslogtreecommitdiffstats
path: root/python/httplib2/httplib2.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/httplib2/httplib2.SlackBuild')
-rw-r--r--python/httplib2/httplib2.SlackBuild20
1 files changed, 11 insertions, 9 deletions
diff --git a/python/httplib2/httplib2.SlackBuild b/python/httplib2/httplib2.SlackBuild
index a2b4603e5d..29c73bb9b6 100644
--- a/python/httplib2/httplib2.SlackBuild
+++ b/python/httplib2/httplib2.SlackBuild
@@ -1,7 +1,8 @@
#!/bin/sh
# Slackware build script for httplib2
-# Copyright 2013-2016 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
+
+# Copyright 2013-2018 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -28,7 +29,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
@@ -39,8 +40,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -53,9 +54,6 @@ else
LIBDIRSUFFIX=""
fi
-PYTHON=python
-[ "${PYTHON3:-no}" = "yes" ] && PYTHON=python3
-
DOCS="CHANGELOG LICENSE README.md"
set -e
@@ -64,7 +62,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -78,7 +76,11 @@ patch -p1 < $CWD/ssl_hostname.diff
# Use system ca-certificates.crt.
patch -p1 < $CWD/use_system_cacerts.patch
-$PYTHON setup.py install --root=$PKG
+python setup.py install --root=$PKG
+
+if $(python3 -c 'import sys' 2>/dev/null); then
+ python3 setup.py install --root=$PKG
+fi
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true