File: rules

package info (click to toggle)
btrfs-progs 5.10.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 16,028 kB
  • sloc: ansic: 96,117; sh: 8,146; python: 1,149; makefile: 811
file content (49 lines) | stat: -rwxr-xr-x 1,256 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
#!/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 ${@} --with bash-completion,python3

override_dh_autoreconf:
	dh_autoreconf ./autogen.sh

override_dh_auto_configure:
	dh_auto_configure -- --bindir=/bin

override_dh_auto_build:
	dh_auto_build -- V=1

override_dh_auto_install:
	dh_auto_install -- install
	cd libbtrfsutil/python; \
		python3 setup.py install --install-layout=deb --skip-build --root ../../debian/tmp --prefix /usr
	mkdir -p debian/tmp/sbin
	mv debian/tmp/bin/fsck.btrfs debian/tmp/sbin/fsck.btrfs
	mv debian/tmp/bin/mkfs.btrfs debian/tmp/sbin/mkfs.btrfs

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

# Needs autopkgtest
override_dh_auto_test:

override_dh_install:
	dh_install
	dh_missing --list-missing

override_dh_auto_clean:
	if test -f Makefile.inc; then \
		dh_auto_clean; \
	fi