1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
#!/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
INSTALL_ROOT := $(CURDIR)/debian/php-$(PECL_NAME)
PHP_VERSIONS := $(shell /usr/sbin/phpquery -V | grep -v '8\.0')
%:
dh $@ --with php --with autoreconf --with autotools-dev
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 -- \
INSTALL_ROOT=$(INSTALL_ROOT) \
PHPCDIR=/etc/php/$$v/modules-available \
PHPEDIR=$$(/usr/bin/php-config$$v --extension-dir); \
rm -r $(INSTALL_ROOT)/etc/php/$$v; \
done
rm -r $(INSTALL_ROOT)/usr/share/doc/libvirt-php-*
rm -f $(INSTALL_ROOT)/usr/lib/php/*/*.la
override_dh_auto_clean:
for v in $(PHP_VERSIONS); do \
dh_auto_clean --builddirectory=$(CURDIR)/build-$$v; \
rm -rf $(CURDIR)/build-$$v; \
done
|