summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2020-09-21 15:30:22 +0200
committerbartus2020-09-21 15:30:22 +0200
commit1d40668ea8d56a96132242f831a22d02a7e9c4bd (patch)
treedee81ddd4361b8c1946bc6ff84f16873b09d925a
parent2ae2ad83bd5565df3704917729a4c8ce8daa84c0 (diff)
downloadaur-1d40668ea8d56a96132242f831a22d02a7e9c4bd.tar.gz
Switch to Ninja, refactor.
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD27
2 files changed, 18 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 94e6729ae2b..5d66f0422ec 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -9,14 +9,16 @@ pkgbase = openimagedenoise-develop
makedepends = git-lfs
makedepends = cmake
makedepends = ispc>=1.14
+ makedepends = ninja
depends = intel-tbb
depends = python
+ provides = openimagedenoise=1.2.3
source = openimagedenoise-develop::git+https://github.com/OpenImageDenoise/oidn.git#tag=v1.2.3
source = git+https://github.com/OpenImageDenoise/mkl-dnn.git
source = git-lfs+https://github.com/OpenImageDenoise/oidn-weights.git
- md5sums = SKIP
- md5sums = SKIP
- md5sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
pkgname = openimagedenoise-develop
diff --git a/PKGBUILD b/PKGBUILD
index 645b055df51..28fec2c59e1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -23,20 +23,20 @@ arch=('x86_64')
url="https://www.openimagedenoise.org/"
license=('Apache')
depends=(intel-tbb python)
-makedepends=(git git-lfs cmake 'ispc>=1.14')
+provides=("openimagedenoise=${pkgver%.r*}")
+makedepends=(git git-lfs cmake 'ispc>=1.14' ninja)
source=("${pkgname}::git+https://github.com/OpenImageDenoise/oidn.git${_fragment}"
"git+https://github.com/OpenImageDenoise/mkl-dnn.git"
"git-lfs+https://github.com/OpenImageDenoise/oidn-weights.git"
)
-md5sums=('SKIP'
- 'SKIP'
- 'SKIP')
+sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP')
prepare() {
- cd ${srcdir}/${pkgname}
- git config submodule.mkl-dnn.url ${srcdir}/mkl-dnn
- git config submodule.weights.url ${srcdir}/oidn-weights
- git submodule update --init --recursive # --remote
+ git -C "${srcdir}"/${pkgname%-git} config submodule.mkl-dnn.url "${srcdir}"/mkl-dnn
+ git -C "${srcdir}"/${pkgname%-git} config submodule.weights.url "${srcdir}"/oidn-weights
+ git -C "${srcdir}"/${pkgname%-git} submodule update --init --recursive # --remote
}
#pkgver() {
@@ -45,15 +45,14 @@ prepare() {
#}
build() {
- cd ${srcdir}
- mkdir -p build && cd build
- cmake -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_PREFIX=/usr/ ../${pkgname}
- make
+ cmake -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_PREFIX=/usr/ \
+ -G Ninja -B "build" -S "${srcdir}"/${pkgname%-git}
+# shellcheck disable=SC2086 # to allow multiple flags in MAKEFLAGS variable.
+ ninja -C "build" ${MAKEFLAGS:--j1}
}
package() {
- cd ${srcdir}/build
- make install DESTDIR=${pkgdir}
+ DESTDIR=${pkgdir} ninja -C "build" install
}
# vim:set ts=2 sw=2 et: