File: rules

package info (click to toggle)
sg3-utils 1.44-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 7,056 kB
  • sloc: ansic: 93,218; sh: 7,607; cpp: 2,947; makefile: 447
file content (43 lines) | stat: -rwxr-xr-x 1,184 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
#!/usr/bin/make -f
# debian/rules file for the sg3-utils package

# This has to be exported to make some magic below work.
export DH_OPTIONS


# For Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# Uncomment this to turn on verbose mode. 
# export DH_VERBOSE=1

DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)

INITRAMFS=$(CURDIR)/debian/sg3-utils-udev/usr/share/initramfs-tools/

%:
	dh "$@" --with autoreconf

override_dh_install:
	dh_testdir
	dh_install

	[ ! -f scripts/55-scsi-sg3_id.rules ] || cp scripts/55-scsi-sg3_id.rules debian/sg3-utils-udev.scsi-sg3_id.udev
	[ ! -f scripts/58-scsi-sg3_symlink.rules ] || cp scripts/58-scsi-sg3_symlink.rules debian/sg3-utils-udev.scsi-sg3_symlink.udev

	dh_installudev -psg3-utils-udev --priority=55 --name=scsi-sg3_id 
	dh_installudev -psg3-utils-udev --priority=58 --name=scsi-sg3_symlink 

	install -D -m 755 debian/initramfs/hooks $(INITRAMFS)/hooks/sg3-utils

override_dh_clean:
	dh_testdir

	rm -f debian/sg3-utils-udev.scsi-sg3_id.udev
	rm -f debian/sg3-utils-udev.scsi-sg3_symlink.udev

	dh_clean

.PHONY: get-orig-source