summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 491922f79ffb9af153bad08ef237f9b24ad8a607 (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
59
60
61
62
63
# Maintainer: Dominik Kummer <admin@arkades.org>

pkgname=opennn-git
_pkgname=OpenNN
pkgver=26.0.1.r0.g828dd67d8
pkgrel=3
pkgdesc="OpenNN neural network library with attention and deep learning support (Git Version)"
arch=('x86_64')
url="https://www.opennn.net/"
license=('AGPL-3.0-only')
provides=('opennn')
conflicts=('opennn')
depends=(
    'gcc-libs'
    'libgomp'
    'eigen'
)
makedepends=(
    'git'
    'cmake'
    'ninja'
    'tinyxml2'
    'python'
    'python-pandas'
)
optdepends=(
    'cuda: CUDA acceleration support'
    'cudnn: cuDNN acceleration support'
)

source=(
    "$pkgname::git+https://github.com/Artelnics/opennn.git"
)

sha256sums=('SKIP')

pkgver() {
    cd "$pkgname"
    git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cmake -S "$pkgname" -B "$pkgname/build" \
        -G Ninja \
        -DCMAKE_BUILD_TYPE=Debug \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DOpenNN_BUILD_SHARED=ON \
        -DOpenNN_BUILD_TESTS=OFF # temporarly OFF

    cmake --build "$pkgname/build"
}

# temporarly OFF as master branch tests fail
# check() {
#     ctest --test-dir "$pkgname/build" --output-on-failure
# }

package() {
    DESTDIR="${pkgdir}" cmake --install $pkgname/build
    install -Dm644 \
        $pkgname/LICENSE.txt \
        "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}