File: rules

package info (click to toggle)
lcdf-typetools 2.110-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,396 kB
  • sloc: cpp: 35,951; ansic: 1,972; sh: 1,468; makefile: 282
file content (45 lines) | stat: -rwxr-xr-x 1,214 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
45
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS := hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# generate documentation unless nodoc requested
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
DOCS = README.html README.txt
endif

%:
	dh $@

%.html: %.md
	cmark-gfm $< > $@

%.txt: %.md
	cmark-gfm --to plaintext $< > $@

# use glyphlist.txt shipped with aglfn
# * tell configure to install where aglfn provides it
# * use aglfn file during build (in case it gets embedded somewhere)
override_dh_auto_configure:
	[ -f glyphlist.txt.upstream ] \
		|| cp glyphlist.txt glyphlist.txt.upstream
	cp --force /usr/share/aglfn/glyphlist.txt glyphlist.txt
	dh_auto_configure -- \
		--enable-glyphlistdir /usr/share/aglfn/glyphlist.txt

execute_after_dh_auto_build: $(DOCS)

# use glyphlist.txt shipped with aglfn
# * skip install file provided by aglfn (we recommend aglfn instead)
override_dh_install:
	dh_install -X/usr/share/aglfn/glyphlist.txt

override_dh_installdocs:
	dh_installdocs -- $(DOCS)

# move back upstream shipped glyphlist.txt to please git-buildpackage
override_dh_clean:
	[ ! -f glyphlist.txt.upstream ] \
		|| mv --force glyphlist.txt.upstream glyphlist.txt
	dh_clean