File: rules

package info (click to toggle)
libjs-fetch 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 232 kB
  • sloc: makefile: 26
file content (27 lines) | stat: -rwxr-xr-x 1,043 bytes parent folder | download
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
#!/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: