File: rules

package info (click to toggle)
xhprof 0.9.4-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,344 kB
  • ctags: 676
  • sloc: php: 1,998; ansic: 1,086; makefile: 58
file content (80 lines) | stat: -rwxr-xr-x 1,790 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/make -f
# -*- makefile -*-

#Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DESTDIR=$(CURDIR)/debian/php5-xhprof

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

DEB_HOST_GNU_TYPE    ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

# Enable IEEE-conformant floating point math on alphas (not the default)
ifeq (alpha-linux-gnu,$(DEB_HOST_GNU_TYPE))
	CFLAGS += -mieee
endif

ifeq ($(DEB_HOST_GNU_TYPE), $(findstring $(DEB_HOST_GNU_TYPE), ia64-linux-gnu powerpc64-linux-gnu aarch64-linux-gnu))
	CFLAGS += -g
else
	CFLAGS += -gstabs
endif

configure: configure-stamp
configure-stamp:
	cd $(CURDIR)/extension/ && phpize5 && \
		./configure --prefix=/usr --with-php-config=/usr/bin/php-config5
	touch $@

build-arch:
build-indep:
build: build-stamp

build-stamp: configure
	cd $(CURDIR)/extension/ && $(MAKE) DESTDIR=$(DESTDIR)
	touch $@

clean:
	dh_testdir
	dh_testroot
	cd $(CURDIR)/extension/ && phpize --clean
	dh_clean

install: check
	dh_testdir
	dh_testroot
	dh_prep
	cd $(CURDIR)/extension/ && $(MAKE) install INSTALL_ROOT=$(DESTDIR)
	install -D -m 644 debian/xhprof.ini \
		$(DESTDIR)/etc/php5/mods-available/xhprof.ini

check: build
	# TODO: check why all tests fail
#	cd $(CURDIR)/extension/ && $(MAKE) test

binary-indep: install

binary-arch: install
	dh_testdir
	dh_testroot
	dh_installdirs -a
	dh_installchangelogs -a
	dh_installdocs -a
	dh_installexamples -a
	dh_install -a
	dh_link -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	echo "php:Depends=phpapi-`php-config5 --phpapi`" >> debian/php5-xhprof.substvars
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch
.PHONY: clean binary-indep binary-arch binary install