diff options
author | Debian Live user <user@debian-BULLSEYE-live-builder-AMD64> | 2023-04-28 21:47:08 -0400 |
---|---|---|
committer | Debian Live user <user@debian-BULLSEYE-live-builder-AMD64> | 2023-04-28 21:47:08 -0400 |
commit | b00a5efe39bf1195ef0c8037093df2604afa911d (patch) | |
tree | f1869639f3cc74f6e9eb7d7efc275eaec78b7a53 /Makefile | |
parent | 421d0b23592c1e5838c057813b5615581494c225 (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-- | Makefile | 34 |
1 files changed, 26 insertions, 8 deletions
@@ -1,14 +1,32 @@ | |||
1 | BINDIR = /usr/local/bin | 1 | BINDIR = /usr/local/bin |
2 | BINARIES = firestart firestartx $(addprefix src/,sliceweasel.lib.sh firefox-io-slayer ioslay-firefox) | 2 | BINARIES = firestart firestartx $(addprefix src/,sliceweasel.lib.sh firefox-io-slayer-redux ioslay-firefox) |
3 | SUDO != [ "$$(id -u)" = 0 ] || echo sudo | ||
4 | 3 | ||
5 | .PHONY: install install-bin | 4 | ifeq ($(shell id -u),0) |
5 | # Prevent running as root | ||
6 | .PHONY: install-bin | ||
7 | all: | ||
8 | install-bin: | ||
9 | install $(BINARIES) -t $(BINDIR) | ||
10 | else | ||
11 | |||
12 | .PHONY: install install-bin start stop restart | ||
13 | |||
14 | firefox@.service: src/firefox@.service.in src/generate-firefox-unit | ||
15 | ./src/generate-firefox-unit $< $@ | ||
16 | |||
17 | install: install-bin firefox@.service | ||
18 | systemctl --user link ./firefox@.service | ||
19 | systemctl --user link ./src/ioslay@.service | ||
20 | systemctl --user daemon-reload | ||
21 | |||
22 | start: install | ||
23 | systemctl --user start "firefox@$$DISPLAY" | ||
6 | 24 | ||
7 | install: install-bin | 25 | stop: |
8 | systemctl --user restart ioslay | 26 | systemctl --user stop firefox@$$DISPLAY ioslay@$$DISPLAY |
9 | 27 | ||
10 | uninstall-units: | 28 | restart: stop start |
11 | systemctl --user disable ioslay | ||
12 | 29 | ||
13 | install-bin: | 30 | install-bin: |
14 | $(SUDO) install $(BINARIES) -t $(BINDIR) | 31 | sudo $(MAKE) -$(MAKEFLAGS) $@ |
32 | endif | ||