File: rules

package info (click to toggle)
scsitools 0.12-3
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,244 kB
  • sloc: ansic: 6,043; tcl: 2,144; sh: 923; makefile: 100
file content (52 lines) | stat: -rwxr-xr-x 2,284 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
#!/usr/bin/make -f
# Derived from debhelper/dh_make example, and Cristoph Lameter's file. -joy

#export DH_VERBOSE=1
CFLAGS = -g -O2 -Wall -fsigned-char

#architecture := $(shell dpkg-architecture -qDEB_HOST_ARCH)
p = scsitools

%:
	dh $@

getsrcfromsvn:
	# get sources from Alioth
	svn export svn+ssh://delaunay@svn.debian.org/svn/collab-maint/deb-maint/scsitools/branches/upstream/current/ .

override_dh_auto_build:
	cd scsiinfo && $(MAKE) KERNEL_INCLUDES="-fsigned-char" LDFLAGS=
	cd scsidev && CFLAGS="$(CFLAGS)" ./configure --prefix=/usr \
          --mandir='${prefix}'/share/man && $(MAKE)
	cd sraw && gcc $(CFLAGS) -o sraw srawread.c
	gcc $(CFLAGS) -o scsi-spin debian/scsi-spin.c
	#dh_auto_build

override_dh_auto_clean:
	for i in scsiinfo scsidev ; do $(MAKE) -C $$i clean || true ; done
	dh_auto_clean

override_dh_auto_install:
	dh_auto_install
	install -m 755 -p debian/scsitools-pre.sh debian/$(p)/etc/init.d/
	install -m 755 -p debian/scsitools.sh debian/$(p)/etc/init.d/
	cd scsiinfo && $(MAKE) install DESTDIR=../debian/$(p)
	install -m 755 scsidev/scsidev debian/$(p)/sbin
	#install -m 755 scsidev/scsidevfs.so debian/$(p)/lib
	#install -m 644 scsidev/devfsd.conf debian/$(p)/etc/devfs/conf.d/scsitools
	install -m 755 sraw/sraw debian/$(p)/usr/sbin
	install -m 755 scsi-spin debian/$(p)/sbin
	install -m 755 rescan-scsi-bus/rescan-scsi-bus.sh debian/$(p)/sbin/rescan-scsi-bus
	install -m 644 debian/lintian-overrides debian/$(p)/usr/share/lintian/overrides/scsitools
	# Documentation
	cp -a scsiinfo/0-TODO debian/$(p)/usr/share/doc/scsitools/TODO.scsiinfo
	cp -a scsiinfo/0-CHANGES debian/$(p)/usr/share/doc/scsitools/CHANGES.scsiinfo
	cp -a scsiinfo/0-README.first debian/$(p)/usr/share/doc/scsitools/README.scsiinfo
	cp -a scsidev/README debian/$(p)/usr/share/doc/scsitools/README.scsidev
	awk '/#include/ {exit};{print}' scsidev/scsidev.c > debian/$(p)/usr/share/doc/scsitools/CHANGES.scsidev
	ln -s CHANGES.scsidev debian/$(p)/usr/share/doc/scsitools/changelog
	cp -a sraw/README debian/$(p)/usr/share/doc/scsitools/README.sraw
	cp -a sraw/kpatch debian/$(p)/usr/share/doc/scsitools/kpatch.sraw
	cp -a debian/README.scsi-spin debian/$(p)/usr/share/doc/scsitools/README.scsi-spin
	cp -a debian/kernel-source-2.2.14.espfix debian/$(p)/usr/share/doc/scsitools/