#!/usr/bin/make -f # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS # enable dpkg build flags export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/default.mk export DEB_HOST_MULTIARCH export SHELL := /bin/sh -e PECL_NAME := libvirt-php PHP_VERSIONS := $(shell /usr/sbin/phpquery -V | grep -v 5.6) %: dh $@ --with php --with autoreconf debian/autoreconf: : > debian/autoreconf for v in $(PHP_VERSIONS); do \ echo "source-$$v" >> debian/autoreconf; \ done override_dh_auto_configure: for v in $(PHP_VERSIONS); do \ dh_auto_configure --builddirectory=$(CURDIR)/build-$$v -- --with-php-config=/usr/bin/php-config$$v; \ done override_dh_auto_build: for v in $(PHP_VERSIONS); do \ dh_auto_build --builddirectory=$(CURDIR)/build-$$v; \ done override_dh_auto_install: for v in $(PHP_VERSIONS); do \ dh_auto_install --builddirectory=$(CURDIR)/build-$$v -- \ DESTDIR=$(CURDIR)/debian/php$$v-$(PECL_NAME); \ rm -rf $(CURDIR)/debian/php$$v-$(PECL_NAME)/etc/php/$$v; \ rm -rf $(CURDIR)/debian/php$$v-$(PECL_NAME)/usr/share/doc/libvirt-php-*; \ rm -f $(CURDIR)/debian/php$$v-$(PECL_NAME)/usr/lib/php/*/*.la; \ done override_dh_auto_clean: for v in $(PHP_VERSIONS); do \ dh_auto_clean --builddirectory=$(CURDIR)/build-$$v; \ rm -rf $(CURDIR)/build-$$v; \ done