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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
js-compressor := $(or $(notdir $(shell which uglifyjs)),yui-compressor)
# This has to be exported to make some magic below work.
export DH_OPTIONS
%:
dh $@ --with nodejs
override_dh_auto_test-arch:
tap test/unit
override_dh_install-arch:
dh_install
chmod 644 $(CURDIR)/debian/node-websocket/usr/lib/nodejs/websocket/build/Release/*.node
override_dh_shlibdeps:
dpkg-shlibdeps \
-T$(CURDIR)/debian/node-websocket.substvars \
$(CURDIR)/debian/node-websocket/usr/lib/nodejs/websocket/build/Release/*.node
override_dh_strip:
strip \
--remove-section=.comment \
--remove-section=.note \
--strip-unneeded \
$(CURDIR)/debian/node-websocket/usr/lib/nodejs/websocket/build/Release/*.node
override_dh_auto_clean:
rm -rf debian/build
rm -rf build
dh_auto_clean
override_dh_auto_build-indep:
dh_auto_build
for _FILE in index.js lib/*.js vendor/*.js ; \
do \
install -D $${_FILE} debian/build/$${_FILE}; \
$(js-compressor) -o debian/build/$$(dirname $${_FILE})/$$(basename $${_FILE} .js).min.js $${_FILE}; \
done
# Uscan will read debian/watch, grab the correct version, repack and leave
# it in the current directory
get-orig-source:
uscan --no-conf --force-download --rename --repack --download-current-version --destdir=.
|