~ubuntu-branches/ubuntu/maverick/ipmitool/maverick

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Petter Reinholdtsen
  • Date: 2005-04-07 01:18:44 UTC
  • Revision ID: james.westby@ubuntu.com-20050407011844-a1b206z5iefiu5vi
Tags: upstream-1.8.1
ImportĀ upstreamĀ versionĀ 1.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
 
 
3
#export DH_VERBOSE=1
 
4
export DH_COMPAT=4
 
5
export DH_OPTIONS
 
6
 
 
7
CFLAGS = -Wall -g
 
8
 
 
9
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
10
        CFLAGS += -O0
 
11
else
 
12
        CFLAGS += -O2
 
13
endif
 
14
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
15
        INSTALL_PROGRAM += -s
 
16
endif
 
17
 
 
18
configure: configure-stamp
 
19
configure-stamp:
 
20
        dh_testdir
 
21
        ./configure --prefix=/usr \
 
22
                    --with-kerneldir \
 
23
                    --mandir=/usr/share/man
 
24
        touch configure-stamp
 
25
 
 
26
#Architecture 
 
27
build: build-arch build-indep
 
28
 
 
29
build-arch: build-arch-stamp
 
30
build-arch-stamp: configure-stamp 
 
31
 
 
32
# Add here commands to compile the arch part of the package.
 
33
        $(MAKE)
 
34
 
 
35
build-indep: build-indep-stamp
 
36
build-indep-stamp: configure-stamp 
 
37
 
 
38
# Add here commands to compile the indep part of the package.
 
39
#$(MAKE) doc
 
40
 
 
41
clean:
 
42
        dh_testdir
 
43
        dh_testroot
 
44
        rm -f build-arch-stamp build-indep-stamp configure-stamp
 
45
 
 
46
# Add here commands to clean up after the build process.
 
47
        -$(MAKE) distclean
 
48
 
 
49
        dh_clean
 
50
 
 
51
install: install-arch #install-indep
 
52
install-indep:
 
53
        dh_testdir
 
54
        dh_testroot
 
55
        dh_clean -k -i
 
56
        dh_installdirs -i
 
57
 
 
58
# Add here commands to install the indep part of the package into
 
59
# debian/<package>-doc.
 
60
#INSTALLDOC#
 
61
#       $(MAKE) install-doc DESTDIR=$(CURDIR)/debian/tmp/ipmitool-doc
 
62
#       dh_movefiles -i
 
63
 
 
64
install-arch:
 
65
        dh_testdir
 
66
        dh_testroot
 
67
        dh_clean -k -a
 
68
        dh_installdirs -a
 
69
 
 
70
# Add here commands to install the arch part of the package into 
 
71
# debian/tmp.
 
72
        $(MAKE) install DESTDIR=$(CURDIR)/debian/ipmitool
 
73
 
 
74
        # No need to have two copies of the license text in the package.
 
75
        $(RM) $(CURDIR)/debian/ipmitool/usr/share/doc/ipmitool/COPYING
 
76
 
 
77
        # Move upstream changelog to correct filename.
 
78
        mv $(CURDIR)/debian/ipmitool/usr/share/doc/ipmitool/ChangeLog \
 
79
          $(CURDIR)/debian/ipmitool/usr/share/doc/ipmitool/changelog
 
80
 
 
81
        # Compress to avoid lintian warning.  Not sure why dh_compress
 
82
        # isn't fixing this.
 
83
        gzip -9 $(CURDIR)/debian/ipmitool/usr/share/doc/ipmitool/changelog
 
84
 
 
85
#       dh_movefiles -a
 
86
# Must not depend on anything. This is to be called by
 
87
# binary-arch/binary-multi
 
88
# in another 'make' thread.
 
89
binary-common:
 
90
        dh_testdir
 
91
        dh_testroot
 
92
        dh_installdocs
 
93
        dh_installchangelogs 
 
94
        dh_link
 
95
        dh_strip
 
96
        dh_compress 
 
97
        dh_fixperms
 
98
        dh_makeshlibs
 
99
        dh_shlibdeps
 
100
        dh_installdeb
 
101
        dh_gencontrol
 
102
        dh_md5sums
 
103
        dh_builddeb
 
104
# Build architecture independant packages using the common target.
 
105
binary-indep: build-indep install-indep
 
106
        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
 
107
 
 
108
# Build architecture dependant packages using the common target.
 
109
binary-arch: build-arch install-arch
 
110
        $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
 
111
 
 
112
binary: binary-arch #binary-indep
 
113
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure
 
114