diff options
Diffstat (limited to 'community-staging/root/PKGBUILD')
-rw-r--r-- | community-staging/root/PKGBUILD | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/community-staging/root/PKGBUILD b/community-staging/root/PKGBUILD new file mode 100644 index 000000000..d277db4ec --- /dev/null +++ b/community-staging/root/PKGBUILD @@ -0,0 +1,102 @@ +# Maintainer: Thomas Dziedzic < gostrc at gmail > +# Contributor: Sebastian Voecking <voeck@web.de> + +pkgname=root +pkgver=5.32.00 +pkgrel=3 +pkgdesc='C++ data analysis framework and interpreter from CERN.' +arch=('i686' 'x86_64') +url='http://root.cern.ch' +license=('LGPL2.1') +depends=('avahi' 'desktop-file-utils' 'ftgl' 'giflib' 'glew' 'graphviz' 'gsl' 'libldap' 'libmysqlclient' + 'libxft' 'postgresql-libs' 'python2' 'unixodbc' 'shared-mime-info' 'xmlrpc-c' 'xorg-fonts-75dpi' 'mesa' 'gcc-fortran' 'hicolor-icon-theme') +makedepends=('fftw') +install='root.install' +options=('!emptydirs') +source=("ftp://root.cern.ch/root/root_v${pkgver}.source.tar.gz" + 'root.sh' + 'rootd' + 'root.xml' + 'fix-mathcore-generation-r42566.diff') +md5sums=('1c30e4e6eeae62ff1ad5118cd1309679' + '0e883ad44f99da9bc7c23bc102800b62' + 'efd06bfa230cc2194b38e0c8939e72af' + 'e2cf69b204192b5889ceb5b4dedc66f7' + '12877cabd620284f50ea16ef97a54aac') + +build() { + cd root + + # temporary workaround: remove on next patch release after 5.32.00 + # bug reported at: https://savannah.cern.ch/bugs/?90906 + patch -Np0 -i ${srcdir}/fix-mathcore-generation-r42566.diff + + if [ ${CARCH} == 'i686' ]; then + TARGET=linux; + else + TARGET=linuxx8664gcc; + fi + + msg 'python2 switch' + find . -type f -exec sed -e 's_#!/usr/bin/env python_&2_' \ + -e 's/python -O/python2 -O/g' \ + -e 's/python -c/python2 -c/g' -i {} \; + sed \ + -e 's/python 2/python2 2/g' \ + -i configure + sed \ + -e 's/python $(pkgpyexecdir)/python2 $(pkgpyexecdir)/g' \ + -i cint/reflex/python/genreflex/Makefile.am + sed \ + -e 's/python /python2 /' \ + -i config/genreflex.in config/genreflex-rootcint.in + + local sys_libs="" + for sys_lib in ftgl freetype glew pcre zlib lzma; do + sys_libs+="--disable-builtin-${sys_lib} " + done + # move from aur if possible + #--disable-builtin-afterimage \ + + ./configure \ + ${TARGET} \ + --prefix=/usr \ + --enable-gdml \ + --enable-gsl-shared \ + --enable-minuit2 \ + --enable-soversion \ + --enable-roofit \ + --enable-python \ + --with-python-incdir=/usr/include/python2.7 \ + --with-python-libdir=/usr/lib \ + ${sys_libs} + + make +} + +package() { + cd root + + make DESTDIR=${pkgdir} install + + install -D ${srcdir}/root.sh \ + ${pkgdir}/etc/profile.d/root.sh + install -D ${srcdir}/rootd \ + ${pkgdir}/etc/rc.d/rootd + install -D -m644 ${srcdir}/root.xml \ + ${pkgdir}/usr/share/mime/packages/root.xml + + install -D -m644 ${srcdir}/root/build/package/debian/root-system-bin.desktop.in \ + ${pkgdir}/usr/share/applications/root-system-bin.desktop + # replace @prefix@ with /usr for the desktop + sed -e 's_@prefix@_/usr_' -i ${pkgdir}/usr/share/applications/root-system-bin.desktop + + install -D -m644 ${srcdir}/root/build/package/debian/root-system-bin.png \ + ${pkgdir}/usr/share/icons/hicolor/48x48/apps/root-system-bin.png + + # use a file that pacman can track instead of adding directly to ld.so.conf + install -d ${pkgdir}/etc/ld.so.conf.d + echo '/usr/lib/root' > ${pkgdir}/etc/ld.so.conf.d/root.conf + + rm -rf ${pkgdir}/etc/root/daemons +} |