File: rules

package info (click to toggle)
kworkflow 1%3A0.10-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,212 kB
  • sloc: sh: 31,869; perl: 2,172; sql: 268; ansic: 114; xml: 84; python: 76; makefile: 27
file content (38 lines) | stat: -rwxr-xr-x 956 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
#!/usr/bin/make -f

DESTDIR := debian/kworkflow

override_dh_install:
	dh_install
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	sphinx-build -b html documentation/ $(DESTDIR)/usr/share/doc/kw/html
endif
	@sed -i -e "s,##KW_INSTALL_PREFIX_TOKEN##,,g" $(DESTDIR)/usr/bin/kw

# Generate man page for each command
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
ALL_MAN_RST_FILES_PATH := $(wildcard documentation/man/features/*.rst)
ALL_MAN_FILES_PATH := $(patsubst %.rst,%.1, $(ALL_MAN_RST_FILES_PATH))

ALL_FILES_NAME := $(notdir $(ALL_MAN_FILES_PATH))

%.1: %.rst
	rst2man < $^ > $@

override_dh_installman: $(ALL_MAN_FILES_PATH)
	rst2man < documentation/man/kw.rst > documentation/man/kw.1
	dh_installman
	rm documentation/man/*.1
	rm documentation/man/features/*.1
endif

override_dh_auto_test:
	./run_tests.sh

override_dh_auto_clean:
	dh_auto_clean
	rm -rf tests/.tmp
	rm -f documentation/man/*.1 documentation/man/features/*.1

%:
	dh $@ --with sphinxdoc