|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2018 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2018,2019 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -24,13 +24,12 @@ |
|
|
|
|
# |
|
|
|
|
# Latest jupyterlab sourcecode is available at: <http://jupyter.org/>. |
|
|
|
|
# |
|
|
|
|
# Depends: l/jupyterlab-launcher, l/python-futures, l/python-subprocess32 |
|
|
|
|
# Depends: n/jupyterlab-server |
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-jupyterlab} |
|
|
|
|
VERSION=${VERSION:-0.31.12} |
|
|
|
|
VERSION=${VERSION:-1.2.3} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
WGET=${WGET:-https://pypi.python.org/packages/32/fc/b52136c8a261d5b344c7dba3ea1c7ad4fc93a82af255c572a17510e8e425/$ARCHIVE} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMEPKG=${NAMEPKG:-jupyterlab} |
|
|
|
@ -59,8 +58,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) |
|
|
|
@ -70,10 +68,8 @@ cd $TMP |
|
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
|
cd $NAME |
|
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
|
python setup.py build |
|
|
|
|
python setup.py install --root=$PKG |
|
|
|
|
python3 setup.py build |
|
|
|
|
python3 setup.py install --root=$PKG |
|
|
|
|
|
|
|
|
|
# WTF why is this thing under /usr? without any |
|
|
|
|
# configure-time option to put it where it belongs? |
|
|
|
@ -83,14 +79,17 @@ mv $PKG/usr/etc $PKG/etc |
|
|
|
|
mkdir -p $PKG/usr/doc/$NAME |
|
|
|
|
install -m 644 CONTRIBUTING.md LICENSE README.md $PKG/usr/doc/$NAME |
|
|
|
|
|
|
|
|
|
# Build HTML docs if Sphinx is available |
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
# Add dependency infos |
|
|
|
|
cat <<EOF > $PKG/install/slack-required |
|
|
|
|
jupyterlab-launcher |
|
|
|
|
python-futures |
|
|
|
|
python-subprocess32 |
|
|
|
|
jupyterlab-server |
|
|
|
|
EOF |
|
|
|
|
|
|
|
|
|
# Package the tree |
|
|
|
|