diff options
author | Duncan Roe <duncan_roe@optusnet.com.au> | 2018-09-15 17:50:08 +0100 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2018-09-15 17:50:08 +0100 |
commit | 2c92859540456b07fe5fc9a6868585cb161bfad0 (patch) | |
tree | 758cf1e8fee2caee3961b1cfa41af55c0871540c /academic | |
parent | 597bb61f960ea2fd31b68e71d1a7ef36cd375164 (diff) | |
download | slackbuilds-2c92859540456b07fe5fc9a6868585cb161bfad0.tar.gz |
academic/sage-bin: Added (python based mathematics software).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'academic')
-rw-r--r-- | academic/sage-bin/README | 32 | ||||
-rw-r--r-- | academic/sage-bin/doinst.sh | 18 | ||||
-rw-r--r-- | academic/sage-bin/profile.d/sage.csh | 5 | ||||
-rw-r--r-- | academic/sage-bin/profile.d/sage.sh | 5 | ||||
-rw-r--r-- | academic/sage-bin/sage-bin.SlackBuild | 108 | ||||
-rw-r--r-- | academic/sage-bin/sage-bin.info | 10 | ||||
-rw-r--r-- | academic/sage-bin/slack-desc | 19 |
7 files changed, 197 insertions, 0 deletions
diff --git a/academic/sage-bin/README b/academic/sage-bin/README new file mode 100644 index 0000000000..af657a74cc --- /dev/null +++ b/academic/sage-bin/README @@ -0,0 +1,32 @@ +Sage is a free open-source mathematics software system licensed under +the GPL. It combines the power of many existing open-source packages +into a common Python-based interface. + +Sage can be used in several ways: through an interactive command line, +by writing stand-alone scripts, through the graphical notebook +interface in a browser, or through the KDE Cantor application (part +of a full Slackware installation). + +This SlackBuild repackages an already-built binary package which +exceeds 1.5GB in size, and the resulting Slackware package uses >5GB +disk space. + +To upgrade from the previous source-built Sage package from SBo, use +the upgradepkg command like this: + + upgradepkg sage%sage-bin-8.3-x86_64-1_SBo.tgz + +After installing or upgrading, you will need to logout or reboot so +that sage is found in your path. + +Sage's default colour scheme is for a terminal with a light background. +For a dark backgrounded terminal you may prefer the scheme after +issuing: + + mkdir -p ~/.sage; echo "%colors Linux" >> ~/.sage/init.sage + +For 32-bit i686, the most recent binary package is version 8.2. You can +download sage-8.2-Debian_GNU_Linux_8-i686.tar.bz2 and then use this +SlackBuild as follows: + + VERSION=8.2 DEBVERSION=8 ARCH=i686 ./sage-bin.SlackBuild diff --git a/academic/sage-bin/doinst.sh b/academic/sage-bin/doinst.sh new file mode 100644 index 0000000000..72713dbdfa --- /dev/null +++ b/academic/sage-bin/doinst.sh @@ -0,0 +1,18 @@ +# update texmf to recognize the newly installed sagetex +if [ -x /usr/share/texmf/bin/texhash ]; then + /usr/share/texmf/bin/texhash usr/share/texmf >/dev/null 2>&1 +fi + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/academic/sage-bin/profile.d/sage.csh b/academic/sage-bin/profile.d/sage.csh new file mode 100644 index 0000000000..280116580f --- /dev/null +++ b/academic/sage-bin/profile.d/sage.csh @@ -0,0 +1,5 @@ +#!/bin/csh +# Add SAGE_ROOT path and MANPATH for Sage: +setenv SAGE_ROOT /opt/SageMath +set path = ( $path ${SAGE_ROOT}/local/bin ) +setenv MANPATH ${MANPATH}:${SAGE_ROOT}/local/share/man diff --git a/academic/sage-bin/profile.d/sage.sh b/academic/sage-bin/profile.d/sage.sh new file mode 100644 index 0000000000..4ba39f4919 --- /dev/null +++ b/academic/sage-bin/profile.d/sage.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# Add SAGE_ROOT PATH and MANPATH for Sage: +export SAGE_ROOT=/opt/SageMath +PATH="$PATH:${SAGE_ROOT}/local/bin" +MANPATH="$MANPATH:${SAGE_ROOT}/local/share/man" diff --git a/academic/sage-bin/sage-bin.SlackBuild b/academic/sage-bin/sage-bin.SlackBuild new file mode 100644 index 0000000000..90c381a894 --- /dev/null +++ b/academic/sage-bin/sage-bin.SlackBuild @@ -0,0 +1,108 @@ +#!/bin/sh + +# Slackware build script for sage-bin + +# Copyright 2018 Duncan Roe, Melbourne, Australia +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=sage-bin +VERSION=${VERSION:-8.3} +DEBVERSION=${DEBVERSION:-9} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i686 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "i686" ]; then + echo "Architecture $ARCH is not supported" >&2 + exit 1 +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $PKG +mkdir root proc opt +tar xvf $CWD/sage-$VERSION-Debian_GNU_Linux_$DEBVERSION-$ARCH.tar.bz2 -C $PKG/opt +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +mkchroot . +addchroot . python sed util-linux +chroot . <<//// +mount -t proc proc proc +opt/SageMath/sage < /dev/null # Run sage patch system +umount proc +exit +//// + +# Remove mkchroot leftovers +rm -rf Tools bin dev etc lib64 proc root sbin usr +# and other junk +rm -rf $PKG/opt/SageMath/.git + +install -D -m0755 $CWD/profile.d/sage.sh $PKG/etc/profile.d +install -D -m0755 $CWD/profile.d/sage.csh $PKG/etc/profile.d + +mkdir -p $PKG/usr/share/texmf/tex/latex +ln -sf /opt/SageMath/local/share/texmf/tex/latex/sagetex $PKG/usr/share/texmf/tex/latex + +mkdir -p $PKG/usr/share/applications +for d in $PKG/opt/SageMath/local/share/applications/*.desktop ; do + ln -sf /opt/SageMath/local/share/applications/$(basename $d) $PKG/usr/share/applications +done + +for res in 16x16 32x32 64x64 128x128 ; do + mkdir -p $PKG/usr/share/icons/hicolor/$res/{apps,mimetypes} + ln -sf /opt/SageMath/local/share/icons/hicolor/$res/xcas.png \ + $PKG/usr/share/icons/hicolor/$res/apps + ln -sf /opt/SageMath/local/share/icons/hicolor/$res/application-x-xcas.png \ + $PKG/usr/share/icons/hicolor/$res/mimetypes +done + +find $PKG/opt/SageMath/local/share/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/opt/SageMath/local/share/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a opt/SageMath/*.{md,txt} $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/academic/sage-bin/sage-bin.info b/academic/sage-bin/sage-bin.info new file mode 100644 index 0000000000..eddc8fbee5 --- /dev/null +++ b/academic/sage-bin/sage-bin.info @@ -0,0 +1,10 @@ +PRGNAM="sage-bin" +VERSION="8.3" +HOMEPAGE="http://www.sagemath.org" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="http://mirrors.mit.edu/sage/linux/64bit/sage-8.3-Debian_GNU_Linux_9-x86_64.tar.bz2" +MD5SUM_x86_64="a97ff237de39d74faedc06b9f4e1fbcc" +REQUIRES="mkchroot" +MAINTAINER="Duncan Roe" +EMAIL="duncan_roe@optusnet.com.au" diff --git a/academic/sage-bin/slack-desc b/academic/sage-bin/slack-desc new file mode 100644 index 0000000000..88491c11d0 --- /dev/null +++ b/academic/sage-bin/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +sage-bin: sage-bin (python based mathematics software) +sage-bin: +sage-bin: Sage is a free open-source mathematics software system licensed under +sage-bin: the GPL. It combines the power of many existing open-source packages +sage-bin: into a common Python-based interface. +sage-bin: Mission: Creating a viable free open source alternative to Magma, +sage-bin: Maple, Mathematica and Matlab. +sage-bin: +sage-bin: Home: http://www.sagemath.org +sage-bin: +sage-bin: |