From bc9181917182e27324ff0437cf0d10abd91fa581 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Wed, 28 Feb 2018 09:35:07 +0100 Subject: Compatibility for different build OSes --- Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index cdb6910..9c9840f 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,11 @@ install: all mkdir -p $(DESTDIR)/var/www/webbox cp -r html/* $(DESTDIR)/var/www/webbox/ - # Minify - uglifyjs html/webbox.js -m -c > $(DESTDIR)/var/www/webbox/webbox.js - htmlmin html/index.html $(DESTDIR)/var/www/webbox/index.html - cleancss -o $(DESTDIR)/var/www/webbox/webbox.css html/webbox.css + # 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)/usr/lib/webbox cp src/query $(DESTDIR)/usr/lib/webbox/ @@ -22,8 +23,15 @@ deploy: all sudo service apache2 start deb: + # build binary deb package dpkg-buildpackage -us -uc -rfakeroot +deb-src: + dpkg-source -b . + +debs: deb-src + # TODO: build for different OSes + clean: make -C src clean dh_clean -- cgit v1.2.3