File: rules

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

STEM = leaflet-image

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

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

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

debian/js/$(STEM).min.js: index.js
	webpack -d --config debian/webpack.config.js \
		--output-library leafletImage \
		--output-path $(abspath $(dir $@)) \
		--output-filename $(STEM).js -- $<
	webpack -p --config debian/webpack.config.js \
		--output-library leafletImage \
		--output-path $(abspath $(dir $@)) \
		--output-filename $(notdir $@) -- $<

# 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 $@ -- $<

%:
	dh $@

.SECONDARY: