Makefile: add install target

This commit is contained in:
Oliver Smith 2020-08-06 15:52:51 +02:00
parent 00db529a04
commit 016a9bb845
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -1,8 +1,9 @@
USERCHROME_FILES := root.css urlbar.css appMenu.css USERCHROME_FILES := root.css urlbar.css appMenu.css
HOMEPAGE_FILES := head.html distro_links.html bottom.html HOMEPAGE_FILES := head.html distro_links.html bottom.html
DISTRO := postmarketOS DISTRO := postmarketOS
DESTDIR :=
all: out/home.html out/policies.json out/prefs.js out/userChrome.css all: out/home.html out/userChrome.css
clean: clean:
rm -rf out rm -rf out
@ -14,13 +15,17 @@ out/home.html: src/homepage/*.html out
sed "s/@DISTRO@/$(DISTRO)/g" "$@.temp" > "$@" sed "s/@DISTRO@/$(DISTRO)/g" "$@.temp" > "$@"
rm "$@.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 out/userChrome.css: out src/userChrome/*.css
( cd src/userChrome; cat $(USERCHROME_FILES) ) > $@ ( 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