File: rules

package info (click to toggle)
ntfs-3g 1:2017.3.23AR.3-3
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,148 kB
  • sloc: ansic: 89,041; sh: 11,411; cpp: 876; makefile: 474
file content (114 lines) | stat: -rwxr-xr-x 3,392 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
110
111
112
113
114
#!/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/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=/ --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

	# moving shlib to /
	mkdir -p debian/tmp/lib/$(DEB_HOST_MULTIARCH)
	mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.so.* debian/tmp/lib/$(DEB_HOST_MULTIARCH)

	# moving ntfsdecrypt, depends on /usr
	mkdir -p debian/tmp/usr/bin
	mv debian/tmp/bin/ntfsdecrypt debian/tmp/usr/bin

	# 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
	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 \
		bin/lowntfs-3g \
		bin/ntfs-3g \
		bin/ntfs-3g.probe \
		bin/ntfscat \
		bin/ntfscluster \
		bin/ntfscmp \
		bin/ntfsck \
		bin/ntfsdump_logfile \
		bin/ntfsfix \
		bin/ntfsinfo \
		bin/ntfsls \
		bin/ntfsmftalloc \
		bin/ntfsmove \
		bin/ntfssecaudit \
		bin/ntfstruncate \
		bin/ntfsusermap \
		bin/ntfswipe \
		sbin/mkntfs \
		sbin/ntfsclone \
		sbin/ntfscp \
		sbin/ntfslabel \
		sbin/ntfsresize \
		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/bin/ntfsdump_logfile debian/ntfs-3g-dev/usr/bin
	mv debian/tmp/bin/ntfsmftalloc debian/ntfs-3g-dev/usr/bin
	mv debian/tmp/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_install:
	dh_install --fail-missing

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

	# correcting symlink target
	dh_link -pntfs-3g-dev lib/$(DEB_HOST_MULTIARCH)/$$(basename $$(readlink debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libntfs-3g.so)) usr/lib/$(DEB_HOST_MULTIARCH)/libntfs-3g.so

	dh_link --remaining-packages

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

.PHONY: override_dh_auto_configure override_dh_auto_install \
	override_dh_installchangelogs override_dh_install \
	override_dh_link override_dh_makeshlibs