Files

4.5 KiB

Packaging and releasing Game of Life Sandbox

The initial release version is 0.1.0 (VERSION). The root PKGBUILD and .SRCINFO describe the AUR development package game-of-life-sandbox-git, using https://git.molberg.cloud/alex/game-of-life-sandbox.git, with the project at the repository root.

Build a package from this checkout

On Arch Linux, install build and test dependencies if they are missing:

/usr/bin/pkexec pacman -S --needed base-devel git freeglut libglvnd libx11 desktop-file-utils xorg-server-xvfb xorg-xauth libxtst

Then, as your normal user:

make package

This creates a source archive and a pacman package in dist/. Only explicit source files and bundled examples enter the archive: local settings, saved boards, compiled binaries, and generated launchers are excluded. The build runs the unit and virtual-display tests. No privileges or system installation are performed by make package.

Install the generated package, using its exact filename:

/usr/bin/pkexec pacman -U /absolute/path/to/game-of-life-sandbox-0.1.0-1-x86_64.pkg.tar.zst

Launch Game of Life Sandbox from the application menu, or run game-of-life-sandbox. Optional kdialog enables Open File. Neither named saves nor either board gallery needs it. Uninstall with:

/usr/bin/pkexec pacman -R game-of-life-sandbox

Uninstalling leaves your settings and saved boards intact.

Install layout

  • /usr/bin/game-of-life-sandbox
  • /usr/share/applications/game-of-life-sandbox.desktop
  • /usr/share/icons/hicolor/scalable/apps/game-of-life-sandbox.svg
  • /usr/share/game-of-life-sandbox/examples/
  • /usr/share/licenses/game-of-life-sandbox/LICENSE
  • /usr/share/doc/game-of-life-sandbox/README.md

Installed builds store settings in ${XDG_CONFIG_HOME:-$HOME/.config}/game-of-life-sandbox/settings.cfg and your boards in ${XDG_DATA_HOME:-$HOME/.local/share}/game-of-life-sandbox/boards/. Only absolute XDG base paths are accepted; relative values use the standard HOME fallback. The app creates these directories with private permissions. Bundled examples are read from the installed, read-only data directory.

./run.sh and ./build.sh retain the portable game_of_life executable with settings and boards beside it. To carry existing portable data into an installed copy, close both copies, then copy settings.cfg and your boards/*.life files to the respective per-user paths above. Do not copy bundled examples there.

Makefile usage

make PREFIX=/usr
make check
make PREFIX=/usr DESTDIR=/tmp/life-stage install

DESTDIR stages files without changing their compiled-in runtime prefix. Changing PREFIX or DATADIR rebuilds the installed binary to use the matching data path. For an installation without administrator access:

make PREFIX="$HOME/.local" install

Make sure $HOME/.local/bin is on your PATH. make ... uninstall removes the installed program and bundled files; it never removes XDG user data. On Arch, prefer the pacman package so the package manager tracks ownership.

AUR publication checklist

  1. Review the proposed MIT license in LICENSE before publishing. If you choose another license, update both its full text and the license field in PKGBUILD.
  2. Commit and push the source, Makefile, assets, examples, tests, and packaging changes to https://git.molberg.cloud/alex/game-of-life-sandbox. AUR builds fetch that remote, not this working tree. A package is not ready for public builds until these files are pushed.
  3. In a fresh checkout, run makepkg at the repository root to test the VCS source download, build, tests, and package. Verify the package in a clean Arch chroot with devtools before submission. Only local x86_64 builds are validated here.
  4. Regenerate .SRCINFO with makepkg --printsrcinfo > .SRCINFO. The pkgver() function derives the version from VERSION, Git revision count, and commit.
  5. Check the AUR for a pre-existing package with the same name. Clone your AUR repository and commit only PKGBUILD and .SRCINFO; do not upload binaries, sources, personal settings, or saved boards to AUR.
  6. Review and push the AUR commit with your AUR SSH credentials. This workspace preparation does not publish to git.molberg.cloud or AUR.

For later releases, update VERSION, document changes, build/test again, and tag upstream (for example game-of-life-sandbox-v0.1.0). The AUR -git package follows HEAD; make package creates the fixed-version package from the current checkout.