File: rules

package info (click to toggle)
fuse 2.9.9-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 9,640 kB
  • sloc: ansic: 16,565; sh: 4,876; makefile: 164
file content (68 lines) | stat: -rwxr-xr-x 1,928 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/make -f
# -*- makefile -*-

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

SHELL := sh -e

DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh ${@}

override_dh_autoreconf:
	ln -s /usr/share/gettext/config.rpath $(CURDIR)
	dh_autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --bindir=/bin --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_compress:
	dh_compress -Xusr/share/doc/libfuse-dev/examples

override_dh_fixperms:
	dh_fixperms

ifeq ($(DEB_BUILD_ARCH),linux)
	chmod 0755 debian/fuse/bin/fusermount
endif

override_dh_install:
	# remove unused files
	rm -f debian/tmp/etc/init.d/fuse
	rm -f debian/tmp/etc/udev/rules.d/99-fuse.rules
	rm -f debian/tmp/usr/lib/*/*.la

	dh_install --fail-missing

	# adjusting /lib for multiarch
	mkdir -p debian/libfuse2/lib/$(DEB_HOST_MULTIARCH)
	mv debian/libfuse2/lib/*.so* debian/libfuse2/lib/$(DEB_HOST_MULTIARCH)
	mkdir -p debian/libfuse2-udeb/lib/$(DEB_HOST_MULTIARCH)
	mv debian/libfuse2-udeb/lib/*.so* debian/libfuse2-udeb/lib/$(DEB_HOST_MULTIARCH)

	# adding initramfs-tools integration
	install -D -m 0755 debian/local/fuse.hook debian/fuse/usr/share/initramfs-tools/hooks/fuse

	# adding kmod integration
#	install -D -m 0644 debian/local/fuse.kmod debian/fuse/lib/modules-load.d/fuse.conf

override_dh_link:
	# correcting symlink targets
	for LIB in debian/tmp/usr/lib/*/*.so; \
	do \
		dh_link -plibfuse-dev lib/$(DEB_HOST_MULTIARCH)/$$(basename $$(readlink $${LIB})) usr/lib/$(DEB_HOST_MULTIARCH)/$$(basename $${LIB}); \
	done

	dh_link --remaining-packages

override_dh_makeshlibs:
	dh_makeshlibs -s --add-udeb=libfuse2-udeb

.PHONY: override_dh_autoreconf override_dh_auto_configure \
	override_dh_compress override_dh_fixperms \
	override_dh_install override_dh_link override_dh_makeshlibs