#!/usr/bin/make -f # -*- makefile -*- # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # # Modified to make a template file for a multi-binary package with separated # build-arch and build-indep targets by Bill Allombert 2001 # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 include /usr/share/dpkg/architecture.mk # The fixdebugpath flag breaks the build. export DEB_BUILD_MAINT_OPTIONS=hardening=+all reproducible=-fixdebugpath DEB_CXXFLAGS_MAINT_APPEND += -fpermissive ifeq ($(DEB_HOST_ARCH),armhf) DEB_CFLAGS_MAINT_APPEND += -marm DEB_CXXFLAGS_MAINT_APPEND += -marm endif include /usr/share/dpkg/buildflags.mk confflags += --includedir="\$${prefix}/include/$(DEB_HOST_MULTIARCH)" confflags += --disable-ppl_lpsol --disable-ppl_lcdd # Disable the SWI-Prolog interface during architecture bootstrap, and # on some architectures interface_swi_prolog = ifneq (,$(filter $(shell dh_listpackages),libppl-swi libppl-doc)) interface_swi_prolog = ,swi_prolog endif confflags += --enable-interfaces=c,cxx$(interface_swi_prolog) # If the version string was set using automake then the build would # have to be configured before the dpkg-buildpackage command. PPL_VERSION = $(shell grep "^AC_INIT" $(CURDIR)/configure.ac | sed -e "s/^AC_INIT.\[[^]]*\],[ \t]*\[\([^]]*\)\],.*/\1/") # The library headers trigger the same compiler warnings in every test-suite # translation unit, which bloats the build log. Build the test suite with -w. CHECK_ENV := CPPFLAGS="$(CPPFLAGS) -w" %: dh $@ override_dh_auto_configure: dh_auto_configure -- $(confflags) override_dh_auto_test-arch: dh_auto_test -- -k $(CHECK_ENV) override_dh_auto_test-indep: # Nothing to do # Documentation not built by default, but also requires an arch build override_dh_auto_build-indep: dh_auto_build save_size=10000 dh_auto_build --builddirectory=doc -- user-configured # Destination directory for user manual. DOC_DIR=$(CURDIR)/debian/tmp/usr/share/doc/ppl # The upstream install target always installs the prebuilt manuals, also in # arch-only builds. Rename them in every build, so that the paths in # debian/libppl-doc.install match and dh_missing does not complain when # libppl-doc is not built. The Prolog interface manual is only installed # when the Prolog interface is enabled. execute_after_dh_auto_install: mkdir -p $(DOC_DIR)/html set -e; for m in ppl-user:user-manual \ ppl-user-c-interface:c-interface \ ppl-user-prolog-interface:prolog-interface; do \ name=$${m%%:*}; dir=$${m#*:}; \ if [ -d $(DOC_DIR)/$$name-$(PPL_VERSION)-html ]; then \ mv $(DOC_DIR)/$$name-$(PPL_VERSION)-html $(DOC_DIR)/html/$$dir; \ mv $(DOC_DIR)/$$name-$(PPL_VERSION).pdf $(DOC_DIR)/$$name-browse.pdf; \ mv $(DOC_DIR)/$$name-$(PPL_VERSION).ps.gz $(DOC_DIR)/$$name-print.ps.gz; \ rm $(DOC_DIR)/html/$$dir/jquery.js; \ fi; \ done # Doxygen's checksums of generated graphs are not needed in the package. find $(DOC_DIR)/html -name '*.md5' -delete override_dh_install-arch: -chrpath -d \ debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libppl.so.14.0.0 \ debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libppl_c.so.4.0.0 \ debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/ppl/libppl_swiprolog.so dh_install -a override_dh_installchangelogs: dh_installchangelogs ChangeLog