ONNX Runtime stamps its symbols with each release's version, so the 1.0.0 RPM demanded Fedora 42's exact runtime (issue #5) and the Arch package would break on the next update. The RPM and the Arch package now bundle Microsoft's 1.21.0 build, as the DEB does, and the images test against it. The RPM builds on Fedora 43. A DEB built on Ubuntu 26.04 joins 24.04's, and ubuntu.sh picks by codename. Co-Authored-By: Claude <noreply@anthropic.com>
37 lines
1.5 KiB
Bash
37 lines
1.5 KiB
Bash
# Built from this checkout: run makepkg in packaging/arch.
|
|
pkgname=omaphoto
|
|
pkgver=1.0.0
|
|
pkgrel=1
|
|
pkgdesc='Layered image editing for Linux, a port of Compositor'
|
|
arch=('x86_64')
|
|
url='https://github.com/ZacharyZhang-NY/OmaPhoto'
|
|
license=('MIT')
|
|
depends=('qt6-base' 'qt6-imageformats' 'libheif' 'libde265' 'fontconfig' 'hicolor-icon-theme' 'shared-mime-info')
|
|
makedepends=('cmake' 'ninja')
|
|
# ONNX Runtime ships inside: Arch's changes its symbols each release.
|
|
source=('u2net.onnx::https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx'
|
|
'https://github.com/microsoft/onnxruntime/releases/download/v1.21.0/onnxruntime-linux-x64-1.21.0.tgz')
|
|
sha256sums=('8d10d2f3bb75ae3b6d527c77944fc5e7dcd94b29809d47a739a7a728a912b491'
|
|
'7485c7e7aac6501b27e353dcbe068e45c61ab51fbaf598d13970dfae669d20bf')
|
|
noextract=('u2net.onnx')
|
|
|
|
# The layout Microsoft's CMake config expects.
|
|
prepare() {
|
|
local ort="$srcdir/onnxruntime-linux-x64-1.21.0"
|
|
rm -rf ort
|
|
mkdir -p ort/include ort/lib/cmake
|
|
cp -r "$ort/include" ort/include/onnxruntime
|
|
cp -a "$ort/lib" ort/lib64
|
|
cp -r "$ort/lib/cmake/onnxruntime" ort/lib/cmake/
|
|
}
|
|
|
|
build() {
|
|
cmake -S "$startdir/../.." -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DOMAPHOTO_MODEL="$srcdir/u2net.onnx" \
|
|
-DOMAPHOTO_BUNDLE_ORT=ON -Donnxruntime_DIR="$srcdir/ort/lib/cmake/onnxruntime" -DOMAPHOTO_ORT_NOTICES="$srcdir/onnxruntime-linux-x64-1.21.0"
|
|
cmake --build build --target omaphoto
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
}
|