10 Commits

Author SHA1 Message Date
9ee9ddaa29 Update changelog for 0.6.0-1~4.gbpd36981 release 2025-11-20 08:55:15 -06:00
d36981fc0f Rename binary package to not collide with native
I haven't really thought about what I'm going to do to bring the WASM
and native builds back together...
2025-11-19 15:22:44 -06:00
7a5313c766 Use 'www-data' user & group for webserver 2025-11-19 15:12:36 -06:00
09cc2116b7 Update changelog for 0.6.0-1~3.gbp7c5d9c release 2025-11-19 13:21:15 -06:00
7c5d9c6af0 Switch arch from "any" to "all" 2025-11-19 13:20:15 -06:00
98212aa6bc Add a runtime dependency on Python3 (http.server) 2025-11-19 13:19:54 -06:00
e6379af883 Rename service unit file to match package name
So that debhelper automatically installs it for me, instead of adding my
own install target.
2025-11-19 13:11:44 -06:00
a5734b0174 Patch Makefile to have a var for web root 2025-11-19 13:09:51 -06:00
c8cf70bd52 Override d/rules install to pass web root along 2025-11-19 13:08:51 -06:00
9dbd3d953e Add a Systemd service unit file for the server 2025-11-19 12:54:44 -06:00
6 changed files with 74 additions and 6 deletions

14
debian/boids-webserver.service vendored Normal file
View File

@@ -0,0 +1,14 @@
[Unit]
Description=A website hosting a WASM build of Boids
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/env python3 -m http.server -d /usr/share/boids 8000
Restart=never
User=www-data
Group=www-data
WorkingDirectory=/usr/share/boids
[Install]
WantedBy=multi-user.target

17
debian/changelog vendored
View File

@@ -1,6 +1,6 @@
another-boids-in-rust (0.6.0-1~2.gbpf38383) UNRELEASED; urgency=medium
another-boids-in-rust (0.6.0-1~4.gbpd36981) UNRELEASED; urgency=medium
** SNAPSHOT build @f383836c24993ba70f8560a60565d9d605c834e8 **
** SNAPSHOT build @d36981fc0f93d12421972c17e444a18f9ad540db **
* Fix: Missing destination in Docker copy instr.
* Add a Makefile to make web builds more ergonomic
@@ -48,8 +48,19 @@ another-boids-in-rust (0.6.0-1~2.gbpf38383) UNRELEASED; urgency=medium
* Build-Depend on rust-llvm to get default linker
* Mangle the rules file, trying to get WASM build
* Fix branch name in d/gbp.conf
* Update changelog for new snapshot
* Drop unneeded build-dep
* Add a Systemd service unit file for the server
* Override d/rules install to pass web root along
* Patch Makefile to have a var for web root
* Rename service unit file to match package name
* Add a runtime dependency on Python3 (http.server)
* Switch arch from "any" to "all"
* Update changelog for 0.6.0-1~3.gbp7c5d9c release
* Use 'www-data' user & group for webserver
* Rename binary package to not collide with native
-- Robert Garrett <robertgarrett404@gmail.com> Wed, 19 Nov 2025 12:25:05 -0600
-- Robert Garrett <robertgarrett404@gmail.com> Thu, 20 Nov 2025 08:55:14 -0600
another-boids-in-rust (0.3.0-1.1) unstable; urgency=medium

5
debian/control vendored
View File

@@ -15,11 +15,12 @@ Vcs-Git: https://git.gelvin.dev/robert/boids
Vcs-Browser: https://git.gelvin.dev/robert/boids
Rules-Requires-Root: no
Package: another-boids-in-rust
Architecture: any
Package: boids-webserver
Architecture: all
Depends:
${misc:Depends},
${shlibs:Depends},
python3,
Description: Another Boids implementation in Rust.
Boids is a flocking algorithm. This one is built in Rust using the Bevy game
engine.

View File

@@ -0,0 +1,35 @@
From: Robert Garrett <robertgarrett404@gmail.com>
Date: Wed, 19 Nov 2025 12:49:33 -0600
Subject: Patch Makefile to have a var for web root
---
Makefile | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 742d029..8935b7e 100644
--- a/Makefile
+++ b/Makefile
@@ -7,8 +7,9 @@
CARGO_TARGET := wasm32-unknown-unknown
CARGO_PROFILE := wasm-release
-# Override DESTDIR to set a custom install path (such as your web root)
+# Actually, this is so Debian can install the program into it's "build home"
DESTDIR ?= .
+WEBROOT ?= boids # THIS is the web root
SRC_DIR = ./src
SRCS := $(wildcard $(SRC_DIR)/**)
@@ -67,7 +68,7 @@ full-clean: clean
# Installation goal. It's meant to be a helper utility for moving the built
# output into the web root. Only supports the "bundle-able" mode.
install: web
- install -dm0755 $(DESTDIR)
- install -m0644 out/boids.js $(DESTDIR)/
- install -m0644 out/boids_bg.wasm.gz $(DESTDIR)/
- install -m0644 out/boids.html $(DESTDIR)/
+ install -dm0755 $(DESTDIR)/$(WEBROOT)
+ install -m0644 out/boids.js $(DESTDIR)/$(WEBROOT)/
+ install -m0644 out/boids_bg.wasm.gz $(DESTDIR)/$(WEBROOT)/
+ install -m0644 out/boids.html $(DESTDIR)/$(WEBROOT)/

View File

@@ -1,3 +1,4 @@
0001-Alter-blake3-to-emit-Built-Using-info.patch
0002-Use-pure-Rust-implementation-of-Blake3-parts.patch
0003-Use-mini-as-release-profile.patch
0004-Patch-Makefile-to-have-a-var-for-web-root.patch

8
debian/rules vendored
View File

@@ -20,11 +20,14 @@ CARGO_REGISTRY=$(CURDIR)/debian/cargo_registry
export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
WEBROOT=/usr/share/boids/
export WEBROOT
%:
dh $@
execute_after_dh_auto_clean:
$(CARGO) clean
# $(CARGO) clean
rm -rf $(CARGO_HOME)
rm -rf $(CARGO_REGISTRY)
rm -f debian/cargo-checksum.json
@@ -40,3 +43,6 @@ override_dh_auto_configure:
override_dh_auto_test:
# No tests. Can't execute a WASM binary
echo "Skipping tests, can't run WASM files"
override_dh_auto_install:
dh_auto_install WEBROOT=$(WEBROOT)