File: rules

package info (click to toggle)
node-module-deps 6.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 792 kB
  • sloc: makefile: 27; sh: 16
file content (41 lines) | stat: -rwxr-xr-x 1,081 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@


ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
override_dh_auto_test:
	tap -R spec test/*.js
else
override_dh_auto_test:
	@echo '**********************************************************'
	@echo 'Skip test                  '
	@echo '**********************************************************'
endif

override_dh_fixperms:
	dh_fixperms
	chmod a+x debian/node-module-deps/usr/share/nodejs/module-deps/bin/cmd.js


example/output.json: example/deps.js
	node example/deps.js > example/output.json

ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
override_dh_installexamples: example/output.json
	dh_installexamples
        # patch example
	find $(CURDIR)/debian/node-module-deps/usr/share/doc/node-module-deps/examples/ -name '*.js' -exec \
		sed -i "s,require\s*[(]\s*'[.][.][^']*'\s*[)],require('module-deps'),g" {} \;
else
override_dh_installexamples:
endif

override_dh_auto_clean:
	dh_auto_clean
	rm -f example/output.json