diff options
author | Lennart Braun | 2021-11-09 00:03:48 +0100 |
---|---|---|
committer | Lennart Braun | 2022-02-23 20:24:11 +0100 |
commit | f4f168387ddd96aff5ad2bc62158ae199a660eb2 (patch) | |
tree | 7e13107f6f6a9711a0c491274e34281a9359d91a | |
download | aur-f4f168387ddd96aff5ad2bc62158ae199a660eb2.tar.gz |
add initial package onnx v1.11.0
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 49 |
2 files changed, 65 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..197390560f98 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = onnx + pkgdesc = C++ library for the open standard for machine learning interoperability + pkgver = 1.11.0 + pkgrel = 1 + url = https://onnx.ai + arch = x86_64 + license = MIT + makedepends = cmake + makedepends = git + makedepends = python + depends = glibc + depends = protobuf + source = onnx-1.11.0.tar.gz::https://github.com/onnx/onnx/archive/v1.11.0.tar.gz + b2sums = dfc8ab81d4776f806fa26c751c1eb1e19ea4cf9f0aa498880dc18eca160fdd9c43eda0077124ea7a674082e5ed93de7497411c48c3f9a12146905072e6477af6 + +pkgname = onnx diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b9a330e7adfa --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Lennart Braun <lenerd@posteo.de> +pkgname=onnx +pkgver=1.11.0 +pkgrel=1 +pkgdesc="C++ library for the open standard for machine learning interoperability" +arch=('x86_64') +url="https://onnx.ai" +license=('MIT') +depends=('glibc' 'protobuf') +makedepends=('cmake' 'git' 'python') +source=("$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz") +b2sums=("dfc8ab81d4776f806fa26c751c1eb1e19ea4cf9f0aa498880dc18eca160fdd9c43eda0077124ea7a674082e5ed93de7497411c48c3f9a12146905072e6477af6") + +prepare() { + cd "$pkgname-$pkgver" + # make sure CMake gets the flags + export CPPFLAGS + export CFLAGS + export CXXFLAGS + export LDFLAGS + export MAKEFLAGS + cmake \ + -DCMAKE_BUILD_TYPE='None' \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DONNX_BUILD_TESTS=On \ + -DONNX_USE_PROTOBUF_SHARED_LIBS=On \ + -DCMAKE_POSITION_INDEPENDENT_CODE=On \ + -Wno-dev \ + -B build +} + +build() { + cd "$pkgname-$pkgver/build" + make +} + +check() { + cd "$pkgname-$pkgver/build" + LD_LIBRARY_PATH=. ./onnx_gtests +} + +package() { + cd "$pkgname-$pkgver" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + cd build + make DESTDIR="$pkgdir/" install + find "$pkgdir" -type d -name test -prune -exec rm -r {} \; + find "$pkgdir" -type d -empty -delete +} |