2021-12-25 12:59:53 -05:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
prepare_environ()
|
|
|
|
{
|
|
|
|
tar xf download
|
|
|
|
mv maxima-5.45.1/* ./
|
|
|
|
rm download
|
|
|
|
rm -r maxima-5.45.1
|
|
|
|
}
|
|
|
|
|
|
|
|
make_universe()
|
|
|
|
{
|
|
|
|
ORIG_DIR=$(pwd)
|
|
|
|
|
|
|
|
sbcl --disable-debugger << '(EOF)'
|
|
|
|
(load "configure.lisp")
|
|
|
|
(configure :interactive nil)
|
|
|
|
(quit)
|
|
|
|
(EOF)
|
|
|
|
|
|
|
|
cd src/
|
|
|
|
|
|
|
|
sbcl --disable-debugger << '(EOF)'
|
|
|
|
(load "maxima-build.lisp")
|
|
|
|
(maxima-compile)
|
|
|
|
(quit)
|
|
|
|
(EOF)
|
|
|
|
|
|
|
|
sbcl --disable-debugger << '(EOF)'
|
|
|
|
(load "maxima-build.lisp")
|
|
|
|
(maxima-load)
|
|
|
|
(maxima-dump)
|
|
|
|
(EOF)
|
|
|
|
|
|
|
|
cd $ORIG_DIR
|
|
|
|
}
|
|
|
|
|
2022-02-03 14:32:07 -05:00
|
|
|
emacs_check()
|
|
|
|
{
|
|
|
|
if [ -x /bin/emacs ]
|
|
|
|
then
|
|
|
|
printf 'Emacs discovered, installing Maxima interface to site-lisp.\n'
|
|
|
|
for i in $(find . -regex '.*\.el$')
|
|
|
|
do
|
|
|
|
install -Dm644 "${i}" "$1/usr/share/emacs/site-lisp/"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
emacs_check "${@}"
|
|
|
|
|
2021-12-25 12:59:53 -05:00
|
|
|
cd 5.45.1
|
|
|
|
make_universe
|
|
|
|
cd ..
|
|
|
|
mkdir -p "$1/usr/lib/maxima/" "$1/usr/bin/"
|
|
|
|
mv 5.45.1 "$1/usr/lib/maxima/"
|
|
|
|
install -Dm755 maxima-mid "$1/usr/bin/maxima"
|
|
|
|
|
|
|
|
chmod 0755 "$1/usr/lib/maxima/5.45.1/src/maxima"
|