3
#DEB_SRCDIR := $(shell basename imagick-*)
6
include /usr/share/cdbs/1/rules/debhelper.mk
8
PHP_EX5=$(shell /usr/bin/php-config5 --extension-dir)
10
# don't link against unnecessary libraries such as libX11
11
export LDFLAGS += -Wl,--as-needed
18
rm -f debian/php5-*.postrm \
19
debian/php5-*.postinst
20
-cd $(DEB_SRCDIR) && phpize5 --clean
24
# - we don't want the module linked against some libx* (unused symbols)
25
# We want to link with just needed libraries
26
# - "-Wl,--as-needed" is ignored if not the first argument of the linker
27
# We have to patch the linker call script ltmain.sh
28
cd $(DEB_SRCDIR) && phpize5 && \
29
./configure --enable-handlebars --with-php-config=/usr/bin/php-config5
30
sed -e 's/phpX/php5/g' < debian/phpX-handlebars.postinst > debian/php5-handlebars.postinst
31
sed -e 's/phpX/php5/g' < debian/phpX-handlebars.postrm > debian/php5-handlebars.postrm
37
install/php5-handlebars:: configure_for_php5
38
$(MAKE) -C $(DEB_SRCDIR)
39
mkdir -p debian/php5-handlebars$(PHP_EX5)
40
install -m 644 -o root -g root $(DEB_SRCDIR)/modules/handlebars.so debian/php5-handlebars$(PHP_EX5)/handlebars.so
41
echo "php5:Depends=phpapi-`php-config5 --phpapi`, php5-common" >> debian/php5-handlebars.substvars
42
mkdir -p debian/php5-handlebars/usr/share/php5-handlebars
43
cp debian/handlebars.ini debian/php5-handlebars/usr/share/php5-handlebars/handlebars.ini-dist