2023-04-06 10:49:21 +00:00
|
|
|
# Copyright 2023 Oliver Smith
|
2022-01-30 10:48:42 +00:00
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
2020-08-06 14:39:33 +00:00
|
|
|
|
2021-05-20 15:21:43 +00:00
|
|
|
HEADER_FILE := src/common/header.css
|
|
|
|
USERCHROME_FILES := $(HEADER_FILE) $(sort $(wildcard src/userChrome/*.css))
|
|
|
|
USERCONTENT_FILES := $(HEADER_FILE) $(sort $(wildcard src/userContent/*.css))
|
2020-08-06 13:52:51 +00:00
|
|
|
DESTDIR :=
|
2020-08-20 11:23:27 +00:00
|
|
|
FIREFOX_DIR := /usr/lib/firefox
|
2021-07-15 14:12:23 +00:00
|
|
|
FIREFOX_CONFIG_DIR := /etc/firefox
|
2020-08-06 13:30:02 +00:00
|
|
|
|
2023-04-06 10:49:21 +00:00
|
|
|
all: out/userChrome.files out/userContent.files
|
2020-08-06 13:30:02 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf out
|
|
|
|
out:
|
|
|
|
mkdir out
|
|
|
|
|
2023-04-06 10:49:21 +00:00
|
|
|
out/userChrome.files: $(USERCHROME_FILES) out
|
|
|
|
for i in $(USERCHROME_FILES); do \
|
|
|
|
echo "$$i" | cut -d/ -f 2-; \
|
|
|
|
done > $@
|
2020-08-06 13:30:02 +00:00
|
|
|
|
2023-04-06 10:49:21 +00:00
|
|
|
out/userContent.files: $(USERCONTENT_FILES) out
|
|
|
|
for i in $(USERCONTENT_FILES); do \
|
|
|
|
echo "$$i" | cut -d/ -f 2-; \
|
|
|
|
done > $@
|
2021-05-15 18:33:29 +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 \
|
2021-07-15 14:12:23 +00:00
|
|
|
"$(DESTDIR)/$(FIREFOX_CONFIG_DIR)/policies/policies.json"
|
2020-08-20 19:49:27 +00:00
|
|
|
install -Dm644 src/mobile-config-prefs.js \
|
|
|
|
"$(DESTDIR)/$(FIREFOX_DIR)/defaults/pref/mobile-config-prefs.js"
|
2020-08-20 11:20:42 +00:00
|
|
|
install -Dm644 src/mobile-config-autoconfig.js \
|
|
|
|
"$(DESTDIR)/$(FIREFOX_DIR)/mobile-config-autoconfig.js"
|
2023-04-06 10:49:21 +00:00
|
|
|
install -Dm644 "out/userChrome.files" \
|
|
|
|
-t "$(DESTDIR)/etc/mobile-config-firefox"
|
|
|
|
install -Dm644 "out/userContent.files" \
|
|
|
|
-t "$(DESTDIR)/etc/mobile-config-firefox"
|
|
|
|
for dir in common userChrome userContent; do \
|
|
|
|
for i in src/$$dir/*.css; do \
|
|
|
|
install \
|
|
|
|
-Dm644 \
|
|
|
|
"$$i" \
|
|
|
|
-t "$(DESTDIR)/etc/mobile-config-firefox/$$dir"; \
|
|
|
|
done; \
|
|
|
|
done
|
2021-06-11 13:52:43 +00:00
|
|
|
install -Dm644 org.postmarketos.mobile_config_firefox.metainfo.xml \
|
|
|
|
"$(DESTDIR)/usr/share/metainfo/org.postmarketos.mobile_config_firefox.metainfo.xml"
|
2020-08-06 13:52:51 +00:00
|
|
|
|
|
|
|
.PHONY: all clean install
|