File: rules

package info (click to toggle)
strophejs 1.2.14+dfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 736 kB
  • sloc: python: 179; makefile: 95
file content (29 lines) | stat: -rwxr-xr-x 934 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
#!/usr/bin/make -f

RJS ?= /usr/lib/nodejs/requirejs/r.js
ALMOND ?= /usr/lib/nodejs/almond/almond.js

STROPHE=strophe.js
STROPHE_MIN=strophe.min.js
STROPHE_LIGHT=strophe-no-polyfill.js

DEB_UPSTREAM_VERSION ?= $(shell dpkg-parsechangelog \
	| sed -rne 's/^Version: ([0-9.]+)[-+].*$$/\1/p')

%:
	dh $@

override_dh_auto_build:
	node $(RJS) -o build.js name=$(ALMOND) insertRequire=strophe-polyfill include=strophe-polyfill out=$(STROPHE_MIN)
	sed -i "s/@VERSION@/$(DEB_UPSTREAM_VERSION)/" $(STROPHE_MIN)
	node $(RJS) -o build.js name=$(ALMOND) optimize=none insertRequire=strophe-polyfill include=strophe-polyfill out=$(STROPHE)
	sed -i "s/@VERSION@/$(DEB_UPSTREAM_VERSION)/" $(STROPHE)
	node $(RJS) -o build.js name=$(ALMOND) optimize=none out=$(STROPHE_LIGHT)
	sed -i "s/@VERSION@/$(DEB_UPSTREAM_VERSION)/" $(STROPHE_LIGHT)

override_dh_auto_test:
	echo "Skip dh_auto_test"

override_dh_auto_clean:
	dh_auto_clean
	rm -f strophe*.js