htraf-packaging / Makefile

.PHONY: demo dist

# The connection URI for regression databases.
SQLITE_REGRESS_DB?=sqlite:///build/regress/regress-sqlite/htsql_regress.sqlite
PGSQL_ADDRESS?=${PGHOST}$(if ${PGPORT},:${PGPORT})
PGSQL_REGRESS_DB?=pgsql://htsql_regress:secret@${PGSQL_ADDRESS}/htsql_regress

# The HTTP server address.
HTSQL_HOST?=localhost
HTSQL_PORT?=8080

demo:
	python demo/serve.py ${PGSQL_REGRESS_DB} ${HTSQL_HOST} ${HTSQL_PORT}

dist:
	# Create build directories
	rm -rf build
	mkdir -p build/dist build/tmp/htraf
	mkdir -p build/tmp/htraf/js/lib build/tmp/htraf/css/lib
	# HTRAF itself
	cp htraf/htraf.js build/tmp/htraf
	cp htraf/js/htraf.*.js build/tmp/htraf/js
	cp htraf/css/htraf*.css build/tmp/htraf/css
	cp -r htraf/img build/tmp/htraf
	# JSON-js
	wget -P build/tmp -q --no-check-certificate \
		https://raw.github.com/douglascrockford/JSON-js/master/json2.js
	cp build/tmp/json2.js build/tmp/htraf/js/lib
	# JQuery
	wget -P build/tmp -q http://code.jquery.com/jquery-1.4.3.min.js
	cp build/tmp/jquery-1.4.3.min.js build/tmp/htraf/js/lib
	# JQPlot
	wget -P build/tmp -q --no-check-certificate \
		http://bitbucket.org/cleonello/jqplot/downloads/jquery.jqplot.0.9.7r629.tar.gz
	mkdir build/tmp/jqplot
	tar -xz -C build/tmp/jqplot -f build/tmp/jquery.jqplot.0.9.7r629.tar.gz
	mkdir -p build/tmp/htraf/js/lib/jqplot/plugins
	cp build/tmp/jqplot/dist/excanvas.min.js build/tmp/htraf/js/lib/jqplot
	cp build/tmp/jqplot/dist/jquery.jqplot.min.js build/tmp/htraf/js/lib/jqplot
	cp build/tmp/jqplot/dist/plugins/*.min.js build/tmp/htraf/js/lib/jqplot/plugins
	cp build/tmp/jqplot/dist/jquery.jqplot.min.css build/tmp/htraf/css/lib
	# blockUI
	wget -P build/tmp -q --no-check-certificate \
		https://raw.github.com/malsup/blockui/master/jquery.blockUI.js
	cp build/tmp/jquery.blockUI.js build/tmp/htraf/js/lib
	# JQuery UI
	wget -P build/tmp -q http://jquery-ui.googlecode.com/files/jquery-ui-1.8.5.zip
	wget -P build/tmp -q http://jquery-ui.googlecode.com/files/jquery-ui-themes-1.8.5.zip
	unzip -q build/tmp/jquery-ui-1.8.5.zip -d build/tmp
	unzip -q build/tmp/jquery-ui-themes-1.8.5.zip -d build/tmp
	cp build/tmp/jquery-ui-1.8.5/ui/minified/jquery-ui.min.js build/tmp/htraf/js/lib/jquery-ui-1.8.5.custom.min.js
	cp build/tmp/jquery-ui-themes-1.8.5/themes/base/jquery-ui.css build/tmp/htraf/css/lib/jquery-ui-1.8.5.custom.css
	cp -r build/tmp/jquery-ui-themes-1.8.5/themes/base/images/ build/tmp/htraf/css/lib
	# Pack the bundle
	cd build/tmp; zip -rq ../dist/htraf-bundle.zip htraf
	rm -rf build/tmp
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.