Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 SHELL := sh -e
8
9 DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
10 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
11
12 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
13
14 SONAME = $(shell objdump -p debian/tmp/usr/lib/*/libntfs-3g.so.*.* | awk -Fso. '/SONAME/ { print $$2 }')
15
16 ifeq ($(DEB_HOST_ARCH_OS), linux)
17 CONFIGURE_FLAGS = --enable-posix-acls
18 endif
19
20 upstream:
21 lynx -dump http://jp-andre.pagesperso-orange.fr/changelog.html > debian/local/changelog
22
23 %:
24 dh ${@}
25
26 override_dh_auto_configure:
27 dh_auto_configure -- --exec-prefix=/usr --enable-crypto \
28 --enable-extras --enable-xattr-mappings \
29 --enable-quarantined --disable-ldconfig \
30 --enable-mount-helper --with-fuse=internal \
31 $(CONFIGURE_FLAGS)
32
33 override_dh_auto_install:
34 dh_auto_install
35
36 # remove symlinks, will recreate them in /usr/sbin using dh_link
37 rm debian/tmp/sbin/mount.ntfs-3g
38 rm debian/tmp/sbin/mount.lowntfs-3g
39 rmdir debian/tmp/sbin
40
41 # adding initramfs-tools integration
42 install -D -m 0755 debian/local/ntfs-3g.hook debian/ntfs-3g/usr/share/initramfs-tools/hooks/ntfs_3g
43 install -D -m 0755 debian/local/ntfs-3g.local-premount debian/ntfs-3g/usr/share/initramfs-tools/scripts/local-premount/ntfs_3g
44 install -D -m 0755 debian/local/ntfs-3g.local-bottom debian/ntfs-3g/usr/share/initramfs-tools/scripts/local-bottom/ntfs_3g
45
46 # adding hal policy
47 # not used by Debian anymore
48 #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
49
50 # removing unused files
51 rm -f debian/tmp/usr/lib/*/*.la
52
53 # removing rpath
54 for _PROGRAM in \
55 usr/bin/lowntfs-3g \
56 usr/bin/ntfs-3g \
57 usr/bin/ntfs-3g.probe \
58 usr/bin/ntfscat \
59 usr/bin/ntfscluster \
60 usr/bin/ntfscmp \
61 usr/bin/ntfsck \
62 usr/bin/ntfsdump_logfile \
63 usr/bin/ntfsfix \
64 usr/bin/ntfsinfo \
65 usr/bin/ntfsls \
66 usr/bin/ntfsmftalloc \
67 usr/bin/ntfsmove \
68 usr/bin/ntfssecaudit \
69 usr/bin/ntfstruncate \
70 usr/bin/ntfsusermap \
71 usr/bin/ntfswipe \
72 usr/sbin/mkntfs \
73 usr/sbin/ntfsclone \
74 usr/sbin/ntfscp \
75 usr/sbin/ntfslabel \
76 usr/sbin/ntfsresize \
77 usr/sbin/ntfsundelete \
78 usr/bin/ntfsdecrypt; \
79 do \
80 echo $${_PROGRAM}; \
81 chrpath --delete debian/tmp/$${_PROGRAM}; \
82 done
83
84 # moving undocumented programs to ntfs-3g-dev
85 mkdir -p debian/ntfs-3g-dev/usr/bin
86 mv debian/tmp/usr/bin/ntfsdump_logfile debian/ntfs-3g-dev/usr/bin
87 mv debian/tmp/usr/bin/ntfsmftalloc debian/ntfs-3g-dev/usr/bin
88 mv debian/tmp/usr/bin/ntfsck debian/ntfs-3g-dev/usr/bin
89
90 #override_dh_gencontrol:
91 # dh_gencontrol -- -Vntfs-3g:Provides="libntfs-3g$(SONAME)" -Vntfs-3g-udeb:Provides="libntfs-3g-udeb$(SONAME)"
92
93 override_dh_installchangelogs:
94 dh_installchangelogs debian/local/changelog
95
96 override_dh_link:
97 rm -rf debian/ntfs-3g-dev/usr/share/doc
98
99 dh_link --remaining-packages
100
101 execute_before_dh_installdeb:
102 chmod 4755 debian/ntfs-3g/usr/bin/ntfs-3g
103
104 override_dh_makeshlibs:
105 dh_makeshlibs --add-udeb=ntfs-3g-udeb -Vlibntfs-3g$(SONAME)t64
106
107 .PHONY: override_dh_auto_configure override_dh_auto_install \
108 override_dh_installchangelogs override_dh_link \
109 execute_before_dh_installdeb override_dh_makeshlibs