updated on Mon Jan 23 00:00:36 UTC 2012
[aur-mirror.git] / slepc / PKGBUILD
blob5d04b6404858f9d04929119e98abb9dd8d19d3e9
1 # Maintainer: Myles English <myles at rockhead dot biz>
2 pkgname=slepc
3 pkgver=3.1_p6
4 _config=linux-gnu-cxx-debug
5 pkgrel=2
6 pkgdesc="Scalable library for Eigenvalue problem computations"
7 arch=('any')
8 url="http://www.grycap.upv.es/slepc"
9 license=('GNUv3')
10 depends=('python2' 'gcc' 'petsc')
11 install=slepc.install
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}
17 build() {
18     cd ${_build_dir}
20     unset PETSC_ARCH
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'
25     exit 1
26     fi
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
33     make
37 package() {
38     cd ${_build_dir}
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}"
44     make install
46     export SLEPC_DIR=${_install_dir}
47     unset PETSC_ARCH
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