debian/rules
raw| 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 | %: |
| 10 | dh $@ |
| 11 | |
| 12 | override_dh_auto_build: |
| 13 | dh_auto_build |
| 14 | if [ ! -d debian/build ]; \ |
| 15 | then mkdir debian/build; \ |
| 16 | fi; \ |
| 17 | for _FILE in lib/*.js ; \ |
| 18 | do \ |
| 19 | cp $${_FILE} debian/build/; \ |
| 20 | $(js-compressor) -o debian/build/$$(basename $${_FILE} .js).min.js $${_FILE}; \ |
| 21 | done |