~ubuntu-branches/ubuntu/karmic/ncdu/karmic

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Luca Bedogni
  • Date: 2007-04-30 20:04:35 UTC
  • Revision ID: james.westby@ubuntu.com-20070430200435-mi3rkt3fiv932bar
Tags: 1.1-1
* New upstream release
* Added watch file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
 
 
3
# These are used for cross-compiling and for saving the configure script
 
4
# from having to guess our platform (since we know it already)
 
5
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
6
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
7
 
 
8
CFLAGS = -Wall -g
 
9
 
 
10
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
11
        CFLAGS += -O0
 
12
else
 
13
        CFLAGS += -O2
 
14
endif
 
15
 
 
16
config.status: configure
 
17
        dh_testdir
 
18
        # Add here commands to configure the package.
 
19
        ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
 
20
 
 
21
build: build-stamp
 
22
 
 
23
build-stamp:  config.status
 
24
        dh_testdir
 
25
 
 
26
        touch $@
 
27
 
 
28
clean:
 
29
        dh_testdir
 
30
        dh_testroot
 
31
        rm -f build-stamp 
 
32
 
 
33
        # Add here commands to clean up after the build process.
 
34
        -$(MAKE) distclean
 
35
 
 
36
        dh_clean 
 
37
 
 
38
install: build
 
39
        dh_testdir
 
40
        dh_testroot
 
41
        dh_clean -k 
 
42
        dh_installdirs
 
43
 
 
44
        # Add here commands to install the package into debian/ncdu.
 
45
        $(MAKE) DESTDIR=$(CURDIR)/debian/ncdu install
 
46
 
 
47
# Build architecture-independent files here.
 
48
binary-indep: build install
 
49
# We have nothing to do by default.
 
50
 
 
51
# Build architecture-dependent files here.
 
52
binary-arch: build install
 
53
        dh_testdir
 
54
        dh_testroot
 
55
        dh_installchangelogs ChangeLog
 
56
        dh_installdocs
 
57
        dh_installman doc/ncdu.1
 
58
        dh_link
 
59
        dh_strip
 
60
        dh_compress
 
61
        dh_fixperms
 
62
        dh_installdeb
 
63
        dh_shlibdeps
 
64
        dh_gencontrol
 
65
        dh_md5sums
 
66
        dh_builddeb
 
67
 
 
68
binary: binary-indep binary-arch
 
69
.PHONY: build clean binary-indep binary-arch binary install