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

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export HOME=/tmp
export NODE_PATH=node_modules

include /usr/share/dpkg/pkg-info.mk

%:
	dh $@

override_dh_auto_build:
	dh_auto_build
	npm install rollup-plugin-buble rollup-plugin-node-resolve \
	magic-string rollup-plugin-commonjs
	echo $(DEB_VERSION) > .commithash \
&& rollup -c \
&& rollup -c rollup.config.cli.js
	sed -i 's/..\/dist\/rollup.js/rollup/' bin/rollup
#workaround for likely rollup-pluginutils bug
	sed -i 's/src\/create/create/' dist/rollup.js

override_dh_auto_clean:
	dh_auto_clean
	rm -rf dist/ bin/rollup node_modules .commithash

#override_dh_auto_test:



