~ubuntu-ngo/+junk/php-net-useragent-detect

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Andrew Starr-Bochicchio
  • Date: 2009-08-13 23:06:48 UTC
  • Revision ID: a.starr.b@gmail.com-20090813230648-b5ssrpsl5snf9yxd
debian/rules: Don't use CDBS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
 
# template debian/rules provided by dh-make-php.
3
 
 
4
 
DEB_COMPRESS_EXCLUDE=package.xml
5
 
 
6
 
include /usr/share/cdbs/1/rules/debhelper.mk
7
 
include /usr/share/cdbs/1/class/pear.mk
 
2
 
 
3
# Uncomment this to turn on verbose mode.
 
4
#export DH_VERBOSE=1
 
5
 
 
6
DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
 
7
DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-)
 
8
DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
 
9
 
 
10
PEAR ?= /usr/bin/pear
 
11
pear_pkg = $(shell ls |grep Net_UserAgent_Detect)
 
12
package = php-net-useragent-detect
 
13
 
 
14
configure: configure-stamp
 
15
configure-stamp:
 
16
        dh_testdir
 
17
        touch configure-stamp
 
18
 
 
19
build: build-stamp
 
20
 
 
21
build-stamp: configure-stamp 
 
22
        dh_testdir
 
23
        touch build-stamp
 
24
 
 
25
clean:
 
26
        dh_testdir
 
27
        dh_testroot
 
28
        if [ -f $(pear_pkg)/package.xml ]; then \
 
29
                rm $(pear_pkg)/package.xml; \
 
30
        fi
 
31
        dh_clean build-stamp configure-stamp
 
32
 
 
33
install: build
 
34
        dh_testdir
 
35
        dh_testroot
 
36
        dh_prep
 
37
        dh_clean
 
38
        dh_installdirs
 
39
 
 
40
        # Add here commands to install the package into debian/package.
 
41
        cp package.xml $(pear_pkg)/package.xml;
 
42
        $(PEAR) install -f -n -R debian/$(package) $(pear_pkg)/package.xml;
 
43
        rm -f debian/$(package)/usr/share/php/.filemap;
 
44
        rm -f debian/$(package)/usr/share/php/.lock;
 
45
        rm -rf debian/$(package)/usr/share/php/.channels;
 
46
        rm -rf debian/$(package)/usr/share/php/.depdblock;
 
47
        rm -rf debian/$(package)/usr/share/php/.depdb;
 
48
        rm -rf debian/$(package)/usr/share/php/.registry/.channel.pecl.php.net;
 
49
        rm -rf debian/$(package)/usr/share/php/.registry/.channel.doc.php.net;
 
50
        rm -rf debian/$(package)/usr/share/php/.registry/.channel.__uri;
 
51
        rm -rf debian/$(package)/tmp
 
52
 
 
53
        # remove duplicated files, these files are in /usr/share/doc/package
 
54
        rm -rf debian/$(package)/usr/share/php/docs;
 
55
        rm -rf debian/$(package)/usr/share/php/tests;
 
56
 
 
57
# Build architecture-dependent files here.
 
58
binary-arch: build install
 
59
# We have nothing to do by default.
 
60
 
 
61
# Build architecture-independent files here.
 
62
binary-indep: build install
 
63
        dh_testdir
 
64
        dh_testroot
 
65
        dh_installdocs
 
66
        dh_installexamples
 
67
        dh_installchangelogs 
 
68
        dh_compress
 
69
        dh_fixperms
 
70
        dh_installdeb
 
71
        dh_gencontrol
 
72
        dh_md5sums
 
73
        dh_builddeb
 
74
 
 
75
binary: binary-indep binary-arch
 
76
.PHONY: build clean binary-indep binary-arch binary install configure