|
|
@ -1,6 +1,6 @@ |
|
|
|
#!/bin/bash |
|
|
|
# Build script for Slackware |
|
|
|
# Copyright (C) 2018,2019 Damien Goutte-Gattat |
|
|
|
# Copyright (C) 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,7 +29,7 @@ |
|
|
|
|
|
|
|
# Source package infos |
|
|
|
NAMESRC=${NAMESRC:-prompt_toolkit} |
|
|
|
VERSION=${VERSION:-2.0.10} |
|
|
|
VERSION=${VERSION:-3.0.5} |
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
|
|
|
# Build infos |
|
|
@ -44,6 +44,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 |
|
|
|
|
|
|
@ -69,8 +70,6 @@ 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 |
|
|
|
|
|
|
@ -79,6 +78,12 @@ mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
install -m 644 AUTHORS.rst CHANGELOG LICENSE README.rst \ |
|
|
|
$PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
|
|
|
# Build HTML docs if possible |
|
|
|
export PYTHONPATH=$PKG$PYTHONDIR |
|
|
|
if sphinx-build -b html docs $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 |
|
|
|
|
|
|
|