fenix-fox/Makefile

48 lines
1.6 KiB
Makefile
Raw Normal View History

2021-05-20 22:06:56 +02:00
# Copyright 2021 Oliver Smith
2020-08-06 16:39:33 +02:00
# SPDX-License-Identifier: GPL-3.0-or-later
HEADER_FILE := src/common/header.css
USERCHROME_FILES := $(HEADER_FILE) $(sort $(wildcard src/userChrome/*.css))
USERCONTENT_FILES := $(HEADER_FILE) $(sort $(wildcard src/userContent/*.css))
HOMEPAGE_FILES := head.html distro_links.html bottom.html
DISTRO := postmarketOS
2020-08-06 15:52:51 +02:00
DESTDIR :=
FIREFOX_DIR := /usr/lib/firefox
FIREFOX_CONFIG_DIR := /etc/firefox
2020-08-06 15:30:02 +02:00
2021-05-15 20:33:29 +02:00
all: out/home.html out/userChrome.css out/userContent.css
2020-08-06 15:30:02 +02:00
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"
2020-08-06 15:30:02 +02:00
out/userChrome.css: $(USERCHROME_FILES) out
cat $(USERCHROME_FILES) > $@
2020-08-06 15:30:02 +02:00
2021-05-15 20:33:29 +02:00
out/userContent.css: $(USERCONTENT_FILES) out
cat $(USERCONTENT_FILES) > $@
install: all
2020-08-06 15:52:51 +02:00
install -Dm644 src/policies.json \
"$(DESTDIR)/$(FIREFOX_CONFIG_DIR)/policies/policies.json"
install -Dm644 src/mobile-config-prefs.js \
"$(DESTDIR)/$(FIREFOX_DIR)/defaults/pref/mobile-config-prefs.js"
install -Dm644 src/mobile-config-autoconfig.js \
"$(DESTDIR)/$(FIREFOX_DIR)/mobile-config-autoconfig.js"
2020-08-06 15:52:51 +02: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"
2021-05-15 20:33:29 +02:00
install -Dm644 "out/userContent.css" \
"$(DESTDIR)/etc/mobile-config-firefox/userContent.css"
2021-06-11 15:52:43 +02:00
install -Dm644 org.postmarketos.mobile_config_firefox.metainfo.xml \
"$(DESTDIR)/usr/share/metainfo/org.postmarketos.mobile_config_firefox.metainfo.xml"
2020-08-06 15:52:51 +02:00
.PHONY: all clean install