summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dfad08ce743ee61d9ea115de1c370189e66c90a8 (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
# Maintainer: Daniel Bermond <dbermond@archlinux.org>

pkgname=cnmatrix
pkgver=0.0
pkgrel=2
pkgdesc='C interface to a few matrix backends'
arch=('x86_64')
url='https://github.com/cntools/cnmatrix/'
license=('MIT')
depends=('cblas' 'lapacke')
makedepends=('cmake' 'eigen')
source=("https://github.com/cntools/cnmatrix/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('c9c43791b258feb25436288b1e219566903d72a158c81480a2185f21b0648426')

build() {
    cmake -B build -S "${pkgname}-${pkgver}" \
        -G 'Unix Makefiles' \
        -DCMAKE_BUILD_TYPE:STRING='None' \
        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
        -DENABLE_TESTS:BOOL='ON' \
        -Wno-dev
    cmake --build build
}

check() {
    ctest --test-dir build --output-on-failure
}

package() {
    DESTDIR="$pkgdir" cmake --install build
    install -D -m644 "${pkgname}-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}