#!/usr/bin/make -f %: dh $@ ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) export MSC_TEST_NOFONT = 1 export MSC_TEST_DUMP_DIFF = 3 ifneq ($(ARCH),amd64) export MSC_TEST_ALLOWFAIL = 1 endif export DEB_CPPFLAGS_MAINT_APPEND = -DNDEBUG BUILD_DIR = $(CURDIR)/debian/build-gui INST_DIR = $(CURDIR)/debian/tmp/gui BUILD_NOX = $(CURDIR)/debian/build-nox INST_NOX = $(CURDIR)/debian/tmp/nox override_dh_auto_configure: dh_auto_configure -B$(BUILD_DIR) dh_auto_configure -B$(BUILD_NOX) -- --disable-doc --disable-gui --disable-font-checks override_dh_auto_build: dh_auto_build -D$(BUILD_DIR) dh_auto_build -D$(BUILD_NOX) override_dh_auto_test: dh_auto_test -D$(BUILD_DIR) override_dh_auto_install: dh_auto_install -D$(BUILD_DIR) --destdir=$(INST_DIR) dh_auto_install -D$(BUILD_NOX) --destdir=$(INST_NOX) execute_after_dh_auto_install: # Clear build paths from embedded image meta find $(INST_DIR) -name msc-gen.pdf | xargs perl -p -i -e 's|(/PTEX.FileName \()([^\)]+/)([^/\)]+)|$$1 . " " x length($$2) . $$3|ge' # Duplicate PNGs find $(INST_DIR) -name ex62.png | xargs -n1 ln -sf ex10.png find $(INST_DIR) -name ex15.png | xargs -n1 ln -sf ex14.png find $(INST_DIR) -name ex58.png | xargs -n1 ln -sf ex48.png find $(INST_DIR) -name ex61.png | xargs -n1 ln -sf ex48.png # Remove '-gui' part from the no-X manpage { o=`find $(INST_DIR) -name msc-gen.1 | head -1`; \ d=`dirname $(INST_NOX)$${o#$(INST_DIR)}`; \ mkdir -p $$d; \ sed '/-gui/,/^[.]TP/d' $$o >$$d/msc-gen.1; } override_dh_install \ override_dh_installman \ override_dh_installdocs \ override_dh_installexamples \ override_dh_installinfo \ override_dh_missing: $(@:override_%=%) --sourcedir=$(INST_DIR) -pmsc-generator -pmsc-generator-doc $(@:override_%=%) --sourcedir=$(INST_NOX) -pmsc-generator-nox override_dh_installchangelogs: dh_installchangelogs $(BUILD_DIR)/NEWS execute_after_dh_auto_clean: rm -rf $(BUILD_DIR) $(BUILD_NOX)