~ubuntu-branches/ubuntu/trusty/cpqarrayd/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Matt Taggart
  • Date: 2004-09-24 00:18:24 UTC
  • Revision ID: james.westby@ubuntu.com-20040924001824-4yp91fxbs6tovkgz
Tags: 2.0-3
* Patch from Andrew Patterson to fix under Linux 2.6,
    closes: #257634, #262345
* Switch to build against Linux 2.6 source. This also happens to fix
    building on hppa, closes: #272821
* Change kernel-source build-dep to be "2.6.8 | 2.6" as a hint to
  buildds.
* Add note to README.Debian about needing example usage notes.
* Add note to README.Debian about testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# -*- makefile -*-
 
3
# Sample debian/rules that uses debhelper.
 
4
# GNU copyright 1997 to 1999 by Joey Hess.
 
5
 
 
6
# Uncomment this to turn on verbose mode.
 
7
#export DH_VERBOSE=1
 
8
 
 
9
 
 
10
# These are used for cross-compiling and for saving the configure script
 
11
# from having to guess our platform (since we know it already)
 
12
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
13
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
14
 
 
15
 
 
16
CFLAGS = -Wall -g
 
17
 
 
18
# find our kernel source version
 
19
# we can't just use the headers because the build actually needs
 
20
# stuff from the kernel tree :( thus the build-dep on kernel-source
 
21
# this is sucky way to do it but we don't have the shell's nice % and
 
22
# here and I can't be bothered to do it "the make way". Patches welcome.
 
23
KSRC=$(shell ls -d /usr/src/kernel-source-2.6*.tar.bz2 | tail -n1 |awk -F/usr/src/ '{print $$2}' |awk -F.tar.bz2 '{print $$1}')
 
24
PWD=$(shell pwd)
 
25
 
 
26
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
27
        CFLAGS += -O0
 
28
else
 
29
        CFLAGS += -O2
 
30
endif
 
31
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
32
        INSTALL_PROGRAM += -s
 
33
endif
 
34
 
 
35
unpack: unpack-stamp
 
36
unpack-stamp:
 
37
        if [ -e debian/kernel ]; then rm -rf debian/kernel; fi
 
38
        mkdir debian/kernel
 
39
        cd debian/kernel && tar jxvf /usr/src/$(KSRC).tar.bz2 && cd $(KSRC) && $(MAKE) include/asm
 
40
        touch unpack-stamp
 
41
 
 
42
config.status: configure unpack
 
43
        dh_testdir
 
44
        # Add here commands to configure the package.
 
45
        # NOTE: backports to woody will need --disable-snmptrap
 
46
        ./configure --with-kernel=$(PWD)/debian/kernel/$(KSRC) --prefix=/usr --mandir=\$${prefix}/share/man
 
47
 
 
48
build: build-stamp
 
49
 
 
50
build-stamp:  config.status
 
51
        dh_testdir
 
52
 
 
53
        # Add here commands to compile the package.
 
54
        $(MAKE)
 
55
 
 
56
        touch build-stamp
 
57
 
 
58
clean:
 
59
        dh_testdir
 
60
        dh_testroot
 
61
        rm -f build-stamp unpack-stamp
 
62
        rm -rf debian/kernel
 
63
 
 
64
        # Add here commands to clean up after the build process.
 
65
        -$(MAKE) distclean
 
66
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
 
67
        cp -f /usr/share/misc/config.sub config.sub
 
68
endif
 
69
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
 
70
        cp -f /usr/share/misc/config.guess config.guess
 
71
endif
 
72
 
 
73
 
 
74
        dh_clean 
 
75
 
 
76
install: build
 
77
        dh_testdir
 
78
        dh_testroot
 
79
        dh_clean -k 
 
80
        dh_installdirs
 
81
 
 
82
        # Add here commands to install the package into debian/cpqarrayd.
 
83
        $(MAKE) install DESTDIR=$(CURDIR)/debian/cpqarrayd
 
84
        
 
85
 
 
86
# Build architecture-independent files here.
 
87
binary-indep: build install
 
88
# We have nothing to do by default.
 
89
 
 
90
# Build architecture-dependent files here.
 
91
binary-arch: build install
 
92
        dh_testdir
 
93
        dh_testroot
 
94
        dh_installchangelogs ChangeLog
 
95
        dh_installdocs
 
96
        dh_installexamples
 
97
#       dh_install
 
98
#       dh_installmenu
 
99
#       dh_installdebconf       
 
100
#       dh_installlogrotate
 
101
#       dh_installemacsen
 
102
#       dh_installpam
 
103
#       dh_installmime
 
104
        dh_installinit
 
105
#       dh_installcron
 
106
#       dh_installinfo
 
107
        dh_installman cpqarrayd.1
 
108
        dh_link
 
109
        dh_strip
 
110
        dh_compress
 
111
        dh_fixperms
 
112
#       dh_perl
 
113
#       dh_python
 
114
#       dh_makeshlibs
 
115
        dh_installdeb
 
116
        dh_shlibdeps
 
117
        dh_gencontrol
 
118
        dh_md5sums
 
119
        dh_builddeb
 
120
 
 
121
binary: binary-indep binary-arch
 
122
.PHONY: unpack build clean binary-indep binary-arch binary install