|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2019 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2019,2020 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -30,7 +30,7 @@
|
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-khard} |
|
|
|
|
VERSION=${VERSION:-0.15.1} |
|
|
|
|
VERSION=${VERSION:-0.16.1} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
@ -45,6 +45,7 @@ TMP=${TMP:-/tmp}
|
|
|
|
|
OUT=${OUT:-$TMP/build} |
|
|
|
|
PKG=${PKG:-$OUT/$NAMEPKG} |
|
|
|
|
CWD=$(pwd) |
|
|
|
|
[ "$ARCH" = x86_64 ] && LIBDIRSUFFIX=64 || LIBDIRSUFFIX= |
|
|
|
|
|
|
|
|
|
set -e # Quit if a command returns non-zero |
|
|
|
|
|
|
|
|
@ -70,22 +71,23 @@ cd $TMP
|
|
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
|
cd $NAME |
|
|
|
|
# Khard is Python 3 only |
|
|
|
|
python3 setup.py build |
|
|
|
|
python3 setup.py install --root=$PKG |
|
|
|
|
|
|
|
|
|
# Install the documentation |
|
|
|
|
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
install -m 644 AUTHORS CHANGES CONTRIBUTING.rst LICENSE README.md \ |
|
|
|
|
install -m 644 CHANGES CONTRIBUTING.rst LICENSE README.md \ |
|
|
|
|
$PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
|
|
|
|
|
# Build HTML docs and man pages if Sphinx is available |
|
|
|
|
if type -p sphinx-build ; then |
|
|
|
|
sphinx-build -b html doc/source $PKG/usr/doc/$NAMEPKG-$VERSION/html |
|
|
|
|
PYTHONPATH=$PKG/usr/lib$LIBDIRSUFFIX/python3.8/site-packages \ |
|
|
|
|
sphinx-build -b html doc/source $PKG/usr/doc/$NAMEPKG-$VERSION/html |
|
|
|
|
rm -rf $PKG/usr/doc/$NAMEPKG-$VERSION/html/.{buildinfo,doctrees} |
|
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/man/man{1,5} |
|
|
|
|
sphinx-build -b man doc/source man |
|
|
|
|
PYTHONPATH=$PKG/usr/lib$LIBDIRSUFFIX/python3.8/site-packages \ |
|
|
|
|
sphinx-build -b man doc/source man |
|
|
|
|
gzip -c -9 man/khard.1 > $PKG/usr/man/man1/khard.1.gz |
|
|
|
|
gzip -c -9 man/khard.conf.5 > $PKG/usr/man/man5/khard.conf.5.gz |
|
|
|
|
fi |
|
|
|
|