~ubuntu-branches/ubuntu/natty/php-memcache/natty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Habouzit
  • Date: 2006-04-13 00:12:19 UTC
  • Revision ID: james.westby@ubuntu.com-20060413001219-66pwq37137sggn6c
Tags: 2.0.1-1
Initial release (closes: #320744).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
 
 
3
DEB_TAR_SRCDIR := $(shell basename $(wildcard *.tgz) .tgz)
 
4
 
 
5
include /usr/share/cdbs/1/rules/tarball.mk
 
6
include /usr/share/cdbs/1/rules/debhelper.mk
 
7
 
 
8
PHP_EX4=$(shell /usr/bin/php-config4 --extension-dir)
 
9
PHP_EX5=$(shell /usr/bin/php-config5 --extension-dir)
 
10
 
 
11
DEB_INSTALL_EXAMPLES_php4-memcache = $(DEB_SRCDIR)/example.php
 
12
DEB_INSTALL_EXAMPLES_php5-memcache = $(DEB_SRCDIR)/example.php
 
13
 
 
14
#
 
15
# local hacks
 
16
#
 
17
 
 
18
configure_for_php%:
 
19
        cd $(DEB_SRCDIR) && phpize --clean && phpize && \
 
20
            ./configure --with-memcache --with-php-config=/usr/bin/php-config$*
 
21
 
 
22
#
 
23
# cdbs things
 
24
#
 
25
 
 
26
install/php4-memcache:: configure_for_php4
 
27
        chmod a-x $(DEB_SRCDIR)/example.php
 
28
        $(MAKE) -C $(DEB_SRCDIR)
 
29
        mkdir -p debian/php4-memcache$(PHP_EX4)
 
30
        install -m 644 -o root -g root $(DEB_SRCDIR)/modules/memcache.so debian/php4-memcache$(PHP_EX4)/memcache.so
 
31
        mkdir -p debian/php4-memcache/usr/share/lintian/overrides
 
32
        echo "php-memcache: no-shlibs-control-file $(PHP_EX4)/memcache.so" > debian/php4-memcache/usr/share/lintian/overrides/php4-memcache
 
33
        echo "php4:Depends=phpapi-`php-config4 --phpapi`, php4-common" >> debian/php4-memcache.substvars
 
34
 
 
35
install/php5-memcache:: configure_for_php5
 
36
        chmod a-x $(DEB_SRCDIR)/example.php
 
37
        $(MAKE) -C $(DEB_SRCDIR)
 
38
        mkdir -p debian/php5-memcache$(PHP_EX5)
 
39
        install -m 644 -o root -g root $(DEB_SRCDIR)/modules/memcache.so debian/php5-memcache$(PHP_EX5)/memcache.so
 
40
        mkdir -p debian/php5-memcache/usr/share/lintian/overrides
 
41
        echo "php-memcache: no-shlibs-control-file $(PHP_EX5)/memcache.so" > debian/php5-memcache/usr/share/lintian/overrides/php5-memcache
 
42
        echo "php5:Depends=phpapi-`php-config5 --phpapi`, php5-common" >> debian/php5-memcache.substvars
 
43