summaryrefslogtreecommitdiffhomepage
path: root/plugins/webbox/Makefile
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-04-15 15:35:58 +0200
committerRoland Reichwein <mail@reichwein.it>2020-04-15 15:35:58 +0200
commit1ce0bb7ad50129fbab6c0a75f18eee6149ca1be3 (patch)
tree4ef719b513a8128613d3965fa27b1892f2fd5904 /plugins/webbox/Makefile
parent2281fce9ada9b8a93f1ec5ebfe54b88b480e88e6 (diff)
Minify css/html/js
Diffstat (limited to 'plugins/webbox/Makefile')
-rw-r--r--plugins/webbox/Makefile16
1 files changed, 10 insertions, 6 deletions
diff --git a/plugins/webbox/Makefile b/plugins/webbox/Makefile
index 2ddec0e..1850018 100644
--- a/plugins/webbox/Makefile
+++ b/plugins/webbox/Makefile
@@ -94,14 +94,18 @@ googletest/src/%.o: googletest/src/%.cc
ADD_DEP=Makefile
install:
- mkdir -p $(DESTDIR)/usr/bin
- cp webserver $(DESTDIR)/usr/bin
-
mkdir -p $(DESTDIR)/usr/lib/webserver/plugins
- mkdir -p $(DESTDIR)/usr/local/lib/webserver/plugins
+ cp $(PROJECTNAME).so $(DESTDIR)/usr/lib/webserver/plugins
+
+ mkdir -p $(DESTDIR)/var/www/webbox
+ cp -r html/* $(DESTDIR)/var/www/webbox/
+
+ # Minify, conditionally
+ command -v uglifyjs && uglifyjs html/webbox.js -m -c > $(DESTDIR)/var/www/webbox/webbox.js || true
+ command -v htmlmin && \
+ htmlmin html/index.html $(DESTDIR)/var/www/webbox/index.html || true
+ command -v cleancss && cleancss -o $(DESTDIR)/var/www/webbox/webbox.css html/webbox.css || true
- mkdir -p $(DESTDIR)/etc
- cp webserver.conf $(DESTDIR)/etc/webserver.conf
# misc ---------------------------------------------------
deb: