#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

js-compressor := $(or $(notdir $(shell which uglifyjs)),yui-compressor)

%:
	dh $@

override_dh_auto_clean:
	rm -rf debian/build

override_dh_auto_build:
	dh_auto_build
	if [ ! -d debian/build ]; \
	then mkdir debian/build; \
	fi; \
	do \
		cp lodash.js debian/build/; \
		$(js-compressor)  -o debian/build/$$(basename lodash .js).min.js lodash.js; \
	done
