|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2014,2016,2019 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2014,2016,2019,2020 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -24,19 +24,20 @@
|
|
|
|
|
# |
|
|
|
|
# Latest Sphinx sourcecode is available at: <http://sphinx-doc.org/>. |
|
|
|
|
# |
|
|
|
|
# Depends: l/jinja2, l/pygments, l/python-alabaster, l/python-babel |
|
|
|
|
# Depends: l/python-enum34, l/python-imagesize, l/python-typing |
|
|
|
|
# Depends: l/snowballstemmer, l/sphinxcontrib-websupport |
|
|
|
|
# Depends: l/jinja2, l/python-alabaster, l/python-babel, l/python-imagesize |
|
|
|
|
# Depends: l/snowballstemmer, l/sphinxcontrib-serializinghtml |
|
|
|
|
# Depends: l/sphinxcontrib-applehelp, l/sphinxcontrib-devhelp |
|
|
|
|
# Depends: l/sphinxcontrib-htmlhelp, l/sphinxcontrib-jsmath |
|
|
|
|
# Depends: l/sphinxcontrib-qthelp |
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-Sphinx} |
|
|
|
|
VERSION=${VERSION:-1.8.5} |
|
|
|
|
VERSION=${VERSION:-3.1.0} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
WGET=${WGET:-https://files.pythonhosted.org/packages/2a/86/8e1e8400bb6eca5ed960917952600fce90599e1cb0d20ddedd81ba163370/$ARCHIVE} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMEPKG=${NAMEPKG:-sphinx} |
|
|
|
|
BUILD=${BUILD:-2GGD} |
|
|
|
|
BUILD=${BUILD:-1GGD} |
|
|
|
|
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')} |
|
|
|
|
EXT=${EXT:-txz} |
|
|
|
|
|
|
|
|
@ -60,8 +61,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) |
|
|
|
@ -71,13 +71,6 @@ cd $TMP
|
|
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
|
cd $NAME |
|
|
|
|
python2 setup.py build |
|
|
|
|
python2 setup.py install --root=$PKG |
|
|
|
|
for f in sphinx-{apidoc,autogen,build,quickstart} ; do |
|
|
|
|
mv $PKG/usr/bin/$f $PKG/usr/bin/$f-2.7 |
|
|
|
|
done |
|
|
|
|
|
|
|
|
|
# And now for Python 3 |
|
|
|
|
python3 setup.py build |
|
|
|
|
python3 setup.py install --root=$PKG |
|
|
|
|
|
|
|
|
@ -86,7 +79,7 @@ mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION
|
|
|
|
|
install -m 644 AUTHORS CHANGES CONTRIBUTING.rst EXAMPLES LICENSE \ |
|
|
|
|
README.rst $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
(cd doc |
|
|
|
|
PYTHONPATH=../:$PYTHONPATH make html PYTHON=python |
|
|
|
|
PYTHONPATH=../:$PYTHONPATH make html PYTHON=python3 |
|
|
|
|
cp -r _build/html $PKG/usr/doc/$NAMEPKG-$VERSION/html |
|
|
|
|
) |
|
|
|
|
|
|
|
|
@ -96,14 +89,16 @@ install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
|
|
|
|
|
# Add dependency infos |
|
|
|
|
cat <<EOF > $PKG/install/slack-required |
|
|
|
|
jinja2 |
|
|
|
|
pygments |
|
|
|
|
python-alabaster |
|
|
|
|
python-babel |
|
|
|
|
python-enum34 |
|
|
|
|
python-imagesize |
|
|
|
|
python-typing |
|
|
|
|
snowballstemmer |
|
|
|
|
sphinxcontrib-websupport |
|
|
|
|
sphinxcontrib-serializinghtml |
|
|
|
|
sphinxcontrib-applehelp |
|
|
|
|
sphinxcontrib-devhelp |
|
|
|
|
sphinxcontrib-htmlhelp |
|
|
|
|
sphinxcontrib-jsmath |
|
|
|
|
sphinxcontrib-qthelp |
|
|
|
|
EOF |
|
|
|
|
|
|
|
|
|
# Package the tree |
|
|
|
|