]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - debian/rules.d/3-binary-indep.mk
net: pending_confirm is not used anymore
[mirror_ubuntu-zesty-kernel.git] / debian / rules.d / 3-binary-indep.mk
CommitLineData
356bd1e1
LO
1build-indep:
2 @echo Debug: $@
3
69ba07ff
TG
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#
0a2a0325 9indep_hdrpkg = $(indep_hdrs_pkg_name)
69ba07ff
TG
10indep_hdrdir = $(CURDIR)/debian/$(indep_hdrpkg)/usr/src/$(indep_hdrpkg)
11install-headers:
12 @echo Debug: $@
13 dh_testdir
14 dh_testroot
15 dh_prep
16
17ifeq ($(do_flavour_header_package),true)
18 install -d $(indep_hdrdir)
19 find . -path './debian' -prune -o -path './$(DEBIAN)' -prune \
20 -o -path './include/*' -prune \
21 -o -path './scripts/*' -prune -o -type f \
22 \( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \
23 -name '*.sh' -o -name '*.pl' -o -name '*.lds' \) \
24 -print | cpio -pd --preserve-modification-time $(indep_hdrdir)
25 cp -a scripts include $(indep_hdrdir)
26 (find arch -name include -type d -print | \
27 xargs -n1 -i: find : -type f) | \
28 cpio -pd --preserve-modification-time $(indep_hdrdir)
29endif
30
356bd1e1
LO
31docpkg = $(doc_pkg_name)
32docdir = $(CURDIR)/debian/$(docpkg)/usr/share/doc/$(docpkg)
33install-doc: install-headers
34 @echo Debug: $@
35ifeq ($(do_doc_package),true)
36 dh_testdir
37 dh_testroot
356bd1e1
LO
38
39 install -d $(docdir)
40ifeq ($(do_doc_package_content),true)
41 # First the html docs. We skip these for autobuilds
42 if [ -z "$(AUTOBUILD)" ]; then \
43 install -d $(docdir)/$(doc_pkg_name)-tmp; \
44 $(kmake) O=$(docdir)/$(doc_pkg_name)-tmp htmldocs; \
3d87c016
TG
45 install -d $(docdir)/html; \
46 rsync -aL $(docdir)/$(doc_pkg_name)-tmp/Documentation/DocBook/ \
47 $(docdir)/html/; \
356bd1e1
LO
48 rm -rf $(docdir)/$(doc_pkg_name)-tmp; \
49 fi
50endif
51 # Copy the rest
52 cp -a Documentation/* $(docdir)
53 rm -rf $(docdir)/DocBook
54 find $(docdir) -name .gitignore | xargs rm -f
55endif
56
f5d5ba6d 57srcpkg = linux-source-$(release)
356bd1e1
LO
58srcdir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)
59balldir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)/$(srcpkg)
60install-source: install-doc
61 @echo Debug: $@
62ifeq ($(do_source_package),true)
356bd1e1
LO
63
64 install -d $(srcdir)
65ifeq ($(do_source_package_content),true)
66 find . -path './debian' -prune -o -path './$(DEBIAN)' -prune -o \
67 -path './.*' -prune -o -print | \
68 cpio -pd --preserve-modification-time $(balldir)
69 (cd $(srcdir); tar cf - $(srcpkg)) | bzip2 -9c > \
70 $(srcdir)/$(srcpkg).tar.bz2
71 rm -rf $(balldir)
72 find './debian' './$(DEBIAN)' \
73 -path './debian/linux-*' -prune -o \
74 -path './debian/$(src_pkg_name)-*' -prune -o \
75 -path './debian/build' -prune -o \
76 -path './debian/files' -prune -o \
77 -path './debian/stamps' -prune -o \
78 -path './debian/tmp' -prune -o \
79 -print | \
80 cpio -pd --preserve-modification-time $(srcdir)
f8e4778e 81 $(LN) $(srcpkg)/$(srcpkg).tar.bz2 $(srcdir)/..
356bd1e1
LO
82endif
83endif
84
85install-tools: toolspkg = $(tools_common_pkg_name)
86install-tools: toolsbin = $(CURDIR)/debian/$(toolspkg)/usr/bin
87install-tools: toolssbin = $(CURDIR)/debian/$(toolspkg)/usr/sbin
88install-tools: toolsman = $(CURDIR)/debian/$(toolspkg)/usr/share/man
d974f731
TG
89install-tools: cloudpkg = $(cloud_common_pkg_name)
90install-tools: cloudbin = $(CURDIR)/debian/$(cloudpkg)/usr/bin
91install-tools: cloudsbin = $(CURDIR)/debian/$(cloudpkg)/usr/sbin
92install-tools: cloudman = $(CURDIR)/debian/$(cloudpkg)/usr/share/man
356bd1e1
LO
93install-tools: install-source $(stampdir)/stamp-build-perarch
94 @echo Debug: $@
d974f731 95
288ce282 96ifeq ($(do_tools_common),true)
d974f731
TG
97 rm -rf $(builddir)/tools
98 install -d $(builddir)/tools
f8e4778e 99 for i in *; do $(LN) $(CURDIR)/$$i $(builddir)/tools/; done
d974f731
TG
100 rm $(builddir)/tools/tools
101 rsync -a tools/ $(builddir)/tools/tools/
356bd1e1
LO
102
103 install -d $(toolsbin)
104 install -d $(toolsman)/man1
105
e66f5b2a 106 install -m755 debian/tools/generic $(toolsbin)/usbip
7e405c8b 107 install -m755 debian/tools/generic $(toolsbin)/usbipd
e66f5b2a
TG
108 install -m644 $(CURDIR)/tools/usb/usbip/doc/*.8 $(toolsman)/man1/
109
a7b434e8 110 install -m755 debian/tools/generic $(toolsbin)/cpupower
9d8d17a0
KM
111 install -m644 $(CURDIR)/tools/power/cpupower/man/*.1 $(toolsman)/man1/
112
a7b434e8 113 install -m755 debian/tools/generic $(toolsbin)/perf
d974f731 114
a7b434e8
AW
115 install -m755 debian/tools/generic $(toolsbin)/x86_energy_perf_policy
116 install -m755 debian/tools/generic $(toolsbin)/turbostat
356bd1e1 117
356bd1e1
LO
118 cd $(builddir)/tools/tools/perf && make man
119 install -m644 $(builddir)/tools/tools/perf/Documentation/*.1 \
120 $(toolsman)/man1
d974f731 121
0a571ec9
AW
122 install -d $(toolsman)/man8
123 install -m644 $(CURDIR)/tools/power/x86/x86_energy_perf_policy/*.8 $(toolsman)/man8
124 install -m644 $(CURDIR)/tools/power/x86/turbostat/*.8 $(toolsman)/man8
d974f731
TG
125
126 install -d $(cloudsbin)
127 install -m755 debian/tools/generic $(cloudsbin)/hv_kvp_daemon
128 install -m755 debian/tools/generic $(cloudsbin)/hv_vss_daemon
129 install -m755 debian/tools/generic $(cloudsbin)/hv_fcopy_daemon
0a7cc07d 130 install -m755 debian/tools/generic $(cloudsbin)/lsvmbus
d974f731
TG
131 install -m755 debian/cloud-tools/hv_get_dhcp_info $(cloudsbin)
132 install -m755 debian/cloud-tools/hv_get_dns_info $(cloudsbin)
133 install -m755 debian/cloud-tools/hv_set_ifconfig $(cloudsbin)
134
135 install -d $(cloudman)/man8
136 install -m644 $(CURDIR)/tools/hv/*.8 $(cloudman)/man8
137
288ce282 138endif
356bd1e1
LO
139
140install-indep: install-tools
141 @echo Debug: $@
142
143# This is just to make it easy to call manually. Normally done in
144# binary-indep target during builds.
145binary-headers: install-headers
146 @echo Debug: $@
356bd1e1
LO
147 dh_installchangelogs -p$(indep_hdrpkg)
148 dh_installdocs -p$(indep_hdrpkg)
149 dh_compress -p$(indep_hdrpkg)
150 dh_fixperms -p$(indep_hdrpkg)
151 dh_installdeb -p$(indep_hdrpkg)
152 $(lockme) dh_gencontrol -p$(indep_hdrpkg)
153 dh_md5sums -p$(indep_hdrpkg)
154 dh_builddeb -p$(indep_hdrpkg)
155
0c231636 156binary-indep: cloudpkg = $(cloud_common_pkg_name)
356bd1e1
LO
157binary-indep: install-indep
158 @echo Debug: $@
356bd1e1
LO
159
160 dh_installchangelogs -i
161 dh_installdocs -i
162 dh_compress -i
163 dh_fixperms -i
0c231636 164ifeq ($(do_tools_common),true)
82cab5fb
AW
165 dh_installinit -p$(cloudpkg) -n --name hv-kvp-daemon
166 dh_installinit -p$(cloudpkg) -n --name hv-vss-daemon
167 dh_installinit -p$(cloudpkg) -n --name hv-fcopy-daemon
168 dh_systemd_enable -p$(cloudpkg)
169 dh_installinit -p$(cloudpkg) -o --name hv-kvp-daemon
170 dh_installinit -p$(cloudpkg) -o --name hv-vss-daemon
171 dh_installinit -p$(cloudpkg) -o --name hv-fcopy-daemon
172 dh_systemd_start -p$(cloudpkg)
0c231636 173endif
356bd1e1
LO
174 dh_installdeb -i
175 $(lockme) dh_gencontrol -i
176 dh_md5sums -i
177 dh_builddeb -i