3
# Sample debian/rules that uses debhelper.
4
# GNU copyright 1997 to 1999 by Joey Hess.
6
# Uncomment this to turn on verbose mode.
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)
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}')
26
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
31
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
37
if [ -e debian/kernel ]; then rm -rf debian/kernel; fi
39
cd debian/kernel && tar jxvf /usr/src/$(KSRC).tar.bz2 && cd $(KSRC) && $(MAKE) include/asm
42
config.status: configure unpack
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
50
build-stamp: config.status
53
# Add here commands to compile the package.
61
rm -f build-stamp unpack-stamp
64
# Add here commands to clean up after the build process.
66
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
67
cp -f /usr/share/misc/config.sub config.sub
69
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
70
cp -f /usr/share/misc/config.guess config.guess
82
# Add here commands to install the package into debian/cpqarrayd.
83
$(MAKE) install DESTDIR=$(CURDIR)/debian/cpqarrayd
86
# Build architecture-independent files here.
87
binary-indep: build install
88
# We have nothing to do by default.
90
# Build architecture-dependent files here.
91
binary-arch: build install
94
dh_installchangelogs ChangeLog
100
# dh_installlogrotate
107
dh_installman cpqarrayd.1
121
binary: binary-indep binary-arch
122
.PHONY: unpack build clean binary-indep binary-arch binary install