|
|
@ -1,6 +1,6 @@ |
|
|
|
#!/bin/bash |
|
|
|
# Build script for Slackware |
|
|
|
# Copyright (C) 2010,2016,2018,2019 Damien Goutte-Gattat |
|
|
|
# Copyright (C) 2010,2016,2018,2019,2020 Damien Goutte-Gattat |
|
|
|
# |
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
# is permitted provided that the following conditions are met: |
|
|
@ -29,9 +29,8 @@ |
|
|
|
|
|
|
|
# Source package infos |
|
|
|
NAMESRC=${NAMESRC:-pyOpenSSL} |
|
|
|
VERSION=${VERSION:-19.0.0} |
|
|
|
VERSION=${VERSION:-19.1.0} |
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
WGET=${WGET:-https://files.pythonhosted.org/packages/40/d0/8efd61531f338a89b4efa48fcf1972d870d2b67a7aea9dcf70783c8464dc/$ARCHIVE} |
|
|
|
|
|
|
|
# Build infos |
|
|
|
NAMEPKG=${NAMEPKG:-pyopenssl} |
|
|
@ -44,6 +43,7 @@ TMP=${TMP:-/tmp} |
|
|
|
OUT=${OUT:-$TMP/build} |
|
|
|
PKG=${PKG:-$OUT/$NAMEPKG} |
|
|
|
CWD=$(pwd) |
|
|
|
PYTHONDIR=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])') |
|
|
|
|
|
|
|
set -e # Quit if a command returns non-zero |
|
|
|
|
|
|
@ -59,8 +59,7 @@ fi |
|
|
|
|
|
|
|
# Get and verify the source archive |
|
|
|
if [ ! -r $ARCHIVE ]; then |
|
|
|
wget -c -O $ARCHIVE.part "$WGET" |
|
|
|
mv $ARCHIVE.part $ARCHIVE |
|
|
|
pip3 download --no-binary :all: --no-deps $NAMESRC==$VERSION |
|
|
|
fi |
|
|
|
sha256sum -c $ARCHIVE.sha256 |
|
|
|
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1) |
|
|
@ -70,16 +69,20 @@ cd $TMP |
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
cd $NAME |
|
|
|
python2 setup.py build |
|
|
|
python2 setup.py install --root=$PKG |
|
|
|
python3 setup.py build |
|
|
|
python3 setup.py install --root=$PKG |
|
|
|
|
|
|
|
# Install the documentation |
|
|
|
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
install -m 644 CHANGELOG.rst CONTRIBUTING.rst LICENSE PKG-INFO README.rst \ |
|
|
|
install -m 644 CHANGELOG.rst CONTRIBUTING.rst LICENSE README.rst \ |
|
|
|
$PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
|
|
|
# Build HTML docs if possible |
|
|
|
export PYTHONPATH=$PKG$PYTHONDIR |
|
|
|
if sphinx-build -b html doc $PKG/usr/doc/$NAMEPKG-$VERSION/html ; then |
|
|
|
rm -rf $PKG/usr/doc/$NAMEPKG-$VERSION/html/.{buildinfo,doctrees} |
|
|
|
fi |
|
|
|
|
|
|
|
# Copy slack-desc file |
|
|
|
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc |
|
|
|
|
|
|
|