Ticket #13234: spkg-install

File spkg-install, 665 bytes (added by novoselt, 9 years ago)

For reviewing only

Line 
1#!/usr/bin/env sh
2
3die () {
4    echo "$@" 1>&2
5    exit 1
6}
7
8[ -n "$SAGE_LOCAL" ] || die 'Error: $SAGE_LOCAL not set. Source sage-env or run this script from `sage -sh`.'
9
10cd src
11patch -p1 < ../patches/00-remove-static-option.patch || die "Error: Couldn't apply patch."
12patch -p1 < ../patches/01-adjust-size-of-input-matrix-fix.patch || die "Error: Couldn't apply patch."
13
14export CXXFLAGS="-I$SAGE_LOCAL/include $CXXFLAGS"
15cd source
16$MAKE || die "Error building Normaliz."
17
18cp -pf normaliz "$SAGE_LOCAL/bin/" || die "Error installing Normaliz."
19
20cd ../Singular
21cp -pf normaliz.lib "$SAGE_LOCAL/share/singular/" || die "Error installing normaliz.lib for Singular."
22