[Feature] Add GitHub Action Workflow for Arch Linux AUR Package publishing #33
2
.SRCINFO
2
.SRCINFO
@@ -1,6 +1,6 @@
|
|||||||
pkgbase = numa-git
|
pkgbase = numa-git
|
||||||
pkgdesc = Portable DNS resolver in Rust — .numa local domains, ad blocking, developer overrides, DNS-over-HTTPS
|
pkgdesc = Portable DNS resolver in Rust — .numa local domains, ad blocking, developer overrides, DNS-over-HTTPS
|
||||||
pkgver = 0.9.1.r0.g1234abc
|
pkgver = 0.10.1.r0.g0000000
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
url = https://github.com/razvandimescu/numa
|
url = https://github.com/razvandimescu/numa
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
|
|||||||
2
.github/workflows/publish-aur.yml
vendored
2
.github/workflows/publish-aur.yml
vendored
@@ -44,7 +44,7 @@ jobs:
|
|||||||
# QEMU allows us to run ARM64 containers on x86_64 GitHub runners.
|
# QEMU allows us to run ARM64 containers on x86_64 GitHub runners.
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
if: matrix.arch == 'aarch64'
|
if: matrix.arch == 'aarch64'
|
||||||
uses: docker/setup-qemu-action@6882732593b27c7f95a044d559b586a46371a68e # v3.0.0
|
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
|
||||||
|
|
||||||
- name: Build and Test Package
|
- name: Build and Test Package
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
|
|||||||
19
PKGBUILD
19
PKGBUILD
@@ -1,7 +1,7 @@
|
|||||||
# Maintainer: razvandimescu <razvan@dimescu.com>
|
# Maintainer: razvandimescu <razvan@dimescu.com>
|
||||||
pkgname=numa-git
|
pkgname=numa-git
|
||||||
_pkgname=numa
|
_pkgname=numa
|
||||||
pkgver=0.9.1.r0.g1234abc # Updated by pkgver()
|
pkgver=0.10.1.r0.g0000000 # Placeholder — pkgver() rewrites this on each makepkg run
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Portable DNS resolver in Rust — .numa local domains, ad blocking, developer overrides, DNS-over-HTTPS"
|
pkgdesc="Portable DNS resolver in Rust — .numa local domains, ad blocking, developer overrides, DNS-over-HTTPS"
|
||||||
arch=('x86_64' 'aarch64')
|
arch=('x86_64' 'aarch64')
|
||||||
@@ -24,8 +24,10 @@ pkgver() {
|
|||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "$srcdir/$_pkgname"
|
cd "$srcdir/$_pkgname"
|
||||||
# Patch hardcoded paths to match Arch Linux standard (/usr/bin)
|
# numa v0.10.1+ uses FHS-compliant paths on Linux by default
|
||||||
sed -i 's|/usr/local/bin/numa|/usr/bin/numa|g' src/system_dns.rs
|
# (/var/lib/numa for data, journalctl for logs), so no source
|
||||||
|
# patching is needed. The earlier sed targeted /usr/local/bin/numa,
|
||||||
|
# which only appears in a comment in current main.
|
||||||
export RUSTUP_TOOLCHAIN=stable
|
export RUSTUP_TOOLCHAIN=stable
|
||||||
cargo fetch --locked
|
cargo fetch --locked
|
||||||
}
|
}
|
||||||
@@ -45,11 +47,14 @@ check() {
|
|||||||
package() {
|
package() {
|
||||||
cd "$srcdir/$_pkgname"
|
cd "$srcdir/$_pkgname"
|
||||||
install -Dm755 "target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
|
install -Dm755 "target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
|
||||||
|
|
||||||
# Install service file with patched path
|
# numa.service uses {{exe_path}} as a placeholder substituted by
|
||||||
sed 's|ExecStart=/usr/local/bin/numa|ExecStart=/usr/bin/numa /etc/numa.toml|g' numa.service > numa.service.patched
|
# `numa install` at runtime via replace_exe_path(). For an AUR
|
||||||
|
# package install (no `numa install` step), we substitute it
|
||||||
|
# statically here so systemd gets a real ExecStart path.
|
||||||
|
sed 's|{{exe_path}}|/usr/bin/numa /etc/numa.toml|g' numa.service > numa.service.patched
|
||||||
install -Dm644 "numa.service.patched" "$pkgdir/usr/lib/systemd/system/numa.service"
|
install -Dm644 "numa.service.patched" "$pkgdir/usr/lib/systemd/system/numa.service"
|
||||||
|
|
||||||
install -Dm644 "numa.toml" "$pkgdir/etc/numa.toml"
|
install -Dm644 "numa.toml" "$pkgdir/etc/numa.toml"
|
||||||
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user