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
|
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
PHP_EX4=$(shell /usr/bin/php-config4 --extension-dir)
PHP_EX5=$(shell /usr/bin/php-config5 --extension-dir)
DEB_INSTALL_DOCS_ALL := debian/README.Debian
#
# local hacks
#
configure_for_php%:
-$(MAKE) clean
phpize --clean
phpize$*
./configure --with-json --with-php-config=/usr/bin/php-config$*
# $(MAKE) clean wants to remove my .so files !!!
sed -e 's#find \.#find . ! -path "*/debian/*"#' Makefile > Makefile.new
mv Makefile.new Makefile
#
# cdbs things
#
clean::
-$(MAKE) clean
phpize --clean || true
install/php4-json:: configure_for_php4
-$(MAKE)
mkdir -p debian/php4-json$(PHP_EX4)
install -m 644 -o root -g root modules/json.so debian/php4-json$(PHP_EX4)/json.so
mkdir -p debian/php4-json/usr/share/lintian/overrides
echo "php-json: no-shlibs-control-file $(PHP_EX4)/json.so" > debian/php4-json/usr/share/lintian/overrides/php4-json
echo "php4:Depends=phpapi-`php-config4 --phpapi`, php4-common" >> debian/php4-json.substvars
install/php5-json:: configure_for_php5
-$(MAKE)
mkdir -p debian/php5-json$(PHP_EX5)
install -m 644 -o root -g root modules/json.so debian/php5-json$(PHP_EX5)/json.so
mkdir -p debian/php5-json/usr/share/lintian/overrides
echo "php-json: no-shlibs-control-file $(PHP_EX5)/json.so" > debian/php5-json/usr/share/lintian/overrides/php5-json
echo "php5:Depends=phpapi-`php-config5 --phpapi`, php5-common" >> debian/php5-json.substvars
|