File: rules

package info (click to toggle)
libvirt-php 0.5.8-7
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,140 kB
  • sloc: ansic: 9,352; sh: 4,578; php: 269; makefile: 219; xml: 93
file content (54 lines) | stat: -rwxr-xr-x 1,437 bytes parent folder | download
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
#!/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