File: rules

package info (click to toggle)
node-timeago.js 3.0.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 472 kB
  • sloc: makefile: 15
file content (24 lines) | stat: -rwxr-xr-x 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
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk

# -*- makefile -*-

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

%:
	dh $@ --with nodejs

override_dh_auto_build:
	mkdir dist
	cp src/timeago.js dist
	sed -i "s/%%GULP_INJECT_VERSION%%/$(DEB_VERSION_UPSTREAM)/" dist/timeago.js
	webpack
	if [ -e /usr/bin/uglifyjs ]; then \
		uglifyjs dist/timeago.js > dist/timeago.min.js; \
	else \
		/usr/lib/nodejs/uglify-js/bin/uglifyjs dist/timeago.js > dist/timeago.min.js; \
	fi

override_dh_auto_clean:
	rm -rf dist