summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 34d37dd0bd28c40e97fecbe1dc3424cc830632b6 (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
# Maintainer: Christoph Stelz <mail[plus]arch[at]ch-st[d0t]de>
pkgname=reproblas
pkgver=2.1.0
pkgrel=1
pkgdesc="Reproducible Basic Linear Algebra Subprograms"
url="https://bebop.cs.berkeley.edu/reproblas/"
arch=('x86_64')
source=("${pkgname}-${pkgver}.tar.gz::https://bebop.cs.berkeley.edu/reproblas/include/download.php?filetype=tar.gz")
sha256sums=('f0c6b219691b3c5a07c442e22ca0485f37454c2e4847a8872ba4e46190d439c2')
depends=('openmpi')
makedepends=('python')
license=('custom')

build() {
    mv "${srcdir}/ReproBLAS-${pkgver}/" "${srcdir}/${pkgname}-${pkgver}/"
    mkdir -p "${srcdir}/${pkgname}-${pkgver}"
    cd "${srcdir}/${pkgname}-${pkgver}"

    sed -i 's/CC = cc/CC = gcc/' config.mk
    sed -i 's/BUILD_MPI = false/BUILD_MPI = true/' config.mk
    echo 'CFLAGS += -fPIC' >> config.mk

    patch -p1 scripts/cogapp/cogapp.py < "../../reproblas-deprecated-imp.patch"
    make update
    make
}

check() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    make check
}

package() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    make BIN_DIR="${pkgdir}/usr/bin" LIB_DIR="${pkgdir}/usr/lib" INC_DIR="${pkgdir}/usr/include" DOC_DIR="${pkgdir}/usr/share/doc/reproblas" install
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    install -Dm644 "../../${pkgname}.pc" "$pkgdir/usr/lib/pkgconfig/${pkgname}.pc"
}