File: rules

package info (click to toggle)
hwtools 0.8-0.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,316 kB
  • ctags: 1,141
  • sloc: ansic: 6,028; asm: 2,223; makefile: 278; sh: 109; csh: 42
file content (77 lines) | stat: -rwxr-xr-x 2,203 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/make -f
# Derived from debhelper/dh_make example, and Cristoph Lameter's file. -joy

#export DH_VERBOSE=1
export DH_COMPAT=1
CFLAGS = -g -O2 -Wall
SHELL = /bin/bash -e

build: build-stamp
build-stamp:
	dh_testdir

	cd irqtune && $(MAKE) kvers sbin
	cd scanport/src && gcc $(CFLAGS) -s -o scanport scanport.c && gcc $(CFLAGS) -s -o inb inb.c
	cd tpqic02-support-1.9b && $(MAKE) CFLAGS="$(CFLAGS)" qic02conf
	cd memmxtest/src && $(MAKE)

	touch $@

clean:
	dh_testdir
	dh_testroot

	for i in irqtune memmxtest/src; do \
          $(MAKE) -C $$i clean ; done
	rm -f tpqic02-support-1.9b/qic02conf
	cd scanport/src && rm -f scanport inb

	dh_clean build-stamp

install: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs sbin usr/sbin usr/lib/hwtools \
          usr/share/man/man5 usr/share/man/man8 usr/share/doc/hwtools

	cd irqtune && $(MAKE) install DESTDIR=../../debian/tmp
	install -m755 irqtune-wrapper debian/tmp/usr/sbin/irqtune
	cp -a scanport/src/scanport debian/tmp/sbin
	cp -a scanport/src/inb debian/tmp/sbin
	cp -a tpqic02-support-1.9b/qic02conf debian/tmp/usr/sbin/
	cp -a memmxtest/src/image debian/tmp/usr/lib/hwtools/memmxtest.bin
# DOS executables
#	cp -a scanport/dos/*.exe debian/tmp/usr/lib/hwtools
#	chmod a-x debian/tmp/usr/lib/hwtools/{*.o,*.exe}
	chmod a-x debian/tmp/usr/lib/hwtools/*.o
# Documentation
	cp -a irqtune/README debian/tmp/usr/share/doc/hwtools/README.irqtune
	cp -a irqtune/README.html debian/tmp/usr/share/doc/hwtools/irqtune.html
	cp -a scanport/README-inb debian/tmp/usr/share/doc/hwtools/README.inb
	cp -a scanport/README-scanport debian/tmp/usr/share/doc/hwtools/README.scanport
	cp -a memmxtest/doc/MANUAL debian/tmp/usr/share/doc/hwtools/MANUAL.memmxtest

binary-indep:
# There are no architecture-independent packages here.

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installchangelogs
	dh_installmanpages mt.1 cpio.1 buffer.1
	dh_undocumented inb.8 irqtune.8 scanport.8
	dh_installinit -nr
	dh_installdebconf
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary