File: rules

package info (click to toggle)
node-jschardet 2.2.1%2Bdfsg%2B~1.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,040 kB
  • sloc: javascript: 7,020; makefile: 19
file content (30 lines) | stat: -rwxr-xr-x 775 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
#!/usr/bin/make -f
# -*- makefile -*-

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

include /usr/share/dpkg/pkg-info.mk

CHARDET_VERSION=$(shell a=$(DEB_VERSION) && echo $${a#*~})

xx:
	echo $(CHARDET_VERSION)

%:
	dh $@

override_dh_auto_build:
	cp chardet/package.json debian/
	perl -i -pe 's/0.0.0-development/$(CHARDET_VERSION)/' chardet/package.json
	dh_auto_build --buildsystem=nodejs
	ln -s /usr/share/nodejs/buffer .
	webpack --config debian/webpack.config.js --output-library=jschardet \
	--entry index.js --output dist/jschardet.js
	uglifyjs.terser dist/jschardet.js -o dist/jschardet.min.js

override_dh_auto_clean:
	if test -e debian/package.json; then \
		mv debian/package.json chardet/package.json; \
	fi
	dh_auto_clean --buildsystem=nodejs