#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ override_dh_auto_configure: ifeq (,$(findstring nocheck,$(DEB_BUILD_PROFILES))) mkdir -p node_modules/chai node_modules/promise-polyfill ln -sf $(CURDIR)/debian/missing-sources/mocha-phantomjs-core/ ./node_modules/ ln -sf /usr/lib/nodejs/mocha ./node_modules/ # promise-polyfill not in Debian, use es6-promise ln -sf /usr/lib/nodejs/es6-promise/dist/es6-promise.js ./node_modules/promise-polyfill/promise.js # Build our own browserified chai from chai's node modules # TODO: ideally this should be fixed in the chai package, file them a bug NODE_PATH=/usr/lib/nodejs browserify-lite /usr/lib/nodejs/chai/index.js --outfile node_modules/chai/chai.js --standalone chai # this is needed to work around a node-browserify-lite deficiency, for test-worker.html to work sed -i -e '1,10s/window/this/g' node_modules/chai/chai.js endif override_dh_auto_build: #uglifyjs -o fetch.min.js fetch.js cp fetch.js fetch.min.js override_dh_auto_test: