Files
Ratbin/packaging/arch/PKGBUILD
T
2026-11-05 09:47:45 +02:00

38 lines
1.1 KiB
Bash

pkgname=ratbin
pkgver=0.1.0
pkgrel=1
pkgdesc="Integrate AppImages, binaries and scripts into the application menu via the Thunar context menu"
arch=('x86_64')
license=('MIT')
depends=('gcc-libs' 'glibc')
makedepends=('cargo')
optdepends=(
'kitty: terminal used by the Ratbin menu entry'
'thunar: context menu integration'
'desktop-file-utils: refresh the menu cache after changes'
'libnotify: notifications from context menu actions'
'zenity: choose the main binary when a bundle has several executables'
)
options=('!lto')
_root="$startdir/../.."
prepare() {
cd "$_root"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$_root"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR="$srcdir/target"
cargo build --frozen --release
}
package() {
install -Dm755 "$srcdir/target/release/ratbin" "$pkgdir/usr/bin/ratbin"
install -Dm644 "$_root/assets/ratbin.desktop" "$pkgdir/usr/share/applications/ratbin.desktop"
install -Dm644 "$_root/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}