|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2010,2011,2017 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2010,2011,2017,2019 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -28,14 +28,13 @@
|
|
|
|
|
# Depends: l/python-markdown |
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-Cheetah} |
|
|
|
|
VERSION=${VERSION:-2.4.4} |
|
|
|
|
NAMESRC=${NAMESRC:-Cheetah3} |
|
|
|
|
VERSION=${VERSION:-3.2.4} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
WGET=${WGET:-https://pypi.python.org/packages/cd/b0/c2d700252fc251e91c08639ff41a8a5203b627f4e0a2ae18a6b662ab32ea/$ARCHIVE} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMEPKG=${NAMEPKG:-cheetah} |
|
|
|
|
BUILD=${BUILD:-2GGD} |
|
|
|
|
BUILD=${BUILD:-1GGD} |
|
|
|
|
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')} |
|
|
|
|
EXT=${EXT:-txz} |
|
|
|
|
|
|
|
|
@ -72,8 +71,7 @@ esac
|
|
|
|
|
|
|
|
|
|
# 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) |
|
|
|
@ -85,8 +83,12 @@ tar xf $CWD/$ARCHIVE
|
|
|
|
|
cd $NAME |
|
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
|
python setup.py build |
|
|
|
|
python setup.py install --root=$PKG |
|
|
|
|
python2 setup.py build |
|
|
|
|
python2 setup.py install --root=$PKG |
|
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
|
python3 setup.py build |
|
|
|
|
python3 setup.py install --root=$PKG |
|
|
|
|
|
|
|
|
|
# Strip binaries |
|
|
|
|
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \ |
|
|
|
@ -94,9 +96,14 @@ find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \
|
|
|
|
|
|
|
|
|
|
# Install the documentation |
|
|
|
|
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
install -m 644 CHANGES LICENSE README.markdown TODO \ |
|
|
|
|
install -m 644 ANNOUNCE.rst BUGS LICENSE README.rst TODO \ |
|
|
|
|
$PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
|
|
|
|
|
# Build HTML docs if Sphinx is available |
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|