File: rules

package info (click to toggle)
ruby-hikidoc 0.1.0-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 264 kB
  • sloc: ruby: 1,236; makefile: 25
file content (31 lines) | stat: -rwxr-xr-x 1,001 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

UPSTREAM_VERSION = $(shell dpkg-parsechangelog | awk '{ if ($$1 == "Version:") { print($$2) } }' | cut -d - -f 1)

%:
	dh $@ --buildsystem=ruby --with ruby

override_dh_installman:
	help2man --no-info \
		   --include=debian/hikidoc.h2m \
		   --help-option="-I lib/ bin/hikidoc --help" \
		   --version-string=$(UPSTREAM_VERSION) \
		   /usr/bin/ruby > $(CURDIR)/hikidoc.1
	dh_installman

override_dh_installdocs:
	mkdir -p $(CURDIR)/html
	ruby -I $(CURDIR)/lib/ $(CURDIR)/bin/hikidoc TextFormattingRules \
	  > $(CURDIR)/html/TextFormattingRules.html
	nkf -w $(CURDIR)/TeXTFormattingRules.ja \
	  | ruby -I $(CURDIR)/lib/ $(CURDIR)/bin/hikidoc \
	  > $(CURDIR)/html/TextFormattingRules.html.ja
	install -o root -g root -m 644 \
	  $(CURDIR)/debian/local/debian-openlogo.png \
	  $(CURDIR)/html/debian-openlogo.png
	dh_installdocs

override_dh_auto_clean:
	dh_auto_clean
	[ ! -d $(CURDIR)/html ] || rm -fr $(CURDIR)/html
	[ ! -f $(CURDIR)/hikidoc.1 ] || rm -f $(CURDIR)/hikidoc.1