# Maintainer: metamuffin pkgname=gpn-tron-git pkgver=r22.821af51 pkgrel=1 pkgdesc="GPN-Tron Rust rewrite" arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') url="https://codeberg.org/metamuffin/gpn-tron-rust" license=('AGPL-3.0-only') makedepends=('rustup' 'esbuild') backup=('etc/gpn-tron.toml') source=("gpn-tron::git+https://codeberg.org/metamuffin/gpn-tron-rust" "gpn-tron.service" "gpn-tron.toml" "sysusers.conf") sha256sums=("SKIP" "SKIP" "SKIP" "SKIP") rust_chost() { sed -e "s/-pc-linux/-unknown-linux/" -e "s/armv7l-/armv7-/" <<< "$CHOST" } pkgver() { cd "gpn-tron" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { cd "gpn-tron" cargo +nightly fetch --locked --target "$(rust_chost)" } build() { cd "gpn-tron" cargo +nightly build --frozen --release --target "$(rust_chost)" } package() { install -Dm755 gpn-tron/target/$(rust_chost)/release/gpn-tron "$pkgdir/usr/bin/gpn-tron" install -Dm644 gpn-tron/COPYING "$pkgdir/usr/share/licenses/gpn-tron/COPYING" install -Dm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/gpn-tron.conf" install -Dm644 gpn-tron.service "$pkgdir/usr/lib/systemd/system/gpn-tron.service" install -Dm644 gpn-tron.toml "$pkgdir/etc/gpn-tron.toml" }