|
|
@ -1,6 +1,6 @@ |
|
|
|
#!/bin/bash |
|
|
|
# Build script for Slackware |
|
|
|
# Copyright (C) 2017 Damien Goutte-Gattat |
|
|
|
# Copyright (C) 2017,2020 Damien Goutte-Gattat |
|
|
|
# |
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
# is permitted provided that the following conditions are met: |
|
|
@ -26,10 +26,9 @@ |
|
|
|
# <https://palletsprojects.com/p/click/>. |
|
|
|
|
|
|
|
# Source package infos |
|
|
|
NAMESRC=${NAMESRC:-Click} |
|
|
|
VERSION=${VERSION:-7.0} |
|
|
|
NAMESRC=${NAMESRC:-click} |
|
|
|
VERSION=${VERSION:-7.1.2} |
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
WGET=${WGET:-https://files.pythonhosted.org/packages/f8/5c/f60e9d8a1e77005f664b76ff8aeaee5bc05d0a91798afd7f53fc998dbc47/$ARCHIVE} |
|
|
|
|
|
|
|
# Build infos |
|
|
|
NAMEPKG=${NAMEPKG:-python-click} |
|
|
@ -58,8 +57,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) |
|
|
@ -69,14 +67,12 @@ 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 CHANGES.rst CONTRIBUTING.rst LICENSE.rst README.rst \ |
|
|
|
install -m 644 CHANGES.rst LICENSE.rst README.rst \ |
|
|
|
$PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
|
|
|
# Copy slack-desc file |
|
|
|