summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Kudelin2021-05-02 16:21:11 +0300
committerAnton Kudelin2021-05-02 16:21:11 +0300
commit2c1068347113bbce51642506b7a4b9d7a0fbbb74 (patch)
tree76c55c48ebcd77791e88dd3719dc4c5343df428e
downloadaur-2c1068347113bbce51642506b7a4b9d7a0fbbb74.tar.gz
Initial import
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD45
2 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..62166e6521b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = spla
+ pkgdesc = Specialized Parallel Linear Algebra
+ pkgver = 1.4.0
+ pkgrel = 1
+ url = https://github.com/eth-cscs/spla
+ arch = x86_64
+ license = BSD
+ makedepends = cmake
+ makedepends = gcc-fortran
+ depends = openmpi
+ depends = cblas
+ optdepends = cuda: GPU Backend
+ source = spla-1.4.0.tar.gz::https://github.com/eth-cscs/spla/archive/refs/tags/v1.4.0.tar.gz
+ sha256sums = 364a9fe759fddec8a0839cf79f1cf0619fc36f4d4c15f1c2b1f437249d7840c6
+
+pkgname = spla
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..72846e48625
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Anton Kudelin <kudelin at protonmail dot com>
+
+pkgname=spla
+pkgver=1.4.0
+pkgrel=1
+pkgdesc="Specialized Parallel Linear Algebra"
+arch=("x86_64")
+url="https://github.com/eth-cscs/spla"
+license=('BSD')
+depends=('openmpi' 'cblas')
+makedepends=('cmake' 'gcc-fortran')
+optdepends=('cuda: GPU Backend')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
+sha256sums=('364a9fe759fddec8a0839cf79f1cf0619fc36f4d4c15f1c2b1f437249d7840c6')
+
+prepare() {
+ # Checking if nvcc is in PATH
+ if [[ $( echo -n $( which nvcc) | tail -c 4 ) == nvcc ]]
+ then
+ export _ACC=CUDA
+ export LDFLAGS="$LDFLAGS -L/opt/cuda/lib64"
+ echo "GPU is enabled"
+ else
+ export _ACC=OFF
+ echo "GPU is disabled"
+ fi
+}
+
+build() {
+ mkdir "$srcdir/build"
+ cd "$srcdir/build"
+ cmake ../"$pkgname-$pkgver" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DSPLA_FORTRAN=ON \
+ -DSPLA_HOST_BLAS=GENERIC \
+ -DSPLA_GPU_BACKEND=$_ACC
+ make
+}
+
+package() {
+ cd "$srcdir/build"
+ make DESTDIR="$pkgdir" install
+ install -Dm755 ../$pkgname-$pkgver/LICENSE \
+ -t "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}