Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 include /usr/share/dpkg/pkg-info.mk
4 include /usr/share/dpkg/buildflags.mk
5
6 # generate documentation unless nodoc requested
7 ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
8 DOCS = Readme.html Readme.txt
9 manpages = debian/Konclude.1
10 endif
11
12 export QT_SELECT = 5
13
14 %:
15 dh $@
16
17 %.html: %.md
18 cmark-gfm $< > $@
19
20 %.txt: %.md
21 cmark-gfm --to plaintext $< > $@
22
23 override_dh_auto_configure:
24 dh_auto_configure -- Konclude.pro
25
26 override_dh_auto_test:
27 KONCLUDE=Release/Konclude prove --verbose debian/tests/*.t
28
29 $(manpages): debian/%.1 : debian/% Release/%
30 chmod +x $<
31 help2man --name="Reasoner for the SROIQV(D) Description Logic" \
32 --no-info --version-option=$(DEB_VERSION_UPSTREAM) \
33 --output=$@ $< \
34 || { ./$< --help; false; }
35 perl -i -0 -p \
36 -e 's/^\.PP.*$$/.PP\n/ms;' \
37 -e 's/\n(\w+) : /\n.TP\n.B $$1\n/g;' \
38 -e 's/\n(\\f.+) ?: /\n.TP\n.B $$1\n/g;' \
39 -e 's/(\n.IP)?(\nKonclude)/\n.PP$$2/g;' \
40 $@
41 override_dh_auto_install: $(DOCS) $(manpages)
42 dh_auto_install
43
44 override_dh_installdocs:
45 dh_installdocs -- $(DOCS)
46
47 override_dh_compress:
48 dh_compress --exclude=.xml
49
50 execute_after_dh_clean:
51 rm -f $(manpages)
52 rm -f test-response*.xml