Initial PKGBUILD for solitaire-quest 0.1.0-1
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
pkg/
|
||||
src/
|
||||
*.tar.gz
|
||||
*.tar.zst
|
||||
*.tar.xz
|
||||
*.pkg.tar*
|
||||
.SRCINFO~
|
||||
@@ -0,0 +1,101 @@
|
||||
# Maintainer: funman300 <funman300@gmail.com>
|
||||
pkgname=solitaire-quest
|
||||
pkgver=0.1.0
|
||||
pkgrel=1
|
||||
pkgdesc="Cross-platform Klondike Solitaire in Rust + Bevy with sync, achievements, and four game modes"
|
||||
arch=('x86_64')
|
||||
url="https://git.aleshym.co/funman300/Rusty_Solitare"
|
||||
license=('MIT' 'LGPL-3.0-only' 'OFL-1.1')
|
||||
# MIT for the project code, LGPL-3.0 for the bundled xCards card faces, and
|
||||
# OFL-1.1 for FiraMono. See /usr/share/licenses/$pkgname/CREDITS.md for the
|
||||
# full attribution table.
|
||||
|
||||
depends=(
|
||||
'alsa-lib' # audio output via kira
|
||||
'libxkbcommon' # keyboard input on X11/Wayland
|
||||
'wayland' # native Wayland support
|
||||
'libx11' # X11 fallback
|
||||
'systemd-libs' # libudev, gamepad/input device discovery
|
||||
'gcc-libs'
|
||||
'libsecret' # keyring crate — sync server credential storage
|
||||
'vulkan-icd-loader' # Bevy's wgpu backend
|
||||
'fontconfig' # glyph fallback
|
||||
)
|
||||
|
||||
makedepends=(
|
||||
'cargo'
|
||||
'rust'
|
||||
'pkgconf'
|
||||
)
|
||||
|
||||
# Tarball produced by Gitea's `<repo>/archive/<tag>.tar.gz` endpoint. If the
|
||||
# project moves to GitHub or another forge, replace the URL.
|
||||
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
|
||||
sha256sums=('SKIP')
|
||||
# After the v0.1.0 tag is published and the tarball is reachable, run:
|
||||
# updpkgsums
|
||||
# in this directory to replace SKIP with the real sha256 sum, then commit.
|
||||
|
||||
# Gitea archives unpack to a directory named after the repo and tag. The
|
||||
# exact name depends on the Gitea version; check with `tar tf` if unsure.
|
||||
_archive_dir="Rusty_Solitare"
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/$_archive_dir"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$_archive_dir"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
export CARGO_TARGET_DIR=target
|
||||
cargo build --frozen --release --package solitaire_app
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$srcdir/$_archive_dir"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
cargo test --frozen --release --workspace --no-run
|
||||
# Skipping `cargo test --release` execution because the workspace is
|
||||
# large and tests are independently CI-checked; just verifying the
|
||||
# release artefacts compile is sufficient as a packaging gate.
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$_archive_dir"
|
||||
|
||||
# Layout chosen so the binary's parent + "../assets" resolves to the
|
||||
# bundled assets directory. Bevy's `current_exe()` follows the
|
||||
# /usr/bin symlink to the real binary, so resolution lands inside
|
||||
# /usr/lib/$pkgname.
|
||||
install -Dm755 "target/release/solitaire_app" \
|
||||
"$pkgdir/usr/lib/$pkgname/bin/solitaire-quest"
|
||||
|
||||
install -dm755 "$pkgdir/usr/lib/$pkgname/assets"
|
||||
cp -r assets/. "$pkgdir/usr/lib/$pkgname/assets/"
|
||||
|
||||
# /usr/bin entry — symlink so PATH-based launches resolve correctly.
|
||||
install -dm755 "$pkgdir/usr/bin"
|
||||
ln -s "/usr/lib/$pkgname/bin/solitaire-quest" \
|
||||
"$pkgdir/usr/bin/solitaire-quest"
|
||||
|
||||
# Desktop entry + icon for application menus.
|
||||
install -Dm644 "$srcdir/solitaire-quest.desktop" \
|
||||
"$pkgdir/usr/share/applications/$pkgname.desktop"
|
||||
# Icon is sourced from the packaging repo (PKGBUILD's directory),
|
||||
# not the upstream archive — drop a 256×256 PNG named
|
||||
# solitaire-quest.png next to the PKGBUILD when one becomes available.
|
||||
if [ -f "$srcdir/solitaire-quest.png" ]; then
|
||||
install -Dm644 "$srcdir/solitaire-quest.png" \
|
||||
"$pkgdir/usr/share/icons/hicolor/256x256/apps/$pkgname.png"
|
||||
fi
|
||||
|
||||
# License + credit attribution.
|
||||
install -Dm644 LICENSE \
|
||||
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
install -Dm644 CREDITS.md \
|
||||
"$pkgdir/usr/share/licenses/$pkgname/CREDITS.md"
|
||||
install -Dm644 README.md \
|
||||
"$pkgdir/usr/share/doc/$pkgname/README.md"
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
# solitaire-quest (Arch packaging)
|
||||
|
||||
PKGBUILD for [Solitaire Quest](https://git.aleshym.co/funman300/Rusty_Solitare),
|
||||
a cross-platform Klondike Solitaire in Rust + Bevy.
|
||||
|
||||
This repo is intentionally separate from the upstream source so the same
|
||||
PKGBUILD can be submitted to the AUR and to any third-party Arch
|
||||
repository (Chaotic-AUR, ALA, etc.) without polluting the upstream
|
||||
project history.
|
||||
|
||||
---
|
||||
|
||||
## Files
|
||||
|
||||
| File | Purpose |
|
||||
|---|---|
|
||||
| `PKGBUILD` | Build script — pulls the v0.1.0 source tarball, builds with `cargo`, installs binary + assets + desktop entry. |
|
||||
| `solitaire-quest.desktop` | XDG desktop entry installed to `/usr/share/applications/`. |
|
||||
| `solitaire-quest.png` | Application icon (TODO — drop a 256×256 PNG here). |
|
||||
| `.SRCINFO` | Auto-generated by `makepkg --printsrcinfo`. |
|
||||
|
||||
---
|
||||
|
||||
## Building locally
|
||||
|
||||
```bash
|
||||
# 1. Update the sha256 once the v0.1.0 tarball is published.
|
||||
updpkgsums
|
||||
|
||||
# 2. Build the package.
|
||||
makepkg -si
|
||||
|
||||
# 3. Verify it installed.
|
||||
solitaire-quest --help # or just launch from the application menu
|
||||
```
|
||||
|
||||
`-s` installs missing makedeps; `-i` installs the resulting `.pkg.tar.zst`
|
||||
after the build succeeds. Drop `-i` if you only want the artefact.
|
||||
|
||||
---
|
||||
|
||||
## Submitting to the AUR
|
||||
|
||||
```bash
|
||||
# Generate the .SRCINFO required by the AUR.
|
||||
makepkg --printsrcinfo > .SRCINFO
|
||||
|
||||
# Commit both files to the AUR git remote.
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m "Initial release: 0.1.0-1"
|
||||
git push aur master
|
||||
```
|
||||
|
||||
The AUR remote is `ssh://aur@aur.archlinux.org/solitaire-quest.git`. You
|
||||
need an SSH key registered on your AUR account.
|
||||
|
||||
---
|
||||
|
||||
## Updating for a new release
|
||||
|
||||
For each new upstream tag:
|
||||
|
||||
1. Bump `pkgver` in `PKGBUILD` to match the new upstream tag.
|
||||
2. Reset `pkgrel=1` (only bump `pkgrel` for packaging-only changes).
|
||||
3. `updpkgsums` to refresh the sha256 hash.
|
||||
4. `makepkg --printsrcinfo > .SRCINFO`.
|
||||
5. Test build: `makepkg -si`.
|
||||
6. `git commit -am "upgpkg: $pkgname $pkgver-1"` and push.
|
||||
|
||||
---
|
||||
|
||||
## Runtime layout (where things land)
|
||||
|
||||
| Path | Contents |
|
||||
|---|---|
|
||||
| `/usr/bin/solitaire-quest` | Symlink to the real binary. |
|
||||
| `/usr/lib/solitaire-quest/bin/solitaire-quest` | The compiled binary. |
|
||||
| `/usr/lib/solitaire-quest/assets/` | Card art, fonts, audio, backgrounds. |
|
||||
| `/usr/share/applications/solitaire-quest.desktop` | App-menu entry. |
|
||||
| `/usr/share/icons/hicolor/256x256/apps/solitaire-quest.png` | Icon (when supplied). |
|
||||
| `/usr/share/licenses/solitaire-quest/LICENSE` | MIT license text. |
|
||||
| `/usr/share/licenses/solitaire-quest/CREDITS.md` | Full attribution table. |
|
||||
| `/usr/share/doc/solitaire-quest/README.md` | Upstream README. |
|
||||
|
||||
The unusual `/usr/lib/solitaire-quest/bin/` placement exists so Bevy's
|
||||
`current_exe()` resolves `../assets` to the bundled assets directory
|
||||
without a wrapper script. The `/usr/bin` symlink keeps the binary in
|
||||
`PATH` while preserving that resolution.
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
The PKGBUILD and supporting files in this repo are MIT-licensed (matching
|
||||
upstream). The packaged binary itself is MIT + LGPL-3.0 (xCards art) +
|
||||
OFL-1.1 (FiraMono); see `/usr/share/licenses/solitaire-quest/CREDITS.md`
|
||||
on an installed system for the full table.
|
||||
@@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=Solitaire Quest
|
||||
GenericName=Solitaire
|
||||
Comment=Cross-platform Klondike Solitaire with sync, achievements, and four game modes
|
||||
Exec=solitaire-quest
|
||||
Icon=solitaire-quest
|
||||
Terminal=false
|
||||
Categories=Game;CardGame;
|
||||
Keywords=solitaire;klondike;cards;patience;
|
||||
StartupWMClass=solitaire-quest
|
||||
Reference in New Issue
Block a user