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

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

%:
	dh $@

override_dh_auto_install:
	slimit -m \
		jquery.colorbox.js \
		> \
		debian/libjs-jquery-colorbox/usr/share/javascript/jquery-colorbox/jquery.colorbox-min.js

override_dh_installexamples:
	dh_installexamples

	find debian/libjs-jquery-colorbox/usr/share/doc/libjs-jquery-colorbox/examples \
		-name "*.html" \
		-type f \
		-exec sed \
		-i 's@script src=".*jquery.min.js"@script src="/usr/share/javascript/jquery/jquery.min.js"@g;s@script src="../jquery.colorbox.js"@script src="/usr/share/javascript/jquery-colorbox/jquery.colorbox.js"@g' \
		'{}' \;

override_dh_installchangelogs:
	dh_installchangelogs README.md
