|
|
@ -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: |
|
|
@ -27,9 +27,8 @@ |
|
|
|
|
|
|
|
# Source package infos |
|
|
|
NAMESRC=${NAMESRC:-kiwisolver} |
|
|
|
VERSION=${VERSION:-1.1.0} |
|
|
|
VERSION=${VERSION:-1.2.0} |
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
WGET=${WGET:-https://files.pythonhosted.org/packages/16/e7/df58eb8868d183223692d2a62529a594f6414964a3ae93548467b146a24d/$ARCHIVE} |
|
|
|
|
|
|
|
# Build infos |
|
|
|
NAMEPKG=${NAMEPKG:-python-kiwisolver} |
|
|
@ -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,11 +83,7 @@ tar xf $CWD/$ARCHIVE |
|
|
|
cd $NAME |
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
python2 setup.py build |
|
|
|
python2 setup.py install --root=$PKG |
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
python3 setup.py build |
|
|
|
python3 setup.py build -j $JOBS |
|
|
|
python3 setup.py install --root=$PKG |
|
|
|
|
|
|
|
# Strip binaries |
|
|
@ -100,6 +94,11 @@ find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \ |
|
|
|
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
install -m 644 README.rst releasenotes.rst $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
|
|
|
# Build HTML docs if possible |
|
|
|
if sphinx-build -b html docs/source $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 |
|
|
|
|
|
|
|