# Built from this checkout: run makepkg in linux/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' 'onnxruntime' 'hicolor-icon-theme' 'shared-mime-info')
makedepends=('cmake' 'ninja')
source=('u2net.onnx::https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx')
sha256sums=('8d10d2f3bb75ae3b6d527c77944fc5e7dcd94b29809d47a739a7a728a912b491')
noextract=('u2net.onnx')

build() {
    cmake -S "$startdir/../.." -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DOMAPHOTO_MODEL="$srcdir/u2net.onnx"
    cmake --build build --target omaphoto
}

package() {
    DESTDIR="$pkgdir" cmake --install build
}
