File: rules

package info (click to toggle)
node-node-forge 0.8.5~dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,340 kB
  • sloc: ansic: 229; python: 59; makefile: 26; xml: 7; sh: 6
file content (46 lines) | stat: -rwxr-xr-x 1,055 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

STEMS = forge forge.all prime.worker

# generate documentation unless nodoc requested
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
DOCS = README.html README.txt
endif

override_dh_auto_build: \
 $(patsubst %,debian/js/%.min.js.gz,$(STEMS)) $(DOCS)

# build and run testsuite
# * wrap with perl TAP harness
# TODO: build and and ship test library
override_dh_auto_test:
#	webpack --progress --config webpack-tests.config.js
	NODE_ENV=test prove --verbose \
		--exec "mocha --reporter=tap --timeout 30000" \
		tests/unit/index.js

# install select documentation with all binary packages
override_dh_installdocs:
	dh_installdocs -- README.md README.html

# build browser library
debian/js/%.js:
	webpack --progress
	mkdir -p debian/js
	cp -f dist/* debian/js/

# pre-compress for browser use
%.gz: %
	pigz --force --keep -11 -- $<
	brotli --force --keep --best -- $<

%.html: %.md
	pandoc --from gfm-raw_html --to html --standalone --output $@ $<

%.txt: %.md
	pandoc --from gfm-raw_html --to plain --output $@ $<

%:
	dh $@

.SECONDARY: