From 0520c5091743d9910278e53fa32470b096825fb3 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 24 May 2013 00:06:06 -0700 Subject: Fri May 24 00:06:06 PDT 2013 --- community/sage-mathematics/PKGBUILD | 32 +++++++++++++--------- .../sage-mathematics/sage-mathematics.install | 2 ++ community/sage-mathematics/sage.service | 8 ++++++ 3 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 community/sage-mathematics/sage.service (limited to 'community/sage-mathematics') diff --git a/community/sage-mathematics/PKGBUILD b/community/sage-mathematics/PKGBUILD index 27c573cb0..57d6934a8 100644 --- a/community/sage-mathematics/PKGBUILD +++ b/community/sage-mathematics/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 87136 2013-03-27 19:52:53Z dwallace $ +# $Id: PKGBUILD 91566 2013-05-23 21:46:56Z dwallace $ # Maintainer: Daniel Wallace # Contributor: Antonio Rojas < nqn1976 @ gmail.com > # Contributor: Thomas Dziedzic < gostrc at gmail > @@ -7,7 +7,7 @@ # Special thanks to Nareto for moving the compile from the .install to the PKGBUILD pkgname=sage-mathematics -pkgver=5.8 +pkgver=5.9 pkgrel=1 pkgdesc='SAGE: Open Source Mathematics Software, a viable free alternative to Magma, Maple, Mathematica, and Matlab.' url='http://www.sagemath.org' @@ -15,17 +15,16 @@ arch=('i686' 'x86_64') license=('GPL') #depends=('xz' 'java-environment=7' 'desktop-file-utils' 'libxmu' 'libtiff' 'sqlite' 'libjpeg-turbo') depends=('desktop-file-utils') -makedepends=('gcc-fortran' ) +makedepends=('gcc-fortran' 'freetype2') optdepends=('imagemagick: some plotting functionality benefits from it' 'texlive-core: some plotting functionality benefits from it, also to use SageTeX' 'openssh: to use the notebook in secure mode' - 'ffmpeg: to show animations') -options=('!makeflags') + 'ffmpeg: to show animations' + 'cairo: R plots') install="${pkgname}.install" source=("http://sage.math.washington.edu/home/release/sage-${pkgver}/sage-${pkgver}.tar" - 'SAGE-notebook.desktop') -md5sums=('fc5b401174ee1efa7aea163e804c2b42' - 'b82f94383829eee26648feb977e2d89b') + 'SAGE-notebook.desktop' + 'sage.service') build() { cd sage-${pkgver} @@ -38,8 +37,7 @@ build() { unset LDFLAGS # enable multiple threads while building, is this really needed? check if uses MAKEFLAGS - export SAGE_BUILD_THREADS=$(lscpu | awk '/^CPU\(s\):/ { print $2 }') - export MAKE="make -j${SAGE_BUILD_THREADS}" + export MAKE="make -j$(nproc)" # use archlinux's fortran rather then the one that ships with sage to compile sage's fortran export FC=/usr/bin/gfortran @@ -52,7 +50,11 @@ build() { export SAGE_FAT_BINARY='yes' # can't write to root in a clean chroot - export DOT_SAGE='/build/src/' + mkdir "$srcdir/buiild" + export DOT_SAGE="$srcdir/build" + + # Singular is broken + export CPP='/usr/bin/cpp' # only build sage, no documents #make build @@ -95,8 +97,12 @@ package() { # remove source packages, since they are rarely needed, they are 300mb in size (compressed) rm -f ${pkgdir}/opt/sage/spkg/base/*spkg rm -f ${pkgdir}/opt/sage/spkg/standard/*spkg + + # install a systemd user unit + install -Dm755 $srcdir/sage.service $pkgdir/usr/lib/systemd/user/sage.service } # vim :set ts=2 sw=2 et: -md5sums=('b91d6c20798f396a9c875527c78b3587' - 'b82f94383829eee26648feb977e2d89b') +md5sums=('708520904f2d42039c714ac72a631948' + 'b82f94383829eee26648feb977e2d89b' + '985da1c1d1dcdc3ea9aa73035cb7996b') diff --git a/community/sage-mathematics/sage-mathematics.install b/community/sage-mathematics/sage-mathematics.install index ab5dae235..3da751689 100644 --- a/community/sage-mathematics/sage-mathematics.install +++ b/community/sage-mathematics/sage-mathematics.install @@ -41,6 +41,8 @@ echo ' post_upgrade() { post_install $1 + echo "There is now a user session unit included to run a sage notebook as your user." + echo "The wiki includes a guide on starting systemd user sessions" } post_remove() { diff --git a/community/sage-mathematics/sage.service b/community/sage-mathematics/sage.service new file mode 100644 index 000000000..d999414de --- /dev/null +++ b/community/sage-mathematics/sage.service @@ -0,0 +1,8 @@ +[Unit] +Description=A free open-source mathematics software system + +[Service] +ExecStart=/opt/sage/sage -n + +[Install] +WantedBy=default.target -- cgit v1.2.3-54-g00ecf