3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
9 # Uncomment this to turn on verbose mode.
12 export PHP_PREFIX="/usr"
15 phpapiver=$(shell php-config5 --phpapi)
19 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
25 # shared library versions, option 1
28 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
29 #version=`ls src/.libs/lib*.so.* | \
30 # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
31 #major=`ls src/.libs/lib*.so.* | \
32 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
34 configure: configure-stamp
40 --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
44 --with-php-config=$(PHP_PREFIX)/bin/php-config5
50 build-stamp: configure-stamp
60 rm -f build-stamp configure-stamp
74 $(MAKE) install INSTALL_ROOT=$(CURDIR)/debian/$(package)
77 # Build architecture-independent files here.
78 binary-indep: build install
79 # We have nothing to do by default.
81 # Build architecture-dependent files here.
82 binary-arch: build install
86 dh_installchangelogs CHANGELOG
87 dh_installdocs TECHNOTES.txt TODO INSTALL
98 # php api version we have been building against:
99 grep -v '^php:Depends' debian/${package}.substvars \
100 > debian/${package}.substvars.$$ && \
101 mv debian/${package}.substvars.$$ debian/${package}.substvars
102 echo "php:Depends=phpapi-$(phpapiver)" >> debian/${package}.substvars
108 binary: binary-indep binary-arch
109 .PHONY: build clean binary-indep binary-arch binary install configure