~ubuntu-branches/ubuntu/hardy/trousers/hardy-proposed

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): William Lima
  • Date: 2007-04-18 16:39:38 UTC
  • Revision ID: james.westby@ubuntu.com-20070418163938-ept1wq6q5tyzlyx5
Tags: 0.2.9.1-0ubuntu1
Initial release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
 
 
3
#export DH_VERBOSE=1
 
4
 
 
5
package = trousers
 
6
 
 
7
CC = gcc
 
8
CFLAGS = -g -Wall
 
9
 
 
10
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
11
        CFLAGS += -O2
 
12
endif
 
13
 
 
14
 
 
15
patch: patch-stamp
 
16
 
 
17
patch-stamp:
 
18
        dh_testdir
 
19
        @patches=debian/patches/*.diff; for i in $$patches; \
 
20
        do \
 
21
                echo "--- Applying $$i ---"; \
 
22
                patch -p1 < $$i; \
 
23
        done
 
24
        touch $@
 
25
 
 
26
unpatch:
 
27
        dh_testdir
 
28
        @if test -f patch-stamp; then \
 
29
        patches=debian/patches/*.diff; \
 
30
        for i in $$patches; \
 
31
        do \
 
32
                reversepatches="$$i $$reversepatches"; \
 
33
        done; \
 
34
        for i in $$reversepatches; \
 
35
        do \
 
36
                echo "--- Reversing $$i ---"; \
 
37
                patch -R -p1 < $$i; \
 
38
        done; \
 
39
        rm -f patch-stamp; \
 
40
        fi
 
41
 
 
42
configure: configure-stamp
 
43
 
 
44
configure-stamp: patch-stamp
 
45
        dh_testdir
 
46
        CC="$(CC)" CFLAGS="$(CFLAGS)" ./configure \
 
47
                --prefix=/usr \
 
48
                --with-gui=none
 
49
        touch $@
 
50
 
 
51
clean:
 
52
        dh_testdir
 
53
        dh_testroot
 
54
        rm -f build configure-stamp config.log
 
55
        -$(MAKE) distclean
 
56
        -$(MAKE) -s -f debian/rules unpatch
 
57
        dh_clean
 
58
 
 
59
install: build
 
60
        dh_testdir
 
61
        dh_testroot
 
62
        dh_clean -k 
 
63
        dh_installdirs
 
64
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
 
65
        dh_install --sourcedir=debian/tmp -ptrousers
 
66
        dh_install --sourcedir=debian/tmp -plibtspi1
 
67
        dh_install --sourcedir=debian/tmp -plibtspi-dev
 
68
 
 
69
build: configure-stamp
 
70
        $(MAKE)
 
71
        touch $@
 
72
 
 
73
binary-indep: build install
 
74
 
 
75
binary-arch: build install
 
76
        dh_testdir
 
77
        dh_testroot
 
78
        dh_installinit
 
79
        dh_installchangelogs ChangeLog
 
80
        dh_installdocs
 
81
        dh_installexamples
 
82
        dh_installman
 
83
        dh_link
 
84
        dh_strip
 
85
        dh_compress
 
86
        dh_fixperms
 
87
        dh_makeshlibs -V
 
88
        dh_installdeb
 
89
        dh_shlibdeps -l debian/libtspi1/usr/lib -L libtspi1
 
90
        dh_gencontrol
 
91
        dh_md5sums
 
92
        dh_builddeb
 
93
 
 
94
binary: binary-indep binary-arch
 
95
 
 
96
.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch