Patch Makefile to have a var for web root
This commit is contained in:
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
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user