diff options
author | Roland Reichwein <rr@reichwein.it> | 2018-02-28 09:35:07 +0100 |
---|---|---|
committer | Roland Reichwein <rr@reichwein.it> | 2018-02-28 09:35:07 +0100 |
commit | bc9181917182e27324ff0437cf0d10abd91fa581 (patch) | |
tree | 4c3141f0ab45235fc7bc2492f5090a96b3f11dfe /Makefile | |
parent | 1fb8bf91a6a796c307e31338cc9b850c41d6dd6d (diff) |
Compatibility for different build OSes
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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 |