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 81 82
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CFLAGS = -O2 -Wall -fno-strict-aliasing
# 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))
CFLAGS += -g
else
CFLAGS += -gstabs
endif
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
dh build
sed "s#@EXTDIR@#`php-config5 --extension-dir`#" debian/xcache.ini.in > debian/xcache.ini
sed "s@EXT_DIR=.*@EXT_DIR=`php-config5 --extension-dir`@" -i debian/php5-xcache.postinst
touch $@
override_dh_auto_configure:
mkdir KEEP
mv tests/include-skipif.php tests/sub-a.php tests/sub-b.php KEEP/
phpize5 --clean
mv KEEP/* tests/
rmdir KEEP
phpize5
dh_auto_configure -- \
--with-php-config=/usr/bin/php-config5 \
--enable-xcache=shared \
--disable-xcache-constant \
--enable-xcache-optimizer \
--enable-xcache-coverager \
--enable-xcache-assembler \
--enable-xcache-encoder \
--enable-xcache-decoder
override_dh_auto_clean:
dh_auto_clean
mkdir KEEP
mv tests/include-skipif.php tests/sub-a.php tests/sub-b.php KEEP/
phpize5 --clean
mv KEEP/* tests/
rmdir KEEP
clean:
dh clean
override_dh_auto_install:
$(MAKE) install INSTALL_ROOT=debian/php5-xcache
override_dh_auto_test:
cd tests; ln -s ../debian/tests/* .
$(MAKE) xcachetest REPORT_EXIT_STATUS=1 NO_INTERACTION=y
override_dh_fixperms:
dh_fixperms
find debian/php5-xcache/usr/share/xcache -type f -print0 | xargs -0 chmod 644
chmod 644 debian/php5-xcache/usr/share/doc/php5-xcache/examples/xcache.ini
install: build
dh install
# Build architecture-independent files here.
binary-indep:
# Build architecture-dependent files here.
binary-arch: build install
echo "php:Depends=phpapi-`php-config5 --phpapi`" >> debian/php5-xcache.substvars
dh binary-arch
binary: binary-arch binary-indep
.PHONY: build clean binary-indep binary-arch binary install configure
|