summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDebian Live user <user@debian-BULLSEYE-live-builder-AMD64>2023-04-28 21:47:08 -0400
committerDebian Live user <user@debian-BULLSEYE-live-builder-AMD64>2023-04-28 21:47:08 -0400
commitb00a5efe39bf1195ef0c8037093df2604afa911d (patch)
treef1869639f3cc74f6e9eb7d7efc275eaec78b7a53 /Makefile
parent421d0b23592c1e5838c057813b5615581494c225 (diff)
Got some new firefox launch code working.
Now it uses a template file parameterized on $DISPLAY. Unfortunately, this file needs to be generated dynamically on install in order to set the IO parameters. (Might use systemd edit system for this, actually.) The ioslayer is also parameterized and started by the firefox unit file. Needs a little cleanup / removal of old code.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 26 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index bcc1005..50adaed 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,32 @@
1BINDIR = /usr/local/bin 1BINDIR = /usr/local/bin
2BINARIES = firestart firestartx $(addprefix src/,sliceweasel.lib.sh firefox-io-slayer ioslay-firefox) 2BINARIES = firestart firestartx $(addprefix src/,sliceweasel.lib.sh firefox-io-slayer-redux ioslay-firefox)
3SUDO != [ "$$(id -u)" = 0 ] || echo sudo
4 3
5.PHONY: install install-bin 4ifeq ($(shell id -u),0)
5# Prevent running as root
6.PHONY: install-bin
7all:
8install-bin:
9 install $(BINARIES) -t $(BINDIR)
10else
11
12.PHONY: install install-bin start stop restart
13
14firefox@.service: src/firefox@.service.in src/generate-firefox-unit
15 ./src/generate-firefox-unit $< $@
16
17install: install-bin firefox@.service
18 systemctl --user link ./firefox@.service
19 systemctl --user link ./src/ioslay@.service
20 systemctl --user daemon-reload
21
22start: install
23 systemctl --user start "firefox@$$DISPLAY"
6 24
7install: install-bin 25stop:
8 systemctl --user restart ioslay 26 systemctl --user stop firefox@$$DISPLAY ioslay@$$DISPLAY
9 27
10uninstall-units: 28restart: stop start
11 systemctl --user disable ioslay
12 29
13install-bin: 30install-bin:
14 $(SUDO) install $(BINARIES) -t $(BINDIR) 31 sudo $(MAKE) -$(MAKEFLAGS) $@
32endif