chore(pkg): add Arch Linux PKGBUILDs for game client and sync server
- pkg/solitaire-quest/PKGBUILD: builds solitaire_app binary, depends on alsa-lib, libxkbcommon, systemd-libs (Bevy Linux requirements); check() runs only non-Bevy crates (solitaire_core, solitaire_sync) since Bevy integration tests require a GPU/display unavailable in chroot - pkg/solitaire-quest-server/PKGBUILD: builds solitaire_server binary, installs systemd service unit and hardened environment file template - pkg/solitaire-quest-server/solitaire-quest-server.service: systemd unit with ProtectSystem=strict, NoNewPrivileges, dedicated service user - pkg/solitaire-quest-server/server.env: documented env template installed to /etc/solitaire-quest-server/server.env (mode 0640, listed in backup=) - LICENSE: add MIT license - Cargo.toml: add license = "MIT" to [workspace.package] - All member crates: add license.workspace = true Both PKGBUILDs follow the Arch Rust package guidelines: prepare() uses --locked + cargo fetch build() uses --frozen --release -p <crate> RUSTUP_TOOLCHAIN=stable and CARGO_TARGET_DIR=target set in each stage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# Maintainer: funman300 <funman300@gmail.com>
|
||||
|
||||
pkgname=solitaire-quest
|
||||
pkgver=0.1.0
|
||||
pkgrel=1
|
||||
pkgdesc='Cross-platform Klondike Solitaire with progression, achievements, and optional sync'
|
||||
url='https://github.com/funman300/solitaire-quest'
|
||||
license=('MIT')
|
||||
arch=('x86_64')
|
||||
makedepends=('cargo' 'rust')
|
||||
depends=(
|
||||
'gcc-libs'
|
||||
'glibc'
|
||||
'alsa-lib'
|
||||
'libxkbcommon'
|
||||
'systemd-libs' # libudev.so — required by Bevy input
|
||||
)
|
||||
source=("$pkgname-$pkgver.tar.gz::https://github.com/funman300/solitaire-quest/archive/v$pkgver.tar.gz")
|
||||
b2sums=('SKIP')
|
||||
|
||||
prepare() {
|
||||
cd "solitaire-quest-$pkgver"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
cargo fetch --locked --target "$(rustc -Vv | grep host | cut -d' ' -f2)"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "solitaire-quest-$pkgver"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
export CARGO_TARGET_DIR=target
|
||||
cargo build --frozen --release -p solitaire_app
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "solitaire-quest-$pkgver"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
# Only test the non-Bevy crates — Bevy integration tests require a GPU/display
|
||||
# which is not available in a clean build environment.
|
||||
cargo test --frozen -p solitaire_core -p solitaire_sync
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "solitaire-quest-$pkgver"
|
||||
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/solitaire_app"
|
||||
install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
Reference in New Issue
Block a user