summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorLucas Heitzmann Gabrielli2018-04-18 11:06:14 -0300
committerLucas Heitzmann Gabrielli2018-04-18 11:06:14 -0300
commit4c5fc81902b1a388bca399f3db76cbc144c9bc3e (patch)
tree4cfd48632b508187afb732033404d3fc1ca066ec /PKGBUILD
parentaa60e4c587818eceac1d7f857a4bbc7ca9497913 (diff)
downloadaur-4c5fc81902b1a388bca399f3db76cbc144c9bc3e.tar.gz
Update to 3.9
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD113
1 files changed, 62 insertions, 51 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 02c917f8313..9bfa911837a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,73 +1,84 @@
# Maintainer: Andreas Bilke <abilke at cosy dot sbg dot ac dot at>
# Contributor: Myles English <myles at rockhead dot biz>
+# Contributor: Lucas H. Gabrielli <heitzmann at gmail dot com>
pkgname=slepc
-pkgver=3.8.2
-pkgrel=2
+pkgver=3.9.0
+pkgrel=1
pkgdesc="Scalable library for Eigenvalue problem computations"
arch=('i686' 'x86_64')
url="http://www.grycap.upv.es/slepc"
license=('BSD')
-depends=('python2' 'gcc' 'gcc-fortran' 'petsc>=3.8')
+depends=('python2' 'gcc' 'gcc-fortran' 'petsc>=3.9')
install=slepc.install
source=(http://www.grycap.upv.es/slepc/download/distrib/${pkgname}-${pkgver/_/-}.tar.gz)
-md5sums=('35d04119923ef0daabb9b16e9a910068')
-sha256sums=('1e7d20d20eb26da307d36017461fe4a55f40e947e232739179dbe6412e22ed13')
+sha256sums=('1f3930db56b4065aaf214ea758ddff1a70bf19d45544cbdfd19d2787db4bfe0b')
export MAKEFLAGS="-j1"
+prepare() {
+ # force using python2
+ find ${srcdir} -name "*" -type f -exec \
+ sed -i 's#\(/usr/bin/env \|/usr/bin/\)python[2-3]*#\1python2#' {} \;
+
+}
+
build() {
- # get SLEPC_DIR
- source /etc/profile.d/petsc.sh # gets PETSC_DIR
+ # get SLEPC_DIR
+ source /etc/profile.d/petsc.sh # gets PETSC_DIR
- _build_dir=${srcdir}/${pkgname}-${pkgver/_/-}
- _install_dir=/opt/slepc/`basename ${PETSC_DIR}`
+ _build_dir=${srcdir}/${pkgname}-${pkgver/_/-}
+ _install_dir=/opt/slepc/`basename ${PETSC_DIR}`
- cd ${_build_dir}
+ cd ${_build_dir}
- unset PETSC_ARCH
- export SLEPC_DIR=${_build_dir}
+ unset PETSC_ARCH
+ export SLEPC_DIR=${_build_dir}
- python2 ./configure --prefix=${pkgdir}${_install_dir}
- make
+ python2 ./configure --prefix=${pkgdir}${_install_dir}
+ make
}
package() {
- # get SLEPC_DIR
- source /etc/profile.d/petsc.sh # gets PETSC_DIR
-
- _build_dir=${srcdir}/${pkgname}-${pkgver/_/-}
- _install_dir=/opt/slepc/`basename ${PETSC_DIR}`
-
- cd ${_build_dir}
- export SLEPC_DIR=${_build_dir}
- source /etc/profile.d/petsc.sh # sets PETSC_DIR
-
- make install > /dev/null # redirect in order to suppress confusing messages
-
- export SLEPC_DIR=${_install_dir}
- unset PETSC_ARCH
-
- sed -i 's#'"${pkgdir}"'##g' "${pkgdir}${_install_dir}/include/slepcconf.h"
- sed -i 's#'"${pkgdir}"'##g' "${pkgdir}${_install_dir}/lib/slepc/conf/slepcrules"
- sed -i 's#'"${pkgdir}"'##g' "${pkgdir}${_install_dir}/lib/slepc/conf/slepc_rules"
- sed -i 's#'"${pkgdir}"'##g' "${pkgdir}${_install_dir}/lib/slepc/conf/slepc_variables"
- sed -i 's#'"${pkgdir}"'##g' "${pkgdir}${_install_dir}/lib/slepc/conf/slepcvariables"
- sed -i 's#'"${_build_dir}"'#"${_install_dir}"#g' "${pkgdir}${_install_dir}/lib/slepc/conf/uninstall.py"
- sed -i 's#'"${pkgdir}"'##g' "${pkgdir}${_install_dir}/lib/slepc/conf/uninstall.py"
- sed -i 's#'"${pkgdir}"'##g' "${pkgdir}${_install_dir}/lib/pkgconfig/SLEPc.pc"
- sed -i 's#'"${pkgdir}"'##g' "${pkgdir}${_install_dir}/lib/slepc/conf/modules/${pkgname}/${pkgver}"
- sed -i 's#'"${_build_dir}"'#'"${_install_dir}"'#g' "${pkgdir}${_install_dir}/include/slepcconf.h"
-
- # remove logs containing references to the build dir
- rm -f "${pkgdir}${_install_dir}/lib/slepc/conf/configure.log"
- rm -f "${pkgdir}${_install_dir}/lib/slepc/conf/make.log"
-
- mkdir -p ${pkgdir}/etc/profile.d
- echo "export SLEPC_DIR=${_install_dir}" > ${pkgdir}/etc/profile.d/slepc.sh
- chmod +x ${pkgdir}/etc/profile.d/slepc.sh
-
- # show where the shared libraries are
- install -d -m755 "${pkgdir}"/etc/ld.so.conf.d/
- echo "${_install_dir}/lib" > "${pkgdir}"/etc/ld.so.conf.d/slepc.conf
+ # get SLEPC_DIR
+ source /etc/profile.d/petsc.sh # gets PETSC_DIR
+
+ _build_dir=${srcdir}/${pkgname}-${pkgver/_/-}
+ _install_dir=/opt/slepc/`basename ${PETSC_DIR}`
+ _dest_dir=${pkgdir}${_install_dir}
+
+ cd ${_build_dir}
+ export SLEPC_DIR=${_build_dir}
+ source /etc/profile.d/petsc.sh # sets PETSC_DIR
+
+ make install > /dev/null # redirect in order to suppress confusing messages
+
+ export SLEPC_DIR=${_install_dir}
+ unset PETSC_ARCH
+
+ sed -i "s#${pkgdir}##g" "${_dest_dir}/include/slepcconf.h"
+ sed -i "s#${pkgdir}##g" "${_dest_dir}/lib/pkgconfig/SLEPc.pc"
+ sed -i "s#${pkgdir}##g" "${_dest_dir}/lib/slepc/conf/modules/${pkgname}/${pkgver}"
+ sed -i "s#${pkgdir}##g" "${_dest_dir}/lib/slepc/conf/slepc_rules"
+ sed -i "s#${pkgdir}##g" "${_dest_dir}/lib/slepc/conf/slepc_variables"
+ sed -i "s#${pkgdir}##g" "${_dest_dir}/lib/slepc/conf/slepcrules"
+ sed -i "s#${pkgdir}##g" "${_dest_dir}/lib/slepc/conf/slepcvariables"
+ sed -i "s#${pkgdir}##g" "${_dest_dir}/lib/slepc/conf/uninstall.py"
+ sed -i "s#${_build_dir}#${_install_dir}#g" "${_dest_dir}/lib/slepc/conf/uninstall.py"
+
+ # remove logs containing references to the build dir
+ rm -f "${_dest_dir}/lib/slepc/conf/configure.log"
+ rm -f "${_dest_dir}/lib/slepc/conf/make.log"
+
+ # install licence (even though there is no such word as licenses)
+ mkdir -p ${pkgdir}/usr/share/licenses/$pkgname
+ cp ${_build_dir}/LICENSE ${pkgdir}/usr/share/licenses/$pkgname/
+
+ mkdir -p ${pkgdir}/etc/profile.d
+ echo "export SLEPC_DIR=${_install_dir}" > ${pkgdir}/etc/profile.d/slepc.sh
+ chmod +x ${pkgdir}/etc/profile.d/slepc.sh
+
+ # show where the shared libraries are
+ install -d -m755 "${pkgdir}"/etc/ld.so.conf.d/
+ echo "${_install_dir}/lib" > "${pkgdir}"/etc/ld.so.conf.d/slepc.conf
}