~ubuntu-branches/ubuntu/lucid/x11proto-resource/lucid

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Stone
  • Date: 2005-12-21 14:10:04 UTC
  • Revision ID: james.westby@ubuntu.com-20051221141004-eqj4mh0tq5ezu729
Tags: 1.0.2-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# debian/rules for the Debian x11proto-resource-dev package.
 
3
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>
 
4
# Copyright © 2005 Daniel Stone <daniel@fooishbar.org>
 
5
 
 
6
# Uncomment this to turn on verbose mode.
 
7
#export DH_VERBOSE=1
 
8
 
 
9
PACKAGE = x11proto-resource-dev
 
10
 
 
11
CFLAGS = -Wall -g
 
12
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
13
        CFLAGS += -O0
 
14
else
 
15
        CFLAGS += -O2
 
16
endif
 
17
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
18
        INSTALL_PROGRAM += -s
 
19
endif
 
20
 
 
21
DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
22
DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
23
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
24
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
 
25
        confflags += --build=$(DEB_HOST_GNU_TYPE)
 
26
else
 
27
        confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
 
28
endif
 
29
 
 
30
 
 
31
build: build-stamp
 
32
build-stamp:
 
33
        dh_testdir
 
34
 
 
35
        mkdir obj-$(DEB_BUILD_GNU_TYPE)
 
36
        cd obj-$(DEB_BUILD_GNU_TYPE) && \
 
37
        ../configure --prefix=/usr --mandir=\$${prefix}/share/man \
 
38
                     --infodir=\$${prefix}/share/info --disable-shared \
 
39
                     $(confflags) CFLAGS="$(CFLAGS)" 
 
40
        cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE)
 
41
 
 
42
        touch build-stamp
 
43
 
 
44
clean:
 
45
        dh_testdir
 
46
        dh_testroot
 
47
        rm -f build-stamp
 
48
 
 
49
        rm -f config.cache config.log config.status
 
50
        rm -f */config.cache */config.log */config.status
 
51
        rm -f conftest* */conftest*
 
52
        rm -rf autom4te.cache */autom4te.cache
 
53
        rm -rf obj-*
 
54
 
 
55
        dh_clean
 
56
 
 
57
install: build
 
58
        dh_testdir
 
59
        dh_testroot
 
60
        dh_clean -k
 
61
        dh_installdirs
 
62
 
 
63
        cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
 
64
 
 
65
# Build architecture-independent files here.
 
66
binary-indep: build install
 
67
        dh_testdir
 
68
        dh_testroot
 
69
 
 
70
        dh_installdocs
 
71
        dh_installman
 
72
        dh_install --sourcedir=debian/tmp
 
73
        dh_installchangelogs
 
74
        dh_link
 
75
        dh_strip
 
76
        dh_compress
 
77
        dh_fixperms
 
78
        dh_installdeb
 
79
        dh_shlibdeps
 
80
        dh_gencontrol
 
81
        dh_md5sums
 
82
        dh_builddeb
 
83
 
 
84
# Build architecture-dependent files here.
 
85
binary-arch: build install
 
86
# Nothing to do
 
87
 
 
88
binary: binary-indep binary-arch
 
89
.PHONY: build clean binary-indep binary-arch binary install