4 # The binary-indep dependency chain is:
6 # install-headers <- install-doc <- install-source <- install-tools <- install-indep <- binary-indep
7 # install-headers <- binary-headers
9 indep_hdrpkg
= $(indep_hdrs_pkg_name
)
10 indep_hdrdir
= $(CURDIR
)/debian
/$(indep_hdrpkg
)/usr
/src
/$(indep_hdrpkg
)
11 install-headers
: prepare-indep
16 ifeq ($(do_flavour_header_package
),true
)
17 install -d
$(indep_hdrdir
)
18 find .
-path
'./debian' -prune
-o
-path
'./$(DEBIAN)' -prune \
19 -o
-path
'./include/*' -prune \
20 -o
-path
'./scripts/*' -prune
-o
-type f \
21 \
( -name
'Makefile*' -o
-name
'Kconfig*' -o
-name
'Kbuild*' -o \
22 -name
'*.sh' -o
-name
'*.pl' -o
-name
'*.lds' \
) \
23 -print | cpio
-pd
--preserve-modification-time
$(indep_hdrdir
)
24 cp
-a scripts
include $(indep_hdrdir
)
25 (find arch
-name
include -type d
-print | \
26 xargs
-n1
-i
: find
: -type f
) | \
27 cpio
-pd
--preserve-modification-time
$(indep_hdrdir
)
30 docpkg
= $(doc_pkg_name
)
31 docdir
= $(CURDIR
)/debian
/$(docpkg
)/usr
/share
/doc
/$(docpkg
)
32 install-doc
: prepare-indep
34 ifeq ($(do_doc_package
),true
)
39 ifeq ($(do_doc_package_content
),true
)
40 # First the html docs. We skip these for autobuilds
41 if
[ -z
"$(AUTOBUILD)" ]; then \
42 install -d
$(docdir
)/$(doc_pkg_name
)-tmp
; \
43 $(kmake
) O
=$(docdir
)/$(doc_pkg_name
)-tmp htmldocs
; \
44 install -d
$(docdir
)/html
; \
45 rsync
-aL
$(docdir
)/$(doc_pkg_name
)-tmp
/Documentation
/output
/ \
47 rm -rf
$(docdir
)/$(doc_pkg_name
)-tmp
; \
51 cp
-a Documentation
/* $(docdir
)
52 find
$(docdir
) -name .gitignore | xargs
rm -f
55 srcpkg
= linux-source-
$(release
)
56 srcdir = $(CURDIR
)/debian
/$(srcpkg
)/usr
/src
/$(srcpkg
)
57 balldir
= $(CURDIR
)/debian
/$(srcpkg
)/usr
/src
/$(srcpkg
)/$(srcpkg
)
58 install-source
: prepare-indep
60 ifeq ($(do_source_package
),true
)
63 ifeq ($(do_source_package_content
),true
)
64 find .
-path
'./debian' -prune
-o
-path
'./$(DEBIAN)' -prune
-o \
65 -path
'./.*' -prune
-o
-print | \
66 cpio
-pd
--preserve-modification-time
$(balldir
)
67 (cd
$(srcdir); tar cf
- $(srcpkg
)) | bzip2
-9c
> \
68 $(srcdir)/$(srcpkg
).
tar.bz2
70 find
'./debian' './$(DEBIAN)' \
71 -path
'./debian/linux-*' -prune
-o \
72 -path
'./debian/$(src_pkg_name)-*' -prune
-o \
73 -path
'./debian/build' -prune
-o \
74 -path
'./debian/files' -prune
-o \
75 -path
'./debian/stamps' -prune
-o \
76 -path
'./debian/tmp' -prune
-o \
78 cpio
-pd
--preserve-modification-time
$(srcdir)
79 $(LN
) $(srcpkg
)/$(srcpkg
).
tar.bz2
$(srcdir)/..
83 install-tools
: toolspkg
= $(tools_common_pkg_name
)
84 install-tools
: toolsbin
= $(CURDIR
)/debian
/$(toolspkg
)/usr
/bin
85 install-tools
: toolssbin
= $(CURDIR
)/debian
/$(toolspkg
)/usr
/sbin
86 install-tools
: toolsman
= $(CURDIR
)/debian
/$(toolspkg
)/usr
/share
/man
87 install-tools
: hosttoolspkg
= $(hosttools_pkg_name
)
88 install-tools
: hosttoolsbin
= $(CURDIR
)/debian
/$(hosttoolspkg
)/usr
/bin
89 install-tools
: hosttoolsman
= $(CURDIR
)/debian
/$(hosttoolspkg
)/usr
/share
/man
90 install-tools
: cloudpkg
= $(cloud_common_pkg_name
)
91 install-tools
: cloudbin
= $(CURDIR
)/debian
/$(cloudpkg
)/usr
/bin
92 install-tools
: cloudsbin
= $(CURDIR
)/debian
/$(cloudpkg
)/usr
/sbin
93 install-tools
: cloudman
= $(CURDIR
)/debian
/$(cloudpkg
)/usr
/share
/man
94 install-tools
: prepare-indep
$(stampdir
)/stamp-build-perarch
97 ifeq ($(do_tools_common
),true
)
98 rm -rf
$(builddir
)/tools
99 install -d
$(builddir
)/tools
100 for i in
*; do
$(LN
) $(CURDIR
)/$$i $(builddir
)/tools
/; done
101 rm $(builddir
)/tools
/tools
102 rsync
-a tools
/ $(builddir
)/tools
/tools
/
104 install -d
$(toolsbin
)
105 install -d
$(toolsman
)/man1
107 install -m755 debian
/tools
/generic
$(toolsbin
)/usbip
108 install -m755 debian
/tools
/generic
$(toolsbin
)/usbipd
109 install -m644
$(CURDIR
)/tools
/usb
/usbip
/doc
/*.8 $(toolsman
)/man1
/
111 install -m755 debian
/tools
/generic
$(toolsbin
)/cpupower
112 install -m644
$(CURDIR
)/tools
/power
/cpupower
/man
/*.1 $(toolsman
)/man1
/
114 install -m755 debian
/tools
/generic
$(toolsbin
)/perf
116 install -m755 debian
/tools
/generic
$(toolsbin
)/x86_energy_perf_policy
117 install -m755 debian
/tools
/generic
$(toolsbin
)/turbostat
119 cd
$(builddir
)/tools
/tools
/perf
&& make man
120 install -m644
$(builddir
)/tools
/tools
/perf
/Documentation
/*.1 \
123 install -d
$(toolsman
)/man8
124 install -m644
$(CURDIR
)/tools
/power
/x86
/x86_energy_perf_policy
/*.8 $(toolsman
)/man8
125 install -m644
$(CURDIR
)/tools
/power
/x86
/turbostat
/*.8 $(toolsman
)/man8
127 ifeq ($(do_cloud_tools
),true
)
128 ifeq ($(do_tools_hyperv
),true
)
129 install -d
$(cloudsbin
)
130 install -m755 debian
/tools
/generic
$(cloudsbin
)/hv_kvp_daemon
131 install -m755 debian
/tools
/generic
$(cloudsbin
)/hv_vss_daemon
132 install -m755 debian
/tools
/generic
$(cloudsbin
)/hv_fcopy_daemon
133 install -m755 debian
/tools
/generic
$(cloudsbin
)/lsvmbus
134 install -m755 debian
/cloud-tools
/hv_get_dhcp_info
$(cloudsbin
)
135 install -m755 debian
/cloud-tools
/hv_get_dns_info
$(cloudsbin
)
136 install -m755 debian
/cloud-tools
/hv_set_ifconfig
$(cloudsbin
)
138 install -d
$(cloudman
)/man8
139 install -m644
$(CURDIR
)/tools
/hv
/*.8 $(cloudman
)/man8
143 ifeq ($(do_tools_acpidbg
),true
)
144 install -m755 debian
/tools
/generic
$(toolsbin
)/acpidbg
149 ifeq ($(do_tools_host
),true
)
150 install -d
$(hosttoolsbin
)
151 install -d
$(hosttoolsman
)/man1
153 install -m
755 $(CURDIR
)/tools
/kvm
/kvm_stat
/kvm_stat
$(hosttoolsbin
)/
155 cd
$(builddir
)/tools
/tools
/kvm
/kvm_stat
&& make man
156 install -m644
$(builddir
)/tools
/tools
/kvm
/kvm_stat
/*.1 \
164 install-indep
: install-headers install-doc install-source install-tools
167 # This is just to make it easy to call manually. Normally done in
168 # binary-indep target during builds.
169 binary-headers
: prepare-indep install-headers
171 dh_installchangelogs
-p
$(indep_hdrpkg
)
172 dh_installdocs
-p
$(indep_hdrpkg
)
173 dh_compress
-p
$(indep_hdrpkg
)
174 dh_fixperms
-p
$(indep_hdrpkg
)
175 dh_installdeb
-p
$(indep_hdrpkg
)
176 $(lockme
) dh_gencontrol
-p
$(indep_hdrpkg
)
177 dh_md5sums
-p
$(indep_hdrpkg
)
178 dh_builddeb
-p
$(indep_hdrpkg
)
180 binary-indep
: cloudpkg
= $(cloud_common_pkg_name
)
181 binary-indep
: install-indep
183 dh_installchangelogs
-i
187 ifeq ($(do_tools_common
),true
)
188 ifeq ($(do_cloud_tools
),true
)
189 ifeq ($(do_tools_hyperv
),true
)
190 dh_installinit
-p
$(cloudpkg
) -n
--name hv-kvp-daemon
191 dh_installinit
-p
$(cloudpkg
) -n
--name hv-vss-daemon
192 dh_installinit
-p
$(cloudpkg
) -n
--name hv-fcopy-daemon
193 dh_systemd_enable
-p
$(cloudpkg
)
194 dh_installinit
-p
$(cloudpkg
) -o
--name hv-kvp-daemon
195 dh_installinit
-p
$(cloudpkg
) -o
--name hv-vss-daemon
196 dh_installinit
-p
$(cloudpkg
) -o
--name hv-fcopy-daemon
197 dh_systemd_start
-p
$(cloudpkg
)
202 $(lockme
) dh_gencontrol
-i