1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
ifndef UPVER
UPVER := $(shell dpkg-parsechangelog | grep ^Version | cut -d\ -f2 | cut -d+ -f1 | cut -d- -f1)
endif
%:
dh $@
override_dh_installchangelogs:
dh_installchangelogs -- CHANGELOG.md
override_dh_auto_build:
# Drop the need for node-banner, which is a tiny script and seems
# not worthy for inclusion in Debian.
[ -d build ] || mkdir build
echo "/* wax.js - $(UPVER) */" > build/header.js
dh_auto_build
override_dh_auto_clean:
dh_auto_clean
rm -rf build/ dist/
get-orig-source:
uscan --verbose \
--download-version $(UPVER) \
--force-download \
--rename \
--destdir .
tar xf wax.js_$(UPVER).orig.tar.gz
@echo Removing third-party embedded libs already in other packages
@rm -rf mapbox-wax-*/ext/html-sanitizer-bundle.js \
mapbox-wax-*/ext/html-sanitizer-min.js \
mapbox-wax-*/ext/images/ \
mapbox-wax-*/ext/leaflet* \
mapbox-wax-*/ext/modestmaps* \
mapbox-wax-*/ext/mustache* \
mapbox-wax-*/ext/OpenLayers* \
mapbox-wax-*/ext/reqwest* \
mapbox-wax-*/ext/polymaps*
@echo Downloading current version of html-sanitizer
@wget http://google-caja.googlecode.com/svn/trunk/src/com/google/caja/plugin/html-sanitizer.js
@echo Downloading revision 2832 of html4-defs.js
@wget http://google-caja.googlecode.com/svn-history/r2832/trunk/src/com/google/caja/plugin/html4-defs.js
@mv html4-defs.js mapbox-wax-*/ext/
@mv html-sanitizer.js mapbox-wax-*/ext/
@echo Removing _site
@rm -rf mapbox-wax-*/_site/
@echo Removing pre-compiled files
@rm -rf mapbox-wax-*/dist/
tar cf wax.js_$(UPVER)+ds2.orig.tar mapbox-wax-*/
gzip -9 wax.js_$(UPVER)+ds2.orig.tar
rm -rf mapbox-wax-*/ wax.js_$(UPVER).orig.tar.gz
|