#!/usr/bin/make -f

%:
	dh $@ --builddirectory=.

override_dh_auto_build:
	# force rebuild of the Grammar:
	-rm src/Grammar/dist/Grammar.js src/Grammar/dist/Grammar.min.js
	# using a manually constructed JVM command line for
	# closure-compiler due to Debian bug 705565:
	make MINIFY_GCC="java -classpath /usr/share/java/closure-compiler.jar:/usr/share/java/args4j.jar:/usr/share/java/guava.jar:/usr/share/java/json.jar com.google.javascript.jscomp.CommandLineRunner"
	mv dist/JsSIP-*.min.js dist/JsSIP.min.js
	mv dist/JsSIP-*.js dist/JsSIP.js

# no make install support
override_dh_auto_install:
	true

