From 016a9bb8459c1142013aadef63ee0bb0775116d9 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Thu, 6 Aug 2020 15:52:51 +0200 Subject: [PATCH] Makefile: add install target --- Makefile | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index f7ba28f..ffdff32 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,9 @@ 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/policies.json out/prefs.js out/userChrome.css +all: out/home.html out/userChrome.css clean: rm -rf out @@ -14,13 +15,17 @@ out/home.html: src/homepage/*.html out sed "s/@DISTRO@/$(DISTRO)/g" "$@.temp" > "$@" rm "$@.temp" -out/policies.json: src/policies.json out - cat $< > $@ - -out/prefs.js: src/prefs.js out - cat $< > $@ - out/userChrome.css: out src/userChrome/*.css ( cd src/userChrome; cat $(USERCHROME_FILES) ) > $@ -.PHONY: all clean +install: + install -Dm644 src/policies.json \ + "$(DESTDIR)/etc/firefox/policies/policies.json" + install -Dm644 out/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" + +.PHONY: all clean install