| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
|
| 4 |
# Uncomment this to turn on verbose mode. |
| 5 |
#export DH_VERBOSE=1 |
| 6 |
|
| 7 |
js-compressor := $(or $(notdir $(shell which uglifyjs)),yui-compressor) |
| 8 |
|
| 9 |
# This has to be exported to make some magic below work. |
| 10 |
export DH_OPTIONS |
| 11 |
|
| 12 |
|
| 13 |
%: |
| 14 |
dh $@ |
| 15 |
|
| 16 |
override_dh_auto_build: |
| 17 |
dh_auto_build |
| 18 |
if [ ! -d debian/build ]; \ |
| 19 |
then mkdir debian/build; \ |
| 20 |
fi; \ |
| 21 |
for _FILE in index.js ; \ |
| 22 |
do \ |
| 23 |
cp $${_FILE} debian/build/; \ |
| 24 |
cd debian/build/ && $(js-compressor) -o $$(basename $${_FILE} .js).min.js \ |
| 25 |
--source-map "filename=$$(basename $${_FILE} .js).min.js.map" $$(basename $${_FILE} .js).js; \ |
| 26 |
done |
| 27 |
|
| 28 |
override_dh_installdocs: |
| 29 |
dh_installdocs --link-doc=libjs-is-typedarray |