#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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

export JAVA_HOME=/usr/lib/jvm/default-java

%:
	dh $@

get-orig-source:
	uscan --force-download --rename

override_dh_auto_test-indep:

override_dh_auto_build:
	mkdir -p src/main/resources/web/lib
	# Floodlight statically links these JS files into the floodlight jar archive
	# which is why they are build-depends and not runtime depends.
	ln -s /usr/share/javascript/backbone/backbone.min.js src/main/resources/web/lib/backbone-min.js
	ln -s /usr/share/javascript/jquery/jquery.min.js src/main/resources/web/lib
	ln -s /usr/share/javascript/underscore/underscore.min.js src/main/resources/web/lib/underscore-min.js
	ln -s /usr/share/javascript/twitter-bootstrap/js/bootstrap-alert.js src/main/resources/web/lib
	ln -s /usr/share/javascript/twitter-bootstrap/js/bootstrap-dropdown.js src/main/resources/web/lib
	yui-compressor debian/misc/d3.v2.js > src/main/resources/web/lib/d3.v2.min.js
	dh_auto_build

override_dh_auto_clean:
	rm -f src/main/resources/web/lib/*.js
	dh_auto_clean
