1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@
override_dh_auto_build:
cp debian/missing-sources/punycode.js .
$(MAKE) -f debian/main.mk all
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# Create dependency symlinks to Debian system packages
cp -aL /usr/lib/nodejs/mocha tests/mocha/lib
ln -s /usr/lib/nodejs/expect.js/index.js tests/mocha/lib/expect.js
ln -s /usr/share/javascript/jquery/jquery.js tests/assets/jquery-1.6.2.js
cp debian/missing-sources/mocha-phantomjs-core.js .
cp debian/missing-sources/browser-shim.js .
# The javascript ecosystem is *SO STUPID!*
mkdir -p node_modules/bluebird/js/browser/
ln -s /usr/share/javascript/es6-promise/es6-promise.js node_modules/bluebird/js/browser/bluebird.js
# Debian phantomjs can't work headless, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817277
# Furthermore the tests fail unless html2canvas has a big enough screen to draw on
xvfb-run --server-args="-screen 0 1280x800x24" \
$(MAKE) -f debian/main.mk check
endif
override_dh_auto_clean:
$(MAKE) -f debian/main.mk clean
rm -rf punycode.js mocha-phantomjs-core.js browser-shim.js \
node_modules tests/mocha/lib tests/assets/jquery-1.6.2.js
|