File: rules

package info (click to toggle)
ntfs-3g 1%3A2022.10.3-5
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,324 kB
  • sloc: ansic: 90,208; cpp: 882; makefile: 471; sh: 72
file content (109 lines) | stat: -rwxr-xr-x 3,251 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/usr/bin/make -f
# -*- makefile -*-

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

SHELL := sh -e

DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

SONAME = $(shell objdump -p debian/tmp/usr/lib/*/libntfs-3g.so.*.* | awk -Fso. '/SONAME/ { print $$2 }')

ifeq ($(DEB_HOST_ARCH_OS), linux)
CONFIGURE_FLAGS = --enable-posix-acls
endif

upstream:
	lynx -dump http://jp-andre.pagesperso-orange.fr/changelog.html > debian/local/changelog

%:
	dh ${@}

override_dh_auto_configure:
	dh_auto_configure -- --exec-prefix=/usr --enable-crypto \
		--enable-extras --enable-xattr-mappings \
		--enable-quarantined --disable-ldconfig \
		--enable-mount-helper --with-fuse=internal \
		$(CONFIGURE_FLAGS)

override_dh_auto_install:
	dh_auto_install

	# remove symlinks, will recreate them in /usr/sbin using dh_link
	rm debian/tmp/sbin/mount.ntfs-3g
	rm debian/tmp/sbin/mount.lowntfs-3g
	rmdir debian/tmp/sbin

	# adding initramfs-tools integration
	install -D -m 0755 debian/local/ntfs-3g.hook debian/ntfs-3g/usr/share/initramfs-tools/hooks/ntfs_3g
	install -D -m 0755 debian/local/ntfs-3g.local-premount debian/ntfs-3g/usr/share/initramfs-tools/scripts/local-premount/ntfs_3g
	install -D -m 0755 debian/local/ntfs-3g.local-bottom debian/ntfs-3g/usr/share/initramfs-tools/scripts/local-bottom/ntfs_3g

	# adding hal policy
	# not used by Debian anymore
	#install -D -m 0644 debian/local/25-ntfs-3g-policy.fdi debian/ntfs-3g/usr/share/hal/fdi/policy/10osvendor/25-ntfs-3g-policy.fdi

	# removing unused files
	rm -f debian/tmp/usr/lib/*/*.la

	# removing rpath
	for _PROGRAM in \
		usr/bin/lowntfs-3g \
		usr/bin/ntfs-3g \
		usr/bin/ntfs-3g.probe \
		usr/bin/ntfscat \
		usr/bin/ntfscluster \
		usr/bin/ntfscmp \
		usr/bin/ntfsck \
		usr/bin/ntfsdump_logfile \
		usr/bin/ntfsfix \
		usr/bin/ntfsinfo \
		usr/bin/ntfsls \
		usr/bin/ntfsmftalloc \
		usr/bin/ntfsmove \
		usr/bin/ntfssecaudit \
		usr/bin/ntfstruncate \
		usr/bin/ntfsusermap \
		usr/bin/ntfswipe \
		usr/sbin/mkntfs \
		usr/sbin/ntfsclone \
		usr/sbin/ntfscp \
		usr/sbin/ntfslabel \
		usr/sbin/ntfsresize \
		usr/sbin/ntfsundelete \
		usr/bin/ntfsdecrypt; \
	do \
		echo $${_PROGRAM}; \
		chrpath --delete debian/tmp/$${_PROGRAM}; \
	done

	# moving undocumented programs to ntfs-3g-dev
	mkdir -p debian/ntfs-3g-dev/usr/bin
	mv debian/tmp/usr/bin/ntfsdump_logfile debian/ntfs-3g-dev/usr/bin
	mv debian/tmp/usr/bin/ntfsmftalloc debian/ntfs-3g-dev/usr/bin
	mv debian/tmp/usr/bin/ntfsck debian/ntfs-3g-dev/usr/bin

#override_dh_gencontrol:
#	dh_gencontrol -- -Vntfs-3g:Provides="libntfs-3g$(SONAME)" -Vntfs-3g-udeb:Provides="libntfs-3g-udeb$(SONAME)"

override_dh_installchangelogs:
	dh_installchangelogs debian/local/changelog

override_dh_link:
	rm -rf debian/ntfs-3g-dev/usr/share/doc

	dh_link --remaining-packages

execute_before_dh_installdeb:
	chmod 4755 debian/ntfs-3g/usr/bin/ntfs-3g

override_dh_makeshlibs:
	dh_makeshlibs --add-udeb=ntfs-3g-udeb -Vlibntfs-3g$(SONAME)t64

.PHONY: override_dh_auto_configure override_dh_auto_install \
	override_dh_installchangelogs override_dh_link \
	execute_before_dh_installdeb override_dh_makeshlibs