File: rules

package info (click to toggle)
ruby-hikidoc 0.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 268 kB
  • sloc: ruby: 1,236; makefile: 34
file content (40 lines) | stat: -rwxr-xr-x 1,272 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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

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

override_dh_installman:
	help2man --no-info \
		   --include=debian/hikidoc.h2m \
		   --help-option="-I lib/ bin/hikidoc --help" \
		   --version-string=$(DEB_VERSION_UPSTREAM) \
		   /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 -E utf-8:utf-8 -I $(CURDIR)/lib/ $(CURDIR)/bin/hikidoc \
	  > $(CURDIR)/html/TextFormattingRules.html.ja
	install -m 644 \
	  $(CURDIR)/debian/local/debian-openlogo.png \
	  $(CURDIR)/html/debian-openlogo.png
	for i in README.ja NEWS.ja; do \
	  mv $(CURDIR)/$$i $(CURDIR)/$$i.eucjp ; \
	  nkf -w $(CURDIR)/$$i.eucjp > $(CURDIR)/$$i.utf8 ; \
	  mv $(CURDIR)/$$i.utf8 $(CURDIR)/$$i; \
	done
	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
	for i in README.ja NEWS.ja; do \
	  [ -f $(CURDIR)/$$i.eucjp ] && mv $(CURDIR)/$$i.eucjp $(CURDIR)/$$i; \
	  rm -f $(CURDIR)/$$i.utf8 $(CURDIR)/$$i.eucjp ; \
	done