summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD40
1 files changed, 13 insertions, 27 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a98718f98635..0853407aadd9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,12 +3,8 @@
# Contributor: Myles English <myles at rockhead dot biz>
# Contributor: Lucas H. Gabrielli <heitzmann at gmail dot com>
pkgver=3.21.0
-pkgrel=1
+pkgrel=2
pkgname=petsc
-_config=linux-c-opt
-# if --with-debugging=yes is set then PETSC_ARCH is automatically set to
-#"linux-c-debug" for some things, so the _config should be changed too
-#_config=linux-c-debug
pkgdesc="Portable, extensible toolkit for scientific computation"
arch=('i686' 'x86_64')
url="https://petsc.org"
@@ -19,7 +15,7 @@ depends=('openmpi' 'lapack' 'hdf5-openmpi' 'fftw-openmpi' 'superlu' 'suitesparse
'python-numpy' 'python-mpi4py')
makedepends=('gcc' 'gcc-fortran' 'cmake' 'cython')
provides=('petsc4py')
-optdepends=('trilinos: support for trilinos'
+optdepends=(
'hypre: support for HYPRE'
'kokkos: support Kokkos'
'metis: support for METIS'
@@ -39,16 +35,13 @@ source=(http://web.cels.anl.gov/projects/petsc/download/release-snapshots/${pkgn
sha512sums=('3a72f2b82c4509b047c9fbb924b89da0d90859688d2ebbb00e4c48bcad36f362305b1970aecd366a81e961a574e8439800dd62a1df3606c9c1f8485f7a187027'
'aef377e84e6bf5aea114f97b1bac8301203e3a6e736cacb49f01a2e95a29022062fc0d9e85fe8ba1ae9bdc1ffa6c007a031327c185e4966d3393adf038fc0993')
-_install_dir=/opt/petsc/${_config}
-_petsc_arch=arch-${_config}
-
+PETSC_ARCH=linux-c-opt
+_install_dir=/opt/petsc/${PETSC_ARCH}
build() {
- _build_dir=${srcdir}/${pkgname}-${pkgver}
- cd ${_build_dir}
-
- export PETSC_ARCH=${_petsc_arch}
- export PETSC_DIR=${_build_dir}
+ cd ${pkgname}-${pkgver}
+ export PETSC_DIR=${PWD}
+ export PETSC_ARCH=${PETSC_ARCH}
CONFOPTS="--with-shared-libraries=1 \
--with-petsc4py=1 \
@@ -84,23 +77,16 @@ build() {
"MAKEFLAGS=$MAKEFLAGS"
make all
- make DESTDIR=${srcdir}/tmp install
-}
-
-check() {
- cd ${srcdir}/${pkgname}-${pkgver}
- PYTHONPATH=${srcdir}/tmp/${_install_dir}/lib:${PYTHONPATH} make check
}
package() {
- _build_dir=${srcdir}/${pkgname}-${pkgver}
-
+ cd ${pkgname}-${pkgver}
+ export PETSC_DIR=${PWD}
+ export PETSC_ARCH=${PETSC_ARCH}
- mkdir -p ${pkgdir}/${_install_dir}
- cp -Hr ${srcdir}/tmp/* ${pkgdir}
+ make DESTDIR=${pkgdir} install
- # install licence (even though there is no such word as licenses)
- install -Dm 644 ${_build_dir}/LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
+ install -Dm 644 LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
mkdir -p ${pkgdir}/etc/profile.d
echo export PETSC_DIR=${_install_dir} > ${pkgdir}/etc/profile.d/petsc.sh
@@ -112,5 +98,5 @@ package() {
echo ${_install_dir}/lib > ${pkgdir}/etc/ld.so.conf.d/petsc.conf
# install pkgconfig settings
- install -Dm 644 ${_build_dir}/${_petsc_arch}/lib/pkgconfig/PETSc.pc ${pkgdir}/usr/share/pkgconfig/PETSc.pc
+ install -Dm 644 ${PETSC_ARCH}/lib/pkgconfig/PETSc.pc ${pkgdir}/usr/share/pkgconfig/PETSc.pc
}