File: rules

package info (click to toggle)
php-json 1.3.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 684 kB
  • ctags: 521
  • sloc: ansic: 3,878; xml: 446; php: 120; sh: 22; makefile: 16
file content (28 lines) | stat: -rwxr-xr-x 788 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
#!/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

PHPCONFIG=/usr/bin/php-config
EXT_DIR=$(shell $(PHPCONFIG) --extension-dir)
phpapiver=$(shell $(PHPCONFIG) --phpapi)
UPSTREAM=$(shell dpkg-parsechangelog | sed -ne "s/Version: \([.0-9]*\)-.*/\\1/p")

%:
	dh $@ --with php5

override_dh_auto_configure:
	cd jsonc-$(UPSTREAM) && phpize
	dh_auto_configure -Djsonc-$(UPSTREAM) -- --with-php-config=$(PHPCONFIG) --enable-json --with-libjson=/usr

override_dh_auto_make:
	dh_auto_make -Djsonc-$(UPSTREAM)

override_dh_gencontrol:
	dh_gencontrol -- -V"php:Depends=phpapi-$(phpapiver)"

override_dh_auto_install:
	dh_auto_install -Djsonc-$(UPSTREAM) -- INSTALL_ROOT=$(CURDIR)/debian/tmp