Files
omarchy-pkgs/pkgbuilds/omasnap/PKGBUILD
T
2026-08-26 22:17:37 -04:00

49 lines
1.1 KiB
Bash

# Maintainer: Tobi Lütke <tobi@lutke.com>
pkgname=omasnap
pkgver=1.20.1
pkgrel=1
pkgdesc="Native Wayland screenshot and annotation overlay for Hyprland"
arch=('x86_64')
url="https://github.com/tobi/omasnap"
license=('MIT' 'OFL-1.1')
depends=(
'hyprland'
'layer-shell-qt'
'qt6-base'
'tesseract'
'tesseract-data-eng'
'wayland'
'wl-clipboard'
)
makedepends=(
'cmake'
'ninja'
'pkgconf'
'wayland-protocols'
)
options=('!debug')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('daf8fd17a81890661eebab791e6e78216c331e040043a1a6b72e638d3626b431')
build() {
cmake -S "$pkgname-$pkgver" -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
cmake --build build --parallel
}
check() {
QT_QPA_PLATFORM=offscreen \
./build/omasnap-smoke "$srcdir/omasnap-smoke-output"
}
package() {
cmake --install build --prefix "$pkgdir/usr"
install -Dm644 "$pkgname-$pkgver/README.md" \
"$pkgdir/usr/share/doc/$pkgname/README.md"
install -Dm644 "$pkgname-$pkgver/LICENSE" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}