49698e65c5
Instead of trying to override the .desktop entry of Firefox by installing the custom one and adjusting XDG_DATA_DIRS, just wrap the firefox binary directly and adjust PATH. The former did not work with Phosh, and on second thought, wrapping the binary is what's really necessary. The launcher would have been just another useless layer.
38 lines
1.1 KiB
Makefile
38 lines
1.1 KiB
Makefile
# Copyright 2020 Oliver Smith
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
USERCHROME_FILES := root.css urlbar.css appMenu.css
|
|
HOMEPAGE_FILES := head.html distro_links.html bottom.html
|
|
DISTRO := postmarketOS
|
|
DESTDIR :=
|
|
|
|
all: out/home.html out/userChrome.css
|
|
|
|
clean:
|
|
rm -rf out
|
|
out:
|
|
mkdir out
|
|
|
|
out/home.html: src/homepage/*.html out
|
|
( cd src/homepage; cat $(HOMEPAGE_FILES) ) > $@.temp
|
|
sed "s/@DISTRO@/$(DISTRO)/g" "$@.temp" > "$@"
|
|
rm "$@.temp"
|
|
|
|
out/userChrome.css: src/userChrome/*.css out
|
|
( cd src/userChrome; cat $(USERCHROME_FILES) ) > $@
|
|
|
|
install: all
|
|
install -Dm644 src/policies.json \
|
|
"$(DESTDIR)/etc/firefox/policies/policies.json"
|
|
install -Dm644 src/prefs.js \
|
|
"$(DESTDIR)/usr/lib/firefox/defaults/pref/mobile-config.js"
|
|
install -Dm644 "out/home.html" \
|
|
"$(DESTDIR)/usr/share/mobile-config-firefox/home.html"
|
|
install -Dm644 "out/userChrome.css" \
|
|
"$(DESTDIR)/etc/mobile-config-firefox/userChrome.css"
|
|
install -Dm755 "src/mobile-config-firefox.sh" \
|
|
"$(DESTDIR)/usr/mobile-config/bin/firefox"
|
|
install -Dm755 "src/mobile-config-path.sh" \
|
|
"$(DESTDIR)/etc/profile.d/mobile-config-path.sh"
|
|
|
|
.PHONY: all clean install
|