debian swirl logo

Back to the packages list tarantool-php

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk

phpapi	= $(shell php-config5 --phpapi)
version = $(shell dpkg-parsechangelog \
		|grep ^Version|awk '{print $$2}'|sed 's/-.*//')

makebuilddir/libtarantool-php::
		phpize
		./configure
		make
	echo "php:Depends= phpapi-$(phpapi)" > debian/libtarantool-php.substvars

install/libtarantool-php::
		install -m 0755 -d debian/libtarantool-php/usr/lib/php5/$(phpapi)/
		install -m 0755 -d debian/libtarantool-php/etc/php5/mods-available/
		install -m 0755 modules/tarantool.so \
			debian/libtarantool-php/usr/lib/php5/$(phpapi)/
	echo extension= tarantool.so \
			> debian/libtarantool-php/etc/php5/mods-available/tarantool.ini

clean::
		phpize --clean
		rm -f debian/debhelper.log
		rm -f debian/*.substvars
		rm -fr src/.libs
		rm -f src/tarantool.lo



tarball: clean
		cd .. \
		&& tar \
			--exclude=debian \
			--exclude=.git \
			-czvf tarantool-php_$(version).orig.tar.gz \
			tarantool-php-$(version)

Builds:

libtarantool-php
pecl php driver for tarantool/box