summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 12 insertions, 4 deletions
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