]>
Commit | Line | Data |
---|---|---|
0d34a427 LO |
1 | build-indep: |
2 | @echo Debug: $@ | |
3 | ||
4 | # The binary-indep dependency chain is: | |
5 | # | |
6 | # install-headers <- install-doc <- install-source <- install-tools <- install-indep <- binary-indep | |
7 | # install-headers <- binary-headers | |
8 | # | |
9 | indep_hdrpkg = $(indep_hdrs_pkg_name) | |
10 | indep_hdrdir = $(CURDIR)/debian/$(indep_hdrpkg)/usr/src/$(indep_hdrpkg) | |
261ccf6f | 11 | install-headers: prepare-indep |
0d34a427 LO |
12 | @echo Debug: $@ |
13 | dh_testdir | |
14 | dh_testroot | |
0d34a427 LO |
15 | |
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) | |
28 | endif | |
29 | ||
30 | docpkg = $(doc_pkg_name) | |
31 | docdir = $(CURDIR)/debian/$(docpkg)/usr/share/doc/$(docpkg) | |
261ccf6f | 32 | install-doc: prepare-indep |
0d34a427 LO |
33 | @echo Debug: $@ |
34 | ifeq ($(do_doc_package),true) | |
35 | dh_testdir | |
36 | dh_testroot | |
37 | ||
38 | install -d $(docdir) | |
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; \ | |
2c21160b | 45 | rsync -aL $(docdir)/$(doc_pkg_name)-tmp/Documentation/output/ \ |
0d34a427 LO |
46 | $(docdir)/html/; \ |
47 | rm -rf $(docdir)/$(doc_pkg_name)-tmp; \ | |
48 | fi | |
49 | endif | |
50 | # Copy the rest | |
51 | cp -a Documentation/* $(docdir) | |
0d34a427 LO |
52 | find $(docdir) -name .gitignore | xargs rm -f |
53 | endif | |
54 | ||
55 | srcpkg = linux-source-$(release) | |
56 | srcdir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg) | |
57 | balldir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)/$(srcpkg) | |
261ccf6f | 58 | install-source: prepare-indep |
0d34a427 LO |
59 | @echo Debug: $@ |
60 | ifeq ($(do_source_package),true) | |
61 | ||
62 | install -d $(srcdir) | |
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 | |
69 | rm -rf $(balldir) | |
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 \ | |
77 | -print | \ | |
78 | cpio -pd --preserve-modification-time $(srcdir) | |
79 | $(LN) $(srcpkg)/$(srcpkg).tar.bz2 $(srcdir)/.. | |
80 | endif | |
81 | endif | |
82 | ||
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 | |
f66a0ec7 SF |
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 | |
0d34a427 LO |
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 | |
261ccf6f | 94 | install-tools: prepare-indep $(stampdir)/stamp-build-perarch |
0d34a427 LO |
95 | @echo Debug: $@ |
96 | ||
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/ | |
103 | ||
104 | install -d $(toolsbin) | |
105 | install -d $(toolsman)/man1 | |
106 | ||
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/ | |
110 | ||
111 | install -m755 debian/tools/generic $(toolsbin)/cpupower | |
112 | install -m644 $(CURDIR)/tools/power/cpupower/man/*.1 $(toolsman)/man1/ | |
113 | ||
114 | install -m755 debian/tools/generic $(toolsbin)/perf | |
115 | ||
116 | install -m755 debian/tools/generic $(toolsbin)/x86_energy_perf_policy | |
117 | install -m755 debian/tools/generic $(toolsbin)/turbostat | |
118 | ||
119 | cd $(builddir)/tools/tools/perf && make man | |
120 | install -m644 $(builddir)/tools/tools/perf/Documentation/*.1 \ | |
121 | $(toolsman)/man1 | |
122 | ||
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 | |
126 | ||
5064e822 SF |
127 | ifeq ($(do_cloud_tools),true) |
128 | ifeq ($(do_tools_hyperv),true) | |
0d34a427 LO |
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) | |
137 | ||
138 | install -d $(cloudman)/man8 | |
139 | install -m644 $(CURDIR)/tools/hv/*.8 $(cloudman)/man8 | |
5064e822 SF |
140 | endif |
141 | endif | |
0d34a427 | 142 | |
2c21160b TG |
143 | ifeq ($(do_tools_acpidbg),true) |
144 | install -m755 debian/tools/generic $(toolsbin)/acpidbg | |
145 | endif | |
146 | ||
0d34a427 LO |
147 | endif |
148 | ||
f66a0ec7 SF |
149 | ifeq ($(do_tools_host),true) |
150 | install -d $(hosttoolsbin) | |
151 | install -d $(hosttoolsman)/man1 | |
152 | ||
153 | install -m 755 $(CURDIR)/tools/kvm/kvm_stat/kvm_stat $(hosttoolsbin)/ | |
154 | ||
155 | cd $(builddir)/tools/tools/kvm/kvm_stat && make man | |
156 | install -m644 $(builddir)/tools/tools/kvm/kvm_stat/*.1 \ | |
157 | $(hosttoolsman)/man1 | |
158 | endif | |
159 | ||
261ccf6f AW |
160 | prepare-indep: |
161 | @echo Debug: $@ | |
162 | dh_prep -i | |
163 | ||
164 | install-indep: install-headers install-doc install-source install-tools | |
0d34a427 LO |
165 | @echo Debug: $@ |
166 | ||
167 | # This is just to make it easy to call manually. Normally done in | |
168 | # binary-indep target during builds. | |
261ccf6f | 169 | binary-headers: prepare-indep install-headers |
0d34a427 LO |
170 | @echo Debug: $@ |
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) | |
179 | ||
180 | binary-indep: cloudpkg = $(cloud_common_pkg_name) | |
181 | binary-indep: install-indep | |
182 | @echo Debug: $@ | |
0d34a427 LO |
183 | dh_installchangelogs -i |
184 | dh_installdocs -i | |
185 | dh_compress -i | |
186 | dh_fixperms -i | |
4ccbe91d | 187 | ifeq ($(do_tools_common),true) |
5064e822 SF |
188 | ifeq ($(do_cloud_tools),true) |
189 | ifeq ($(do_tools_hyperv),true) | |
0d34a427 LO |
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) | |
5064e822 | 198 | endif |
4ccbe91d | 199 | endif |
0d34a427 LO |
200 | endif |
201 | dh_installdeb -i | |
202 | $(lockme) dh_gencontrol -i | |
203 | dh_md5sums -i | |
204 | dh_builddeb -i |