File: rules

package info (click to toggle)
leaflet-image 0.4.0~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 640 kB
  • sloc: makefile: 31; sh: 6
file content (47 lines) | stat: -rwxr-xr-x 997 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
#!/usr/bin/make -f

STEM = leaflet-image

# generate documentation unless nodoc requested
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
DOCS = README.html README.txt
endif

%:
	dh $@

# optimize JavaScript for browser use
# * include source-map using upstream intermediary
debian/js/%.min.js: %.js
	mkdir --parents debian/js
	uglifyjs --compress --mangle \
		--in-source-map $<.map \
		--source-map $@.map \
		--output $@ -- $<

# pre-compress for browser use
%.gz: %
	pigz --force --keep -11 -- $<
	brotli --force --keep --best -- $<

%.html: %.md
	pandoc --from gfm-raw_html --to html --standalone \
		--metadata title:leaflet-image \
		--output $@ -- $<

%.txt: %.md
	pandoc --from gfm-raw_html --to plain \
		--output $@ -- $<

override_dh_auto_build: $(DOCS) \
 debian/js/$(STEM).min.js.gz

$(STEM).js: index.js
	webpack --config debian/webpack.config.js \
		--output-library leaflet-image \
		--output-filename $@ -- $<

override_dh_installdocs:
	dh_installdocs --all -- $(DOCS)

.SECONDARY: