File: rules

package info (click to toggle)
node-browserify-lite 0.5.1%2B~cs7.1.5-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 820 kB
  • sloc: javascript: 1,424; makefile: 30; sh: 8
file content (48 lines) | stat: -rwxr-xr-x 1,532 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
42
43
44
45
46
47
48
#!/usr/bin/make -f
# -*- makefile -*-

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

%:
	dh $@

BROWSERIFY_LITE?=$(CURDIR)/cli.js
EXAMPLES_DIR=debian/examples.d

%.min.js: %.js
	cd $(dir $@) && terser $(notdir $<) --source-map -o $(notdir $@)

%.compress.js: %.js
	cd $(dir $@) && terser $(notdir $<) -m --source-map -o $(notdir $@)

$(EXAMPLES_DIR)/bundle.js: $(EXAMPLES_DIR)/main.js
	NODE_PATH=. $(BROWSERIFY_LITE) $< --outfile $@

$(EXAMPLES_DIR)/standalone.js: $(EXAMPLES_DIR)/main.js
	NODE_PATH=. $(BROWSERIFY_LITE) $< --standalone 'example' --outfile $@


EXAMPLES_DEST=$(EXAMPLES_DIR)/bundle.js $(EXAMPLES_DIR)/bundle.compress.js $(EXAMPLES_DIR)/bundle.min.js $(EXAMPLES_DIR)/standalone.js $(EXAMPLES_DIR)/standalone.min.js $(EXAMPLES_DIR)/standalone.compress.js

examples: $(EXAMPLES_DEST)

.PHONY: examples

ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
override_dh_auto_build: $(EXAMPLES_DEST)
	dh_auto_build --buildsystem=nodejs
	rollup -i rewrite-imports/src/index.js -f cjs -o rewrite-imports/dist/index.js
	rollup -i mk-dirs/src/sync.js -f cjs -o mk-dirs/sync.js
	rollup -i mk-dirs/src/async.js -f cjs -o mk-dirs/async.js
	help2man -N --no-discard-stderr \
		-n 'A simple bundler for your delicious modules' \
		--version-string=`pkgjs-pjson bundt/ version` ./bundt/index.js \
	 >bundt.1
endif


override_dh_fixperms:
	dh_fixperms
	chmod +x debian/node-browserify-lite/usr/share/nodejs/browserify-lite/cli.js
	chmod +x debian/node-browserify-lite/usr/share/nodejs/bundt/index.js