#!/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