File: rules

package info (click to toggle)
rdf2rml 0~20250122~dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 9,912 kB
  • sloc: perl: 1,212; sql: 430; makefile: 170; sh: 56; ansic: 21
file content (44 lines) | stat: -rwxr-xr-x 1,078 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
41
42
43
44
#!/usr/bin/make -f

# resolve DEB_BUILD_OPTION_PARALLEL
include /usr/share/dpkg/buildopts.mk

# resolve DEB_VERSION_UPSTREAM SOURCE_DATE_EPOCH
include /usr/share/dpkg/pkg-info.mk

COMMANDS = rdfpuml

# generate documentation unless nodoc requested
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
CHANGELOGS = CHANGELOG.html CHANGELOG.txt
DOCS = README.html README.txt
MANPAGES = $(COMMANDS:=.1)
endif

%:
	dh $@

%.html: %.org
	pandoc --from org --to html --standalone --output $@ $<

%.txt: %.org
	pandoc --from org --to plain --output $@ $<


override_dh_auto_test:
	prove $(if $(filter terse,$(DEB_BUILD_OPTIONS)),,-v) $(DEB_BUILD_OPTION_PARALLEL:%=-j%) t/*.t

execute_after_dh_auto_build: $(DOCS) $(CHANGELOGS)

execute_after_dh_auto_install: $(MANPAGES)

execute_after_dh_install:
	chmod +x debian/rdf2rml/usr/share/rdf2rml/bin/rdfpuml.pl

override_dh_installchangelogs:
	dh_installchangelogs -- $(CHANGELOGS)

# generate manpage
rdfpuml.1: %.1: bin/%.pl
	touch -d@$(SOURCE_DATE_EPOCH) $<
	pod2man -r "$* $(DEB_VERSION_UPSTREAM)" -c "convert RDF to PlantUML diagrams" $< > $@