summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD74
1 files changed, 28 insertions, 46 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c53ede29b512..309068f19166 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,62 +1,44 @@
# Maintainer: Anton Kudelin <kudelin at proton dot me>
pkgname=siesta
-pkgver=4.1.5
-pkgrel=2
+pkgver=5.0.0
+pkgrel=1
pkgdesc="A first-principles materials simulation code using DFT"
-arch=("x86_64" "aarch64")
-url="https://departments.icmab.es/leem/siesta"
-license=('GPL')
-depends=('elpa' 'metis' 'fftw' 'python')
-makedepends=('gcc-fortran')
-source=("https://gitlab.com/siesta-project/siesta/-/archive/v$pkgver/$pkgname-v$pkgver.tar.bz2")
-sha256sums=('c83bf9f952b2af8d8d57ab4c6557faeab0c7c9d2c94c1a4ab91cdd4c01cd6de4')
+arch=(x86_64 aarch64)
+url="https://siesta-project.org/siesta/About/overview.html"
+license=(GPL-3.0-only)
+depends=(elpa metis fftw python libxc)
+makedepends=(gcc-fortran ninja)
+source=(https://gitlab.com/siesta-project/siesta/-/archive/$pkgver/$pkgname-$pkgver.tar.bz2)
+sha256sums=('1ae1b6a50e6bad8503799bd55ce41de6851c243aacea48c3816d99ef996e9b0a')
prepare() {
- # Whereas the configure script was removed from the distribution,
- # we have to adjust arch.make to set up building environment.
- cd "$pkgname-v$pkgver/Obj"
- cp DOCUMENTED-TEMPLATE.make arch.make
- sed -i '/CC =/c CC = mpicc' arch.make
- sed -i '/FC =/c FC = mpifort' arch.make
- sed -i \
- '/FFLAGS =/c FFLAGS = -O3 -fPIC -march=native -fopenmp -fallow-argument-mismatch' \
- arch.make
- sed -i 's/unknown/archlinux/g' arch.make
- sed -i 's/COMP_LIBS =/#COMP_LIBS =/' arch.make
- sed -i 's/$(COMP_LIBS)/$(COMP_LIBS) -lgomp/g' arch.make
- export MPI_INTERFACE="libmpi_f90.a"
- export MPI_INCLUDE=.
- export COMP_LIBS="-lelpa_openmp -lmetis -lblas"
- export SCALAPACK_LIBS="-lscalapack"
- export FFTW_ROOT="/usr"
-
- # Fixing libraries
- cd ../Util
- sed -i 's/ make/ make -j1 LDFLAGS="-lgomp"/g' build_all.sh
- sed -i 's/$@/$@ $(LDFLAGS)/g' Optimizer/Makefile
-
# Handling ELPA
_elpaver=$( ls /usr/include | grep elpa | sed 's/elpa_openmp-//g' )
}
build() {
- cd "$pkgname-v$pkgver/Obj"
- ../Src/obj_setup.sh
- make FPPFLAGS="-DMPI -DSIESTA__METIS -DSIESTA__ELPA -I/usr/include/elpa_openmp-$_elpaver/modules"
- cp siestaxc.mod ../Src
+ cd "$srcdir"
+ cmake \
+ -B build \
+ -S $pkgname-$pkgver \
+ -D CMAKE_INSTALL_PREFIX=/usr \
+ -D CMAKE_EXE_LINKER_FLAGS="-lelpa_openmp -lscalapack -lmpi" \
+ -D SIESTA_WITH_ELPA=ON \
+ -D SIESTA_WITH_OPENMP=ON \
+ -D ELPA_INCLUDE_DIRS="/usr/include/elpa_openmp-$_elpaver/elpa;/usr/include/elpa_openmp-$_elpaver/modules" \
+ -D ELPA_LINK_LIBRARIES="-lelpa_openmp" \
+ -G Ninja \
+ -W no-dev
+ cmake --build build
+}
- cd ../Util
- ./build_all.sh
- rm ../Src/siestaxc.mod
+check() {
+ cd "$srcdir/build"
+ ctest
}
package() {
- cd "$pkgname-v$pkgver"
- install -dm755 "$pkgdir/opt/siesta"
- install -dm755 "$pkgdir/usr/bin"
- find ./Util -type f ! -name "*.sh" -executable \
- -exec install -m755 {} "$pkgdir/opt/siesta" ";"
- install -m755 ./Obj/siesta "$pkgdir/opt/siesta"
- ln -sf "$pkgdir/opt/siesta/siesta" "$pkgdir/usr/bin"
+ cd "$srcdir"
+ DESTDIR="$pkgdir" cmake --install build
}