2020-08-06 14:39:33 +00:00
|
|
|
# Copyright 2020 Oliver Smith
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2020-08-10 17:49:09 +00:00
|
|
|
USERCHROME_FILES := $(sort $(wildcard src/userChrome/*.css))
|
2020-08-06 13:42:19 +00:00
|
|
|
HOMEPAGE_FILES := head.html distro_links.html bottom.html
|
|
|
|
DISTRO := postmarketOS
|
2020-08-06 13:52:51 +00:00
|
|
|
DESTDIR :=
|
2020-08-20 11:23:27 +00:00
|
|
|
FIREFOX_DIR := /usr/lib/firefox
|
2020-08-06 13:30:02 +00:00
|
|
|
|
2020-08-06 13:52:51 +00:00
|
|
|
all: out/home.html out/userChrome.css
|
2020-08-06 13:30:02 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf out
|
|
|
|
out:
|
|
|
|
mkdir out
|
|
|
|
|
2020-08-06 13:42:19 +00:00
|
|
|
out/home.html: src/homepage/*.html out
|
|
|
|
( cd src/homepage; cat $(HOMEPAGE_FILES) ) > $@.temp
|
|
|
|
sed "s/@DISTRO@/$(DISTRO)/g" "$@.temp" > "$@"
|
|
|
|
rm "$@.temp"
|
2020-08-06 13:30:02 +00:00
|
|
|
|
2020-08-10 17:49:09 +00:00
|
|
|
out/userChrome.css: $(USERCHROME_FILES) out
|
|
|
|
cat $(USERCHROME_FILES) > $@
|
2020-08-06 13:30:02 +00:00
|
|
|
|
2020-08-06 14:25:22 +00:00
|
|
|
install: all
|
2020-08-06 13:52:51 +00:00
|
|
|
install -Dm644 src/policies.json \
|
|
|
|
"$(DESTDIR)/etc/firefox/policies/policies.json"
|
2020-08-06 14:25:22 +00:00
|
|
|
install -Dm644 src/prefs.js \
|
2020-08-20 11:23:27 +00:00
|
|
|
"$(DESTDIR)/$(FIREFOX_DIR)/defaults/pref/mobile-config.js"
|
2020-08-06 13:52:51 +00:00
|
|
|
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"
|
2020-08-06 14:25:22 +00:00
|
|
|
install -Dm755 "src/mobile-config-firefox.sh" \
|
2020-08-07 21:10:52 +00:00
|
|
|
"$(DESTDIR)/usr/mobile-config/bin/firefox"
|
|
|
|
install -Dm755 "src/mobile-config-path.sh" \
|
|
|
|
"$(DESTDIR)/etc/profile.d/mobile-config-path.sh"
|
2020-08-06 13:52:51 +00:00
|
|
|
|
|
|
|
.PHONY: all clean install
|