summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c4b87b055d6a2832f902ef99fd5ae7054953edce (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
# Maintainer: Christoph Haag <christoph.haag@collabora.com>

_pkgname=onnxruntime
pkgname=onnxruntime-git
pkgver=0
pkgrel=1
pkgdesc="cross-platform inference and training machine-learning accelerator."
arch=('x86_64')
url="https://onnxruntime.ai/"
license=('MIT')
depends=('gcc-libs')
makedepends=('git' 'cmake' 'ninja')
checkdepends=()
optdepends=()
provides=('onnxruntime')
conflicts=('onnxruntime')
replaces=()
options=()
# install=
# changelog=
source=("git+https://github.com/microsoft/onnxruntime.git")
md5sums=('SKIP')

prepare() {
	cd "$_pkgname"
	git submodule update --init --recursive
}

build() {
	cd "$_pkgname"
	# ./build.sh --config RelWithDebInfo --build_shared_lib --parallel

	#export PKG_CONFIG_PATH=/usr/lib/pkgconfig
	# rm -rf $srcdir/$_pkgname-build
	cmake -S $srcdir/$_pkgname/cmake \
		-B $srcdir/$_pkgname-build \
		-G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr/ \
		-DCMAKE_PREFIX_PATH=/usr/ \
		-DCMAKE_BUILD_TYPE=Release \
		-Donnxruntime_BUILD_SHARED_LIB=ON \
		-DONNX_USE_PROTOBUF_SHARED_LIBS=ON \
		.
	ninja -C $srcdir/$_pkgname-build
}

check() {
	cd "$_pkgname"
	#make -k check
}

package() {
	cd "$srcdir"/$_pkgname
	DESTDIR="$pkgdir/" ninja -C "$srcdir"/$_pkgname-build install
}