diff options
Diffstat (limited to 'community/sage-mathematics/PKGBUILD')
-rw-r--r-- | community/sage-mathematics/PKGBUILD | 68 |
1 files changed, 22 insertions, 46 deletions
diff --git a/community/sage-mathematics/PKGBUILD b/community/sage-mathematics/PKGBUILD index 1a6718f5c..1ec59806e 100644 --- a/community/sage-mathematics/PKGBUILD +++ b/community/sage-mathematics/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 102937 2013-12-24 15:23:39Z arcanis $ +# $Id: PKGBUILD 105532 2014-02-09 18:40:24Z arcanis $ # Maintainer: Evgeniy Alekseev <arcanis.arch at gmail dot com> # Contributor: Daniel Wallace <danielwallace at gtmanfred dot com> # Contributor: Antonio Rojas <nqn1976 at gmail dot com> @@ -8,39 +8,36 @@ # Special thanks to Nareto for moving the compile from the .install to the PKGBUILD pkgname=sage-mathematics -pkgver=6.0 -pkgrel=2 -pkgdesc="SAGE: Open Source Mathematics Software, a viable free alternative to Magma, Maple, Mathematica, and Matlab" +pkgver=6.1.1 +pkgrel=1 +pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab" arch=('i686' 'x86_64') url="http://www.sagemath.org" license=('GPL') #depends=('desktop-file-utils' 'java-environment=7' 'libjpeg-turbo' 'libtiff' 'libxmu' 'sqlite' 'xz') depends=('freetype2>=2.3.5') -makedepends=('gcc-fortran' 'gendesk' 'desktop-file-utils') +makedepends=('desktop-file-utils' 'gcc-fortran' 'gendesk') 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' 'cairo: R plots') source=("http://sage.math.washington.edu/home/release/sage-${pkgver}/sage-${pkgver}.tar" - "fix-pil.patch" "sage.service") install="${pkgname}.install" -md5sums=('da1bacf90fc291e736aaa71431e8874e' - 'de54cb818d74c070a524fc3fd5208b2c' +md5sums=('800c59f7cfa32c012f358ae240cdb2e6' '985da1c1d1dcdc3ea9aa73035cb7996b') prepare() { # create *.desktop file - gendesk -n \ + gendesk -f -n \ --pkgname="sage-notebook" \ - --pkgdesc="sage notebook" \ - --name="sage" \ + --pkgdesc="Sage notebook" \ + --name="Sage" \ --exec="/opt/sage/sage -notebook" \ --terminal=true \ --categories="Science;Math" \ - --custom="StartupNotify=true -X-DCOP-ServiceType= + --custom="X-DCOP-ServiceType= X-KDE-SubstituteUID=false X-KDE-Username=" @@ -51,22 +48,6 @@ X-KDE-Username=" mkdir "${srcdir}/build" # according to FS#34769 - # NOTE: there is an error in pil build (freetype/fterrors.h not found) - cd "${srcdir}/sage-${pkgver}/upstream/" - tar xjfv pil-1.1.6.tar.bz2 - rm -r pil-1.1.6.tar.bz2 - patch -p0 -i "${srcdir}/fix-pil.patch" - tar cjvf pil-1.1.6.tar.bz2 pil-1.1.6 - rm -rf pil-1.1.6 - # fix checksums - SUMS=$(md5sum pil-1.1.6.tar.bz2 | awk '{print $1}') - sed "s/md5=[0-9a-f]\{32\}/md5=${SUMS}/" -i "${srcdir}/sage-${pkgver}/build/pkgs/pil/checksums.ini" - SUMS=$(sha1sum pil-1.1.6.tar.bz2 | awk '{print $1}') - sed "s/sha1=[0-9a-f]\{40\}/sha1=${SUMS}/" -i "${srcdir}/sage-${pkgver}/build/pkgs/pil/checksums.ini" - SUMS=$(cksum pil-1.1.6.tar.bz2 | awk '{print $1}') - sed "s/cksum=[0-9a-f]\{10\}/cksum=${SUMS}/" -i "${srcdir}/sage-${pkgver}/build/pkgs/pil/checksums.ini" - # disable freetype build - rm -rf freetype-* sed -i -e 's/FREETYPE/#FREETYPE/' "${srcdir}/sage-${pkgver}/build/install" } @@ -100,7 +81,6 @@ build() { # only build sage, no documents #make build make - ./sage --bdist "${pkgver}" } << COMMENT @@ -115,27 +95,23 @@ check() { COMMENT package() { - cd "sage-${pkgver}" + cd "${srcdir}/sage-${pkgver}/" + # remove build logs + rm -f *.log + rm -rf "${srcdir}/sage-${pkgver}/"{logs,upstream} + # do NOT remove build directory! # cp because make install is experimental and will corrupt the install - install -d "${pkgdir}/opt/sage" - cp -dpr --no-preserve=ownership dist/sage-"${pkgver}-$CARCH-Linux/"* "${pkgdir}/opt/sage/" + install -dm755 "${pkgdir}/opt/sage" + cp -r * "${pkgdir}/opt/sage/" # move SageTeX files to more appropriate directory - install -d "${pkgdir}/usr/share" + install -dm755 "${pkgdir}/usr/share" mv "${pkgdir}/opt/sage/local/share/texmf" "${pkgdir}/usr/share" - # remove build logs - rm -f "${pkgdir}/opt/sage/*.log" - rm -rf "${pkgdir}/opt/sage/spkg/logs" - - # 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" - # according to FS#37090 # install scripts - install -d "${pkgdir}/usr/bin" + install -dm755 "${pkgdir}/usr/bin" ./sage -c "install_scripts('${pkgdir}/usr/bin', ignore_existing=True)" # rename scripts to avoid conflicts for ITEM in $(ls "${pkgdir}/usr/bin"); do @@ -147,9 +123,9 @@ package() { install -Dm644 "${srcdir}/sage.service" "${pkgdir}/usr/lib/systemd/user/sage.service" # install *.desktop and icon files install -Dm644 "${srcdir}/sage-notebook.desktop" \ - "${pkgdir}/usr/share/applications/SAGE-notebook.desktop" - install -Dm644 "${pkgdir}/opt/sage/local/lib/python2.7/site-packages/sagenb-0.10.7.2-py2.7.egg/sagenb/data/sage/images/icon128x128.png" \ - "${pkgdir}/usr/share/pixmaps/SAGE-notebook.png" + "${pkgdir}/usr/share/applications/sage-notebook.desktop" + install -Dm644 "${pkgdir}/opt/sage/local/lib/python2.7/site-packages/sagenb-0.10.8.2-py2.7.egg/sagenb/data/sage/images/icon48x48.png" \ + "${pkgdir}/usr/share/pixmaps/sage-notebook.png" } # vim :set ts=2 sw=2 et: |