diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2018-07-11 12:13:32 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-07-14 06:55:59 +0700 |
commit | 780ae5fa0400acfdc2c6e8ba66de922c3456deb8 (patch) | |
tree | 438499ecf0c45f34d3ed0476b73f19cd0f0620a9 /python/httplib2/httplib2.SlackBuild | |
parent | 1948d3474805fd0bfee78a20c39cd999832f372a (diff) | |
download | slackbuilds-780ae5fa0400acfdc2c6e8ba66de922c3456deb8.tar.gz |
python/httplib2: Autodect python3, cleanups.
Fix download and homepage
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'python/httplib2/httplib2.SlackBuild')
-rw-r--r-- | python/httplib2/httplib2.SlackBuild | 20 |
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 |