File: rules

package info (click to toggle)
node-browserify-lite 0.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 192 kB
  • sloc: javascript: 723; makefile: 22
file content (40 lines) | stat: -rwxr-xr-x 1,103 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
#!/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 $@) && uglifyjs $(notdir $<) --verbose --source-map -o $(notdir $@)

%.compress.js: %.js
	cd $(dir $@) && uglifyjs $(notdir $<) -m --verbose --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
endif


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