summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2018-07-11 12:13:32 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-07-14 06:55:59 +0700
commit780ae5fa0400acfdc2c6e8ba66de922c3456deb8 (patch)
tree438499ecf0c45f34d3ed0476b73f19cd0f0620a9
parent1948d3474805fd0bfee78a20c39cd999832f372a (diff)
downloadslackbuilds-780ae5fa0400acfdc2c6e8ba66de922c3456deb8.tar.gz
python/httplib2: Autodect python3, cleanups.
Fix download and homepage Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--python/httplib2/README7
-rw-r--r--python/httplib2/httplib2.SlackBuild20
-rw-r--r--python/httplib2/httplib2.info2
-rw-r--r--python/httplib2/slack-desc2
4 files changed, 14 insertions, 17 deletions
diff --git a/python/httplib2/README b/python/httplib2/README
index dfd8ae4c85..0f9a75ebaa 100644
--- a/python/httplib2/README
+++ b/python/httplib2/README
@@ -1,9 +1,4 @@
-httplib2 (python http library)
-
A comprehensive HTTP client library that supports many features
left out of other HTTP libraries.
-If you want to build this for use with Python 3.x (needs the optional
-dependency python3) pass the script PYTHON3=yes, like
-
- PYTHON3=yes ./httplib2.SlackBuild
+python3 is an optional (autodetected) dependency.
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
diff --git a/python/httplib2/httplib2.info b/python/httplib2/httplib2.info
index 9828b5245d..eadedaff07 100644
--- a/python/httplib2/httplib2.info
+++ b/python/httplib2/httplib2.info
@@ -1,7 +1,7 @@
PRGNAM="httplib2"
VERSION="0.9.2"
HOMEPAGE="https://github.com/jcgregorio/httplib2"
-DOWNLOAD="https://github.com/jcgregorio/httplib2/archive/0.9.2.tar.gz"
+DOWNLOAD="https://github.com/jcgregorio/httplib2/archive/0.9.2/httplib2-0.9.2.tar.gz"
MD5SUM="eb39d90dc64bd12a94184d76bddc65a3"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
diff --git a/python/httplib2/slack-desc b/python/httplib2/slack-desc
index 1c91c88c9e..39186d9a0b 100644
--- a/python/httplib2/slack-desc
+++ b/python/httplib2/slack-desc
@@ -11,7 +11,7 @@ httplib2:
httplib2: A comprehensive HTTP client library that supports many features
httplib2: left out of other HTTP libraries.
httplib2:
-httplib2: homepage: https://code.google.com/p/httplib2/
+httplib2: homepage: https://github.com/jcgregorio/httplib2
httplib2:
httplib2:
httplib2: