- docs/ASSET_PROVENANCE.md traces each of the 162 files under assets/ to
the script that generates it, or to its hand-written original (the app
icon's SVG). It's written by tools/provenance.gd, and the new
test_asset_provenance fails on a file with no rule, a rule naming a
generator that doesn't exist, or a stale document. The release package
and the .deb now ship it next to PROVENANCE.md (make dist-check and
make deb-check pass).
- Searched code, data, assets, docs and packaging for commercial game
names, characters, item and place names: none. The only matches are the
genre wording ("battle royale") and, in the DEVLOG, an open-source engine
another task uses. Item and place names are Tidewall's own (dock carbine,
fowling piece, tern chapel...).
- Licence notices: the Godot engine's licence and its third-party notices
(ENGINE-LICENSES.txt, generated from the engine) already ship in the
tarball and the .deb's copyright; there are no other libraries, addons or
fonts. CREDITS.md links the new trace.
- Name check for "Tidewall" noted on R7 (#66).
Closes #63
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
78 lines
3.9 KiB
Bash
Executable File
78 lines
3.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# R2: builds build/dist/tidewall_<version>-1_amd64.deb from the release package that
|
|
# tools/dist.sh makes, with dpkg-deb. Nothing is installed on this machine; see
|
|
# tools/deb_check.sh for the check in a clean Debian 13 container.
|
|
#
|
|
# tools/deb.sh
|
|
#
|
|
# Layout:
|
|
# /usr/games/tidewall, /usr/games/tidewall-server launchers
|
|
# /usr/lib/tidewall/ engine, game pack, server wrapper
|
|
# /usr/share/applications/tidewall.desktop menu entry
|
|
# /usr/share/icons/hicolor/*/apps/tidewall.{png,svg} icons
|
|
# /usr/share/man/man6/tidewall{,-server}.6.gz manual pages
|
|
# /usr/share/doc/tidewall/ copyright, README, provenance,
|
|
# engine licences, example server.cfg
|
|
# The desktop and icon caches are refreshed by dpkg triggers, so the package has no
|
|
# maintainer scripts.
|
|
set -euo pipefail
|
|
|
|
repo="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$repo"
|
|
|
|
tools/dist.sh >/dev/null
|
|
version="$(sed -n 's/^config\/version="\(.*\)"$/\1/p' project.godot)"
|
|
package="build/dist/tidewall-$version-linux-x86_64"
|
|
commit="$(sed -n 's/^commit //p' "$package/VERSION")"
|
|
debversion="$version-1"
|
|
deb="build/dist/tidewall_${debversion}_amd64.deb"
|
|
root="build/deb/root"
|
|
stamp="$(git log -1 --format=%ct)"
|
|
|
|
rm -rf build/deb "$deb" "$deb.sha256"
|
|
lib="$root/usr/lib/tidewall"
|
|
doc="$root/usr/share/doc/tidewall"
|
|
mkdir -p "$lib" "$root/usr/games" "$root/usr/share/applications" "$doc/examples" "$root/DEBIAN"
|
|
|
|
install -m 0755 "$package/tidewall.x86_64" "$lib/tidewall.x86_64"
|
|
install -m 0644 "$package/tidewall.pck" "$lib/tidewall.pck"
|
|
install -m 0755 "$package/tidewall-server" "$lib/tidewall-server"
|
|
install -m 0755 packaging/deb/tidewall "$root/usr/games/tidewall"
|
|
install -m 0755 packaging/deb/tidewall-server "$root/usr/games/tidewall-server"
|
|
install -m 0644 packaging/deb/tidewall.desktop "$root/usr/share/applications/tidewall.desktop"
|
|
for side in 16 24 32 48 64 128 256 512; do
|
|
install -D -m 0644 "assets/icons/app/tidewall-$side.png" "$root/usr/share/icons/hicolor/${side}x${side}/apps/tidewall.png"
|
|
done
|
|
install -D -m 0644 assets/icons/app/tidewall.svg "$root/usr/share/icons/hicolor/scalable/apps/tidewall.svg"
|
|
|
|
mkdir -p "$root/usr/share/man/man6"
|
|
for page in tidewall tidewall-server; do
|
|
gzip -9n -c "packaging/deb/man/$page.6" >"$root/usr/share/man/man6/$page.6.gz"
|
|
chmod 0644 "$root/usr/share/man/man6/$page.6.gz"
|
|
done
|
|
install -m 0644 packaging/deb/copyright "$doc/copyright"
|
|
install -m 0644 packaging/dist/README.md "$doc/README.md"
|
|
install -m 0644 "$package/server.cfg" "$doc/examples/server.cfg"
|
|
gzip -9n -c "$package/PROVENANCE.md" >"$doc/PROVENANCE.md.gz"
|
|
gzip -9n -c "$package/ASSET_PROVENANCE.md" >"$doc/ASSET_PROVENANCE.md.gz"
|
|
gzip -9n -c "$package/ENGINE-LICENSES.txt" >"$doc/ENGINE-LICENSES.gz"
|
|
{
|
|
printf 'tidewall (%s) unstable; urgency=medium\n\n' "$debversion"
|
|
printf ' * Release package built from commit %s.\n\n' "$commit"
|
|
printf ' -- Tidewall developers <claude@eom.dev> %s\n' "$(LC_ALL=C date -u -R -d "@$stamp")"
|
|
} | gzip -9n >"$doc/changelog.Debian.gz"
|
|
chmod 0644 "$doc"/*.gz
|
|
|
|
size="$(du -sk --apparent-size --exclude=DEBIAN "$root" | cut -f1)"
|
|
sed -e "s/@VERSION@/$debversion/" -e "s/@SIZE@/$size/" packaging/deb/control >"$root/DEBIAN/control"
|
|
(cd "$root" && find usr -type f -print0 | LC_ALL=C sort -z | xargs -0 md5sum) >"$root/DEBIAN/md5sums"
|
|
chmod 0644 "$root/DEBIAN/control" "$root/DEBIAN/md5sums"
|
|
find "$root" -type d -exec chmod 0755 {} +
|
|
find "$root" -exec touch --no-dereference -d "@$stamp" {} +
|
|
|
|
SOURCE_DATE_EPOCH="$stamp" dpkg-deb --root-owner-group -Zxz --build "$root" "$deb" >/dev/null
|
|
(cd build/dist && sha256sum "$(basename "$deb")" >"$(basename "$deb").sha256")
|
|
rm -rf build/deb
|
|
echo "deb: $deb ($(du -h "$deb" | cut -f1)), commit $commit"
|
|
dpkg-deb --info "$deb" | sed -n 's/^ \(Package\|Version\|Installed-Size\|Depends\):/ \1:/p'
|