blob: 5ffe28cd2c77574bbc57bbfb3d95277b6b2d7023 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# Maintainer: Anton Kudelin <kudelin at protonmail dot com>
pkgname=sirius
_PkgName=SIRIUS
pkgver=6.5.7
pkgrel=1
pkgdesc="Domain specific library for electronic structure calculations"
arch=('x86_64')
license=('BSD')
url="https://github.com/electronic-structure/SIRIUS"
depends=('libvdwxc' 'libxc' 'spglib' 'elpa' 'spfft' 'gsl' 'hdf5')
makedepends=('cmake')
optdepends=('magma: Linear algebra on GPU')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('d886c3066163c43666ebac2ea50351df03907b5686671e514a75f131ba51b43c')
options=(!emptydirs)
prepare() {
mkdir "$srcdir/build"
# Checking if nvcc is in PATH
if [[ $( echo -n $( which nvcc) | tail -c 4 ) == nvcc ]]
then
export _ACC=ON
export LDFLAGS="$LDFLAGS -L/opt/cuda/lib64"
echo "GPU is enabled"
else
export _ACC=OFF
echo "GPU is disabled"
fi
# Finding ELPA version
_ELPAVER=$( ls /usr/include | grep elpa | sed 's/elpa_openmp-//g' )
}
build() {
cd "$srcdir/build"
cmake ../$_PkgName-$pkgver \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCREATE_FORTRAN_BINDINGS=ON \
-DUSE_OPENMP=ON \
-DUSE_SCALAPACK=ON \
-DUSE_CUDA=$_ACC \
-DUSE_MAGMA=$_ACC \
-DUSE_VDWXC=ON \
-DUSE_ELPA=ON \
-DELPA_INCLUDE_DIR=/usr/include/elpa_openmp-$_ELPAVER
make
}
package() {
cd "$srcdir/build"
install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
install ../$_PkgName-$pkgver/LICENSE "$pkgdir/usr/share/licenses/$pkgname"
make DESTDIR="$pkgdir" install
install -m755 src/mod_files/*.mod "$pkgdir/usr/include/sirius"
mv "$pkgdir/usr/bin/atom" "$pkgdir/usr/bin/sirius_atom"
}
|