1 # Maintainer: Myles English <myles at rockhead dot biz>
4 _config=linux-gnu-cxx-debug
6 pkgdesc="Scalable library for Eigenvalue problem computations"
8 url="http://www.grycap.upv.es/slepc"
10 depends=('python2' 'gcc' 'petsc')
12 source=(http://www.grycap.upv.es/slepc/download/distrib/${pkgname}-${pkgver/_/-}.tgz)
13 md5sums=('a57f717fa52d3a1fedd98137ca0325a3')
14 _build_dir=${srcdir}/${pkgname}-${pkgver/_/-}
15 _install_dir=/usr/slepc/${_config}
21 export SLEPC_DIR=${_build_dir}
23 if [ $USER != 'root' ];
24 then echo 'this has to be run as root, because it modfies some petsc libs'
28 # and the root's environment doesn't have PETSC_DIR defined (even though it is in /etc/profile.d/petsc.sh)
29 export PETSC_DIR=/usr/petsc/linux-gnu-cxx-debug
31 python2 ./configure --prefix=${pkgdir}${_install_dir}
32 export PETSC_ARCH=installed-petsc
39 export PETSC_ARCH=installed-petsc
40 export SLEPC_DIR=${_build_dir}
41 export PETSC_DIR=/usr/petsc/linux-gnu-cxx-debug
42 #echo "${SLEPC_DIR} ${PETSC_ARCH} ${PETSC_DIR}"
46 export SLEPC_DIR=${_install_dir}
49 #sed -i 's#'"${pkgdir}"'##g' "${pkgdir}${_install_dir}/conf/slepcvariables"
51 mkdir -p ${pkgdir}/etc/profile.d
52 echo "export SLEPC_DIR=${_install_dir}" > ${pkgdir}/etc/profile.d/slepc.sh
53 chmod +x ${pkgdir}/etc/profile.d/slepc.sh
55 # show where the shared libraries are
56 install -d -m755 "${pkgdir}"/etc/ld.so.conf.d/
57 echo "${_install_dir}/lib" > "${pkgdir}"/etc/ld.so.conf.d/slepc.conf