File: rules

package info (click to toggle)
php-memcache 2.0.1-1.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 112 kB
  • ctags: 5
  • sloc: sh: 50; makefile: 26
file content (43 lines) | stat: -rwxr-xr-x 1,682 bytes parent folder | download
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
#!/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

PHP_EX4=$(shell /usr/bin/php-config4 --extension-dir)
PHP_EX5=$(shell /usr/bin/php-config5 --extension-dir)

DEB_INSTALL_EXAMPLES_php4-memcache = $(DEB_SRCDIR)/example.php
DEB_INSTALL_EXAMPLES_php5-memcache = $(DEB_SRCDIR)/example.php

#
# local hacks
#

configure_for_php%:
	cd $(DEB_SRCDIR) && phpize --clean && phpize && \
	    ./configure --with-memcache --with-php-config=/usr/bin/php-config$*

#
# cdbs things
#

install/php4-memcache:: configure_for_php4
	chmod a-x $(DEB_SRCDIR)/example.php
	$(MAKE) -C $(DEB_SRCDIR)
	mkdir -p debian/php4-memcache$(PHP_EX4)
	install -m 644 -o root -g root $(DEB_SRCDIR)/modules/memcache.so debian/php4-memcache$(PHP_EX4)/memcache.so
	mkdir -p debian/php4-memcache/usr/share/lintian/overrides
	echo "php-memcache: no-shlibs-control-file $(PHP_EX4)/memcache.so" > debian/php4-memcache/usr/share/lintian/overrides/php4-memcache
	echo "php4:Depends=phpapi-`php-config4 --phpapi`, php4-common" >> debian/php4-memcache.substvars

install/php5-memcache:: configure_for_php5
	chmod a-x $(DEB_SRCDIR)/example.php
	$(MAKE) -C $(DEB_SRCDIR)
	mkdir -p debian/php5-memcache$(PHP_EX5)
	install -m 644 -o root -g root $(DEB_SRCDIR)/modules/memcache.so debian/php5-memcache$(PHP_EX5)/memcache.so
	mkdir -p debian/php5-memcache/usr/share/lintian/overrides
	echo "php-memcache: no-shlibs-control-file $(PHP_EX5)/memcache.so" > debian/php5-memcache/usr/share/lintian/overrides/php5-memcache
	echo "php5:Depends=phpapi-`php-config5 --phpapi`, php5-common" >> debian/php5-memcache.substvars