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 48 49 50 51 52 53 54 55
|
#!/usr/bin/make -f
#export DH_VERBOSE = 1
# https://pkg-perl.alioth.debian.org/debhelper.html#Occasionally_Useful
PACKAGE = $(shell dh_listpackages)
TMP = $(CURDIR)/debian/$(PACKAGE)
# https://wiki.debian.org/HardeningWalkthrough
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
%:
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_install:
dh_auto_install
# Remove extra license files
rm -v $(TMP)/usr/share/doc/vis/LICENSE $(TMP)/usr/share/vis/lexers/LICENSE
# The tests need to be run in an UTF-8 aware environment.
override_dh_auto_test: LC_ALL=en_US.UTF-8
override_dh_auto_test:
# The vim tests harness is not solid, let's skip them for the moment.
# Upstream mentioned the possibility of phasing them out entirely.
make -C test/core
make -C test/lua
make -C test/vis
override_dh_auto_clean:
dh_auto_clean
# Cleanup the test suite submodule too.
$(MAKE) -C test clean
# Note: it doesn't really clean up everything.
# Upstream issue: https://github.com/martanne/vis-test/issues/13.
# Let's manually remove the test build leftovers.
rm -f test/core/ccan-config test/core/config.h test/util/keys
|