Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkgbuilds/oma-preview/.omarchy/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"source": "local"
}
52 changes: 52 additions & 0 deletions pkgbuilds/oma-preview/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Maintainer: Lukas Innig (derluke on GitHub)
pkgname=oma-preview
pkgver=0.9.0
pkgrel=1
pkgdesc='A small Omarchy-native PDF reader and editor with visible agent review'
arch=('x86_64' 'aarch64')
url='https://github.com/derluke/oma-preview'
license=('MIT')
options=('!debug')
depends=('quickshell' 'qt6-base>=6.11' 'qt6-declarative' 'qt6-webengine' 'wayland' 'qpdf' 'poppler' 'librsvg' 'gcc-libs' 'glibc')
makedepends=('cargo' 'cmake' 'wayland-protocols' 'pkgconf')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('d2a18a7c568677861ace057a8fe8fce57f7ab2dc8363eef3e193115d75852cdc')

prepare() {
cd "oma-preview-$pkgver"
# Packaged builds must not embed a developer checkout as a UI fallback.
sed -i 's#PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("ui")#PathBuf::from("/usr/share/oma-preview/ui")#' src/main.rs
cargo fetch --locked
}

build() {
cd "oma-preview-$pkgver"
cargo build --frozen --release
if [[ -f native/build.sh ]]; then bash native/build.sh; fi
}

check() {
cd "oma-preview-$pkgver"
cargo test --frozen
}

package() {
cd "oma-preview-$pkgver"
install -Dm755 target/release/oma-preview "$pkgdir/usr/bin/oma-preview"
install -d "$pkgdir/usr/share/oma-preview/ui"
install -m644 ui/*.qml ui/qmldir "$pkgdir/usr/share/oma-preview/ui/"
# Older published tags predate the pool; new pool builds require its asset.
if [[ -f ui/PdfDocumentPool.qml ]]; then
install -m644 ui/idle.pdf "$pkgdir/usr/share/oma-preview/ui/"
fi
if [[ -f native/build.sh ]]; then
install -d "$pkgdir/usr/share/oma-preview/ui/native"
install -m644 ui/native/* "$pkgdir/usr/share/oma-preview/ui/native/"
fi
install -Dm644 data/org.omarchy.oma-preview.desktop "$pkgdir/usr/share/applications/org.omarchy.oma-preview.desktop"
install -Dm644 assets/org.omarchy.oma-preview.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/org.omarchy.oma-preview.svg"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
install -Dm644 skills/oma-preview/SKILL.md "$pkgdir/usr/share/oma-preview/skills/oma-preview/SKILL.md"
install -Dm644 skills/oma-preview/agents/openai.yaml "$pkgdir/usr/share/oma-preview/skills/oma-preview/agents/openai.yaml"
}