File: rules

package info (click to toggle)
btrfs-progs 6.14-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 18,252 kB
  • sloc: ansic: 125,283; sh: 7,567; python: 1,386; makefile: 899; asm: 296
file content (45 lines) | stat: -rwxr-xr-x 1,259 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
43
44
45
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/default.mk

SHELL := sh -e

CFLAGS := $(patsubst -O2,-Os,$(CFLAGS) $(CPPFLAGS))

%:
	dh ${@} --with bash-completion,python3

override_dh_autoreconf:
	dh_autoreconf ./autogen.sh

override_dh_auto_configure:
	dh_auto_configure

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/usr/sbin
	mv debian/tmp/usr/bin/fsck.btrfs debian/tmp/usr/sbin/fsck.btrfs
	mv debian/tmp/usr/bin/mkfs.btrfs debian/tmp/usr/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:
	UDEVDIR=`pkg-config udev --variable=udevdir` && dh_install -p btrfs-progs --autodest $${UDEVDIR#/}
	dh_install
	dh_missing --list-missing

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