Feature: add GitHub Actions workflow for publishing Arch Linux AUR package

This commit is contained in:
Sean Casey
2026-04-03 15:01:58 -06:00
parent e4a8893214
commit 09f7bdf063
3 changed files with 205 additions and 0 deletions

50
PKGBUILD Normal file
View File

@@ -0,0 +1,50 @@
# Maintainer: razvandimescu <razvan@dimescu.com>
pkgname=numa-git
_pkgname=numa
pkgver=0.9.1.r0.g1234abc # Updated by pkgver()
pkgrel=1
pkgdesc="Portable DNS resolver in Rust — .numa local domains, ad blocking, developer overrides, DNS-over-HTTPS"
arch=('x86_64' 'aarch64')
url="https://github.com/razvandimescu/numa"
license=('MIT')
depends=('gcc-libs' 'glibc')
makedepends=('cargo' 'git')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("$_pkgname::git+$url.git")
sha256sums=('SKIP')
pkgver() {
cd "$_pkgname"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/^v//'
}
prepare() {
cd "$_pkgname"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked
}
build() {
cd "$_pkgname"
export RUSTUP_TOOLCHAIN=stable
cargo build --frozen --release
}
check() {
cd "$_pkgname"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen
}
package() {
cd "$_pkgname"
install -Dm755 "target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
# Install service file with patched path
sed 's|/usr/local/bin/numa|/usr/bin/numa|g' numa.service > numa.service.patched
install -Dm644 "numa.service.patched" "$pkgdir/usr/lib/systemd/system/numa.service"
install -Dm644 "numa.toml" "$pkgdir/etc/numa.toml"
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}