File: rules

package info (click to toggle)
vis 0.7-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 12,360 kB
  • sloc: ansic: 22,281; sh: 950; makefile: 356; python: 47
file content (47 lines) | stat: -rwxr-xr-x 1,397 bytes parent folder | download | duplicates (2)
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
46
47
#!/usr/bin/make -f

# https://wiki.debian.org/HardeningWalkthrough
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Some tests are flaky on some architectures, with failures
# which are difficult to reproduce. Let's run the tests only
# on the architectures where they behave well.
ifeq (,$(filter amd64 arm64 ppc64el,$(DEB_HOST_ARCH)))
	export DEB_BUILD_OPTIONS += nocheck
endif

%:
	dh $@

override_dh_auto_configure:
	# Vis configure script it not generated by autoconf, so it does not
	# accept all the options given by dh_auto_configure. It *almost* works,
	# but we end up with a wrong mandir. This is a possible workaround:
	#
	# dh_auto_configure -- --mandir='$$(PREFIX)/share/man/'
	#
	# but still we're calling the configure script with a lot of options
	# it doesn't actually understand. I prefer to just run the script
	# manually, and dh_auto_configure(1) agrees (see the DESCRIPTION).
	#
	# So:
	#
	./configure --prefix=/usr

override_dh_auto_test:
	# https://github.com/martanne/vis-test/issues/25
	dh_auto_test -- LANG=C.UTF-8

override_dh_auto_install:
	dh_auto_install -- DOCUMENTATION=README.md

	# Remove extra files
	rm -v debian/vis/usr/share/vis/lexers/LICENSE
	rm -v debian/vis/usr/share/vis/lexers/README.md

override_dh_auto_clean:
	dh_auto_clean

	# Cleanup the test suite submodule.
	# Remove if https://github.com/martanne/vis/pull/848 lands.
	$(MAKE) -C test clean