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
|
#!/usr/bin/make -f
DEB_TAR_SRCDIR := $(shell basename $(wildcard *.tgz) .tgz)
include /usr/share/cdbs/1/rules/tarball.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
PHP_EX5=$(shell /usr/bin/php-config5 --extension-dir)
#
# local hacks
#
patch: apply-patches
clean::
rm -f php[5]-memcached.postrm php[5]-memcached.postinst
rm -f *cdbs*
configure_for_php%:
cd $(DEB_SRCDIR) && phpize --clean && phpize && \
./configure --enable-memcached --with-php-config=/usr/bin/php-config$*
sed -e 's/phpX/php$*/g' < debian/phpX-memcached.postinst > debian/php$*-memcached.postinst
sed -e 's/phpX/php$*/g' < debian/phpX-memcached.postrm > debian/php$*-memcached.postrm
#
# cdbs things
#
define install_rule
$(MAKE) -C $(DEB_SRCDIR)
mkdir -p debian/php$1-memcached$(PHP_EX$1)
install -m 644 -o root -g root $(DEB_SRCDIR)/modules/memcached.so debian/php$1-memcached$(PHP_EX$1)/memcached.so
mkdir -p debian/php$1-memcached/usr/share/lintian/overrides
echo "php5-memcached: no-shlibs-control-file $(PHP_EX$1)/memcached.so" > debian/php$1-memcached/usr/share/lintian/overrides/php$1-memcached
echo "php$1:Depends=phpapi-`php-config$1 --phpapi`, php$1-common" >> debian/php$1-memcached.substvars
mkdir -p debian/php$1-memcached/usr/share/php$1-memcached/
cp debian/memcached.ini debian/php$1-memcached/usr/share/php$1-memcached/memcached.ini-dist
#01-01-1970 in changelog
touch build-tree/*/ChangeLog
endef
install/php5-memcached:: configure_for_php5
$(call install_rule,5)
|