diff options
Diffstat (limited to 'academic/sage-bin/sage-bin.SlackBuild')
-rw-r--r-- | academic/sage-bin/sage-bin.SlackBuild | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/academic/sage-bin/sage-bin.SlackBuild b/academic/sage-bin/sage-bin.SlackBuild index a81b408c5eb23..2ff263c6dd13d 100644 --- a/academic/sage-bin/sage-bin.SlackBuild +++ b/academic/sage-bin/sage-bin.SlackBuild @@ -25,11 +25,13 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=sage-bin -VERSION=${VERSION:-8.3} -DEBVERSION=${DEBVERSION:-9} +VERSION=${VERSION:-9.4} +DEBVERSION=${DEBVERSION:-11} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} +SLK_VERSION=${SLK_VERSION:-$(cat /etc/slackware-version|cut -d' ' -f2)} +[ $SLK_VERSION = 14.2 ] && PYTHON=python || PYTHON=python2 if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -63,6 +65,8 @@ 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 +[ ! -r $CWD/$VERSION.patch ] || patch -p0 < $CWD/$VERSION.patch +[ ! -r $CWD/${VERSION}_sh ] || . $CWD/${VERSION}_sh chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -71,8 +75,9 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; mkchroot . -addchroot . python sed util-linux +addchroot . $PYTHON sed util-linux chroot . <<//// +export SAGE_BANNER=bare mount -t proc proc proc opt/SageMath/sage < /dev/null # Run sage patch system umount proc @@ -84,6 +89,7 @@ rm -rf Tools bin dev etc lib64 proc root sbin usr # and other junk rm -rf $PKG/opt/SageMath/.git +mkdir -p $PKG/etc/profile.d install -D -m0755 $CWD/profile.d/sage.sh $PKG/etc/profile.d install -D -m0755 $CWD/profile.d/sage.csh $PKG/etc/profile.d @@ -103,8 +109,9 @@ for res in 16x16 32x32 64x64 128x128 ; do $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 +# Some man pages and their symlinks are already gzipped +find $PKG/opt/SageMath/local/share/man -type f ! -name '*.gz' -exec gzip -9 {} \; +for i in $( find $PKG/opt/SageMath/local/share/man -type l ! -name '*.gz' ) ; 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 |