File: rules

package info (click to toggle)
btrfs-tools 3.17-1.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,928 kB
  • ctags: 4,957
  • sloc: ansic: 54,207; python: 354; makefile: 335; sh: 212
file content (42 lines) | stat: -rwxr-xr-x 1,426 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
  CC := $(DEB_HOST_GNU_TYPE)-gcc
else
  CC := gcc
endif

SHELL := sh -e

CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
CFLAGS := $(patsubst -O2,-Os,$(CFLAGS))

%:
	dh ${@}

override_dh_auto_build:
	dh_auto_build -- all btrfs-select-super btrfs-calc-size CFLAGS="$(CFLAGS)" CC="$(CC)" BUILD_VERBOSE=1

override_dh_auto_install:
	dh_auto_install -- DESTDIR=$(CURDIR)/debian/btrfs-tools prefix=/usr bindir=/sbin mandir=/usr/share/man libdir=/usr/lib/$(DEB_HOST_MULTIARCH)

	# Adding udev integration
	install -D -m 0644 debian/local/btrfs.udev debian/btrfs-tools/lib/udev/rules.d/70-btrfs.rules
	install -D -m 0644 debian/local/btrfs-lvm.udev debian/btrfs-tools/lib/udev/rules.d/80-btrfs-lvm.rules

	# Adding initramfs-tools integration
	install -D -m 0755 debian/local/btrfs.hook debian/btrfs-tools/usr/share/initramfs-tools/hooks/btrfs
	install -D -m 0755 debian/local/btrfs.local-premount debian/btrfs-tools/usr/share/initramfs-tools/scripts/local-premount/btrfs

# Needs autopkgtest
override_dh_auto_test:

override_dh_strip:
	dh_strip --dbg-package=btrfs-tools-dbg

# distclean target does not exist and make would waste time generating
# dependency files and version.h before failing. debhelper < 9.20130624
# would even think distclean exists because something is printed.
override_dh_auto_clean:
	make clean