Compare commits
18 Commits
deb/trixie
...
deb/trixie
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ee9ddaa29 | |||
| d36981fc0f | |||
| 7a5313c766 | |||
| 09cc2116b7 | |||
| 7c5d9c6af0 | |||
| 98212aa6bc | |||
| e6379af883 | |||
| a5734b0174 | |||
| c8cf70bd52 | |||
| 9dbd3d953e | |||
| 41ca417386 | |||
| 6e2482f68c | |||
| f383836c24 | |||
| de58cd8d7c | |||
| 3d9dc77837 | |||
| f7a49a2760 | |||
| 3cabfa46c3 | |||
| bb99cc8042 |
14
debian/boids-webserver.service
vendored
Normal file
14
debian/boids-webserver.service
vendored
Normal 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
|
||||||
24
debian/changelog
vendored
24
debian/changelog
vendored
@@ -1,6 +1,6 @@
|
|||||||
another-boids-in-rust (0.6.0-1~1.gbp57907c) UNRELEASED; urgency=medium
|
another-boids-in-rust (0.6.0-1~4.gbpd36981) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
** SNAPSHOT build @57907c105ab79d6b10bcb730d9cbcab8e693f150 **
|
** SNAPSHOT build @d36981fc0f93d12421972c17e444a18f9ad540db **
|
||||||
|
|
||||||
* Fix: Missing destination in Docker copy instr.
|
* Fix: Missing destination in Docker copy instr.
|
||||||
* Add a Makefile to make web builds more ergonomic
|
* Add a Makefile to make web builds more ergonomic
|
||||||
@@ -41,8 +41,26 @@ another-boids-in-rust (0.6.0-1~1.gbp57907c) UNRELEASED; urgency=medium
|
|||||||
* Pin transitive dep ruzstd=0.8.1
|
* Pin transitive dep ruzstd=0.8.1
|
||||||
* Lock the new dependencies and vendor them
|
* Lock the new dependencies and vendor them
|
||||||
* Re-diff patch queue
|
* Re-diff patch queue
|
||||||
|
* Update changelog for 0.6.0-1~1.gbp57907c release
|
||||||
|
* Add build dependency on the LLD linker
|
||||||
|
* Build for WASM32 and use the LLD linker
|
||||||
|
* Revert "Build for WASM32 and use the LLD linker"
|
||||||
|
* 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> Tue, 18 Nov 2025 13:32:25 -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
|
another-boids-in-rust (0.3.0-1.1) unstable; urgency=medium
|
||||||
|
|
||||||
|
|||||||
6
debian/control
vendored
6
debian/control
vendored
@@ -9,16 +9,18 @@ Build-Depends:
|
|||||||
pkg-config,
|
pkg-config,
|
||||||
libasound2-dev,
|
libasound2-dev,
|
||||||
libudev-dev,
|
libudev-dev,
|
||||||
|
rust-llvm,
|
||||||
Homepage: https://git.gelvin.dev/robert/boids
|
Homepage: https://git.gelvin.dev/robert/boids
|
||||||
Vcs-Git: https://git.gelvin.dev/robert/boids
|
Vcs-Git: https://git.gelvin.dev/robert/boids
|
||||||
Vcs-Browser: https://git.gelvin.dev/robert/boids
|
Vcs-Browser: https://git.gelvin.dev/robert/boids
|
||||||
Rules-Requires-Root: no
|
Rules-Requires-Root: no
|
||||||
|
|
||||||
Package: another-boids-in-rust
|
Package: boids-webserver
|
||||||
Architecture: any
|
Architecture: all
|
||||||
Depends:
|
Depends:
|
||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
${shlibs:Depends},
|
${shlibs:Depends},
|
||||||
|
python3,
|
||||||
Description: Another Boids implementation in Rust.
|
Description: Another Boids implementation in Rust.
|
||||||
Boids is a flocking algorithm. This one is built in Rust using the Bevy game
|
Boids is a flocking algorithm. This one is built in Rust using the Bevy game
|
||||||
engine.
|
engine.
|
||||||
|
|||||||
2
debian/gbp.conf
vendored
2
debian/gbp.conf
vendored
@@ -2,5 +2,5 @@
|
|||||||
compression = xz
|
compression = xz
|
||||||
compression-level = 9
|
compression-level = 9
|
||||||
upstream-tag = v%(version)s+vendor
|
upstream-tag = v%(version)s+vendor
|
||||||
debian-branch = deb/trixie
|
debian-branch = deb/trixie-web
|
||||||
|
|
||||||
|
|||||||
35
debian/patches/0004-Patch-Makefile-to-have-a-var-for-web-root.patch
vendored
Normal file
35
debian/patches/0004-Patch-Makefile-to-have-a-var-for-web-root.patch
vendored
Normal 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)/
|
||||||
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@@ -1,3 +1,4 @@
|
|||||||
0001-Alter-blake3-to-emit-Built-Using-info.patch
|
0001-Alter-blake3-to-emit-Built-Using-info.patch
|
||||||
0002-Use-pure-Rust-implementation-of-Blake3-parts.patch
|
0002-Use-pure-Rust-implementation-of-Blake3-parts.patch
|
||||||
0003-Use-mini-as-release-profile.patch
|
0003-Use-mini-as-release-profile.patch
|
||||||
|
0004-Patch-Makefile-to-have-a-var-for-web-root.patch
|
||||||
|
|||||||
45
debian/rules
vendored
45
debian/rules
vendored
@@ -1,27 +1,48 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
DH_VERBOSE = 1
|
||||||
DPKG_EXPORT_BUILDFLAGS = 1
|
|
||||||
include /usr/share/dpkg/default.mk
|
# export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||||
include /usr/share/rustc/architecture.mk
|
# DPKG_EXPORT_BUILDFLAGS = 1
|
||||||
export DEB_HOST_RUST_TYPE
|
|
||||||
export PATH:=/usr/share/cargo/bin:$(PATH)
|
# Remove because they're for normal builds, not "cross" builds, or what ever
|
||||||
export CARGO=/usr/share/cargo/bin/cargo
|
# WASM is considered to be. Sort-of a cross-compile, but it isn't self hosting,
|
||||||
|
# so I'm not sure what to call it.
|
||||||
|
# include /usr/share/dpkg/default.mk
|
||||||
|
# include /usr/share/rustc/architecture.mk
|
||||||
|
|
||||||
|
# finds package info and puts it in vars like DEB_VERSION_UPSTREAM
|
||||||
|
include /usr/share/dpkg/pkg-info.mk
|
||||||
|
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
|
||||||
|
CARGO=/usr/share/cargo/bin/cargo
|
||||||
export CARGO_HOME=$(CURDIR)/debian/cargo_home
|
export CARGO_HOME=$(CURDIR)/debian/cargo_home
|
||||||
export CARGO_REGISTRY=$(CURDIR)/debian/cargo_registry
|
CARGO_REGISTRY=$(CURDIR)/debian/cargo_registry
|
||||||
export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)
|
export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)
|
||||||
|
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
|
||||||
|
|
||||||
|
WEBROOT=/usr/share/boids/
|
||||||
|
export WEBROOT
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@ --buildsystem=cargo
|
dh $@
|
||||||
|
|
||||||
execute_after_dh_auto_clean:
|
execute_after_dh_auto_clean:
|
||||||
$(CARGO) clean
|
# $(CARGO) clean
|
||||||
rm -rf $(CARGO_HOME)
|
rm -rf $(CARGO_HOME)
|
||||||
rm -rf $(CARGO_REGISTRY)
|
rm -rf $(CARGO_REGISTRY)
|
||||||
rm -f debian/cargo-checksum.json
|
rm -f debian/cargo-checksum.json
|
||||||
|
|
||||||
execute_before_dh_auto_configure:
|
override_dh_auto_configure:
|
||||||
$(CARGO) prepare-debian $(CARGO_REGISTRY) --link-from-system
|
$(CARGO) prepare-debian $(CARGO_REGISTRY) --link-from-system
|
||||||
rm -f Cargo.lock
|
|
||||||
touch debian/cargo-checksum.json
|
touch debian/cargo-checksum.json
|
||||||
|
# patch cargo_home config to use lld with wasm, otherwise the build fails
|
||||||
|
echo "\n[target.wasm32-unknown-unknown]" >> debian/cargo_home/config.toml
|
||||||
|
cat debian/cargo_home/config.toml | sed "s/linker=[^']\+/linker=rust-lld/" | grep "^rustflags = " >> debian/cargo_home/config.toml
|
||||||
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user