#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export HOME=/tmp include /usr/share/dpkg/pkg-info.mk %: dh $@ PRESETS=es2015 ROLLUP?=rollup --verbose ROLLUP_ENV=BABEL_PRESET=es2015 MAKE_STAGED_DIR=set -e;mkdir -p $1;cp -r src $1;cp -r browser $1;cp -r bin $1;cp package.json $1;cp rollup.config.js $1 SRC_SRC=$(shell find src -name '*' | LC_ALL=C sort) SRC_BIN=$(shell find bin -name '*' | LC_ALL=C sort) SRC_BROWSER=$(shell find browser -name '*' | LC_ALL=C sort) SRC_ALL=$(SRC_SRC) $(SRC_BIN) $(SRC_BROWSER) package.json rollup.config.js stage1/build.stamp: $(SRC_ALL) $(call MAKE_STAGED_DIR,$(dir $@)) cd $(dir $@) && $(ROLLUP_ENV) $(ROLLUP) -c chmod +x $(dir $@)/bin/rollup touch $@ stage2/build.stamp: stage1/build.stamp $(call MAKE_STAGED_DIR,$(dir $@)) cd $(dir $@) && $(ROLLUP_ENV) node ../$(dir $<)/bin/rollup --verbose -c chmod +x $(dir $@)/bin/rollup touch $@ stage3/build.stamp: stage2/build.stamp $(call MAKE_STAGED_DIR,$(dir $@)) cd $(dir $@) && $(ROLLUP_ENV) node ../$(dir $<)/bin/rollup --verbose -c chmod +x $(dir $@)/bin/rollup touch $@ override_dh_auto_build: stage3/build.stamp override_dh_fixperms: dh_fixperms chmod +x debian/rollup/usr/lib/nodejs/rollup/bin/rollup override_dh_auto_clean: rm -rf dist rm -f bin/rollup rm -rf stage*