#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # Enable verbose builds to detect missing (hardening) flags. #export verbose=1 # This has to be exported to make some magic below work. export DH_OPTIONS export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk include /usr/share/dpkg/architecture.mk # The build system doesn't use CPPFLAGS, pass them to CFLAGS to enable the # missing (hardening) flags. CFLAGS += $(CPPFLAGS) ifneq (,$(filter x-fpic,$(DEB_BUILD_OPTIONS))) CFLAGS += -fPIC endif ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) MAKEFLAGS += -j$(NUMJOBS) endif BUILD_FLAGS=build=release OS=Linux verbose=yes override_dh_auto_build: $(MAKE) $(BUILD_FLAGS) override_dh_auto_install: $(MAKE) $(BUILD_FLAGS) prefix=$(CURDIR)/debian/tmp/usr install install -m744 -T $(CURDIR)/debian/mupdf.sh $(CURDIR)/debian/tmp/usr/bin/mupdf override_dh_auto_clean: -rm -rf build -rm -rf generated -rm -f include/mupdf/pdf/name-table.h source/pdf/pdf-name-table.h %: dh $@