|
2 | 2 |
|
3 | 3 | include /usr/share/cdbs/1/rules/debhelper.mk
|
4 | 4 |
|
5 |
| -phpapi = $(shell php-config7.0 --phpapi) |
| 5 | +DEB_PACKAGE := $(strip $(shell egrep '^Package: ' debian/control | \ |
| 6 | + cut -f 2 -d ':')) |
| 7 | + |
| 8 | +phpversion = $(shell echo $(DEB_PACKAGE) | \ |
| 9 | + sed -e 's/^php\([0-9.]\+\)-tarantool$$/\1/') |
| 10 | +phpapi = $(shell php-config$(phpversion) --phpapi) |
6 | 11 | version = $(shell dpkg-parsechangelog \
|
7 | 12 | |grep ^Version|awk '{print $$2}'|sed 's/-.*//')
|
8 | 13 |
|
9 |
| -makebuilddir/php7.0-tarantool:: |
| 14 | +makebuilddir/php$(phpversion)-tarantool:: |
10 | 15 | phpize
|
11 | 16 | ./configure
|
12 | 17 | make
|
13 |
| - echo "php:Depends=phpapi-$(phpapi)" > debian/php7.0-tarantool.substvars |
| 18 | + echo "php:Depends=phpapi-$(phpapi)" > debian/php$(phpversion)-tarantool.substvars |
14 | 19 |
|
15 |
| -install/php7.0-tarantool:: |
16 |
| - install -m 0755 -d debian/php7.0-tarantool/usr/lib/php/$(phpapi)/ |
17 |
| - install -m 0755 -d debian/php7.0-tarantool/etc/php/7.0/mods-available/ |
| 20 | +install/php$(phpversion)-tarantool:: |
| 21 | + install -m 0755 -d debian/php$(phpversion)-tarantool/usr/lib/php/$(phpapi)/ |
| 22 | + install -m 0755 -d debian/php$(phpversion)-tarantool/etc/php/$(phpversion)/mods-available/ |
18 | 23 | install -m 0755 modules/tarantool.so \
|
19 |
| - debian/php7.0-tarantool/usr/lib/php/$(phpapi)/ |
| 24 | + debian/php$(phpversion)-tarantool/usr/lib/php/$(phpapi)/ |
20 | 25 | echo extension=tarantool.so \
|
21 |
| - > debian/php7.0-tarantool/etc/php/7.0/mods-available/tarantool.ini |
| 26 | + > debian/php$(phpversion)-tarantool/etc/php/$(phpversion)/mods-available/tarantool.ini |
22 | 27 | # Enable the extension.
|
23 |
| - install -m 0755 -d debian/php7.0-tarantool/etc/php/7.0/cli/conf.d |
24 |
| - ln -s /etc/php/7.0/mods-available/tarantool.ini \ |
25 |
| - debian/php7.0-tarantool/etc/php/7.0/cli/conf.d/50-tarantool.ini |
| 28 | + install -m 0755 -d debian/php$(phpversion)-tarantool/etc/php/$(phpversion)/cli/conf.d |
| 29 | + ln -s /etc/php/$(phpversion)/mods-available/tarantool.ini \ |
| 30 | + debian/php$(phpversion)-tarantool/etc/php/$(phpversion)/cli/conf.d/50-tarantool.ini |
26 | 31 |
|
27 | 32 | clean::
|
28 | 33 | phpize --clean
|
|
0 commit comments