| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
# generate documentation unless nodoc requested |
| 4 |
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) |
| 5 |
DOCS = README.html README.txt |
| 6 |
CHANGELOGS = CHANGELOG.html CHANGELOG.txt |
| 7 |
endif |
| 8 |
|
| 9 |
override_dh_auto_build: $(DOCS) $(CHANGELOGS) |
| 10 |
babeljs --no-babelrc --presets @babel/preset-env --out-file legacy.js index.js |
| 11 |
|
| 12 |
override_dh_installdocs: |
| 13 |
dh_installdocs --all -- $(DOCS) |
| 14 |
|
| 15 |
override_dh_installchangelogs: |
| 16 |
dh_installchangelogs -- $(CHANGELOGS) |
| 17 |
|
| 18 |
override_dh_clean: |
| 19 |
dh_clean -- $(DOCS) $(CHANGELOGS) |
| 20 |
|
| 21 |
%.html: %.md |
| 22 |
pandoc --from gfm-raw_html --to html --standalone --output $@ $< |
| 23 |
|
| 24 |
%.txt: %.md |
| 25 |
pandoc --from gfm-raw_html --to plain --output $@ $< |
| 26 |
|
| 27 |
%: |
| 28 |
dh $@ |