]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - debian/rules.d/3-binary-indep.mk
UBUNTU: SAUCE: media: uvcvideo: Support realtek's UVC 1.5 device
[mirror_ubuntu-artful-kernel.git] / debian / rules.d / 3-binary-indep.mk
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)
11 install-headers:
12 @echo Debug: $@
13 dh_testdir
14 dh_testroot
15 dh_prep
16
17 ifeq ($(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)
29 endif
30
31 docpkg = $(doc_pkg_name)
32 docdir = $(CURDIR)/debian/$(docpkg)/usr/share/doc/$(docpkg)
33 install-doc: install-headers
34 @echo Debug: $@
35 ifeq ($(do_doc_package),true)
36 dh_testdir
37 dh_testroot
38
39 install -d $(docdir)
40 ifeq ($(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; \
45 install -d $(docdir)/html; \
46 rsync -aL $(docdir)/$(doc_pkg_name)-tmp/Documentation/output/ \
47 $(docdir)/html/; \
48 rm -rf $(docdir)/$(doc_pkg_name)-tmp; \
49 fi
50 endif
51 # Copy the rest
52 cp -a Documentation/* $(docdir)
53 find $(docdir) -name .gitignore | xargs rm -f
54 endif
55
56 srcpkg = linux-source-$(release)
57 srcdir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)
58 balldir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)/$(srcpkg)
59 install-source: install-doc
60 @echo Debug: $@
61 ifeq ($(do_source_package),true)
62
63 install -d $(srcdir)
64 ifeq ($(do_source_package_content),true)
65 find . -path './debian' -prune -o -path './$(DEBIAN)' -prune -o \
66 -path './.*' -prune -o -print | \
67 cpio -pd --preserve-modification-time $(balldir)
68 (cd $(srcdir); tar cf - $(srcpkg)) | bzip2 -9c > \
69 $(srcdir)/$(srcpkg).tar.bz2
70 rm -rf $(balldir)
71 find './debian' './$(DEBIAN)' \
72 -path './debian/linux-*' -prune -o \
73 -path './debian/$(src_pkg_name)-*' -prune -o \
74 -path './debian/build' -prune -o \
75 -path './debian/files' -prune -o \
76 -path './debian/stamps' -prune -o \
77 -path './debian/tmp' -prune -o \
78 -print | \
79 cpio -pd --preserve-modification-time $(srcdir)
80 $(LN) $(srcpkg)/$(srcpkg).tar.bz2 $(srcdir)/..
81 endif
82 endif
83
84 install-tools: toolspkg = $(tools_common_pkg_name)
85 install-tools: toolsbin = $(CURDIR)/debian/$(toolspkg)/usr/bin
86 install-tools: toolssbin = $(CURDIR)/debian/$(toolspkg)/usr/sbin
87 install-tools: toolsman = $(CURDIR)/debian/$(toolspkg)/usr/share/man
88 install-tools: cloudpkg = $(cloud_common_pkg_name)
89 install-tools: cloudbin = $(CURDIR)/debian/$(cloudpkg)/usr/bin
90 install-tools: cloudsbin = $(CURDIR)/debian/$(cloudpkg)/usr/sbin
91 install-tools: cloudman = $(CURDIR)/debian/$(cloudpkg)/usr/share/man
92 install-tools: install-source $(stampdir)/stamp-build-perarch
93 @echo Debug: $@
94
95 ifeq ($(do_tools_common),true)
96 rm -rf $(builddir)/tools
97 install -d $(builddir)/tools
98 for i in *; do $(LN) $(CURDIR)/$$i $(builddir)/tools/; done
99 rm $(builddir)/tools/tools
100 rsync -a tools/ $(builddir)/tools/tools/
101
102 install -d $(toolsbin)
103 install -d $(toolsman)/man1
104
105 install -m755 debian/tools/generic $(toolsbin)/usbip
106 install -m755 debian/tools/generic $(toolsbin)/usbipd
107 install -m644 $(CURDIR)/tools/usb/usbip/doc/*.8 $(toolsman)/man1/
108
109 install -m755 debian/tools/generic $(toolsbin)/cpupower
110 install -m644 $(CURDIR)/tools/power/cpupower/man/*.1 $(toolsman)/man1/
111
112 install -m755 debian/tools/generic $(toolsbin)/perf
113
114 install -m755 debian/tools/generic $(toolsbin)/x86_energy_perf_policy
115 install -m755 debian/tools/generic $(toolsbin)/turbostat
116
117 cd $(builddir)/tools/tools/perf && make man
118 install -m644 $(builddir)/tools/tools/perf/Documentation/*.1 \
119 $(toolsman)/man1
120
121 install -d $(toolsman)/man8
122 install -m644 $(CURDIR)/tools/power/x86/x86_energy_perf_policy/*.8 $(toolsman)/man8
123 install -m644 $(CURDIR)/tools/power/x86/turbostat/*.8 $(toolsman)/man8
124
125 install -d $(cloudsbin)
126 install -m755 debian/tools/generic $(cloudsbin)/hv_kvp_daemon
127 install -m755 debian/tools/generic $(cloudsbin)/hv_vss_daemon
128 install -m755 debian/tools/generic $(cloudsbin)/hv_fcopy_daemon
129 install -m755 debian/tools/generic $(cloudsbin)/lsvmbus
130 install -m755 debian/cloud-tools/hv_get_dhcp_info $(cloudsbin)
131 install -m755 debian/cloud-tools/hv_get_dns_info $(cloudsbin)
132 install -m755 debian/cloud-tools/hv_set_ifconfig $(cloudsbin)
133
134 install -d $(cloudman)/man8
135 install -m644 $(CURDIR)/tools/hv/*.8 $(cloudman)/man8
136
137 endif
138
139 install-indep: install-tools
140 @echo Debug: $@
141
142 # This is just to make it easy to call manually. Normally done in
143 # binary-indep target during builds.
144 binary-headers: install-headers
145 @echo Debug: $@
146 dh_installchangelogs -p$(indep_hdrpkg)
147 dh_installdocs -p$(indep_hdrpkg)
148 dh_compress -p$(indep_hdrpkg)
149 dh_fixperms -p$(indep_hdrpkg)
150 dh_installdeb -p$(indep_hdrpkg)
151 $(lockme) dh_gencontrol -p$(indep_hdrpkg)
152 dh_md5sums -p$(indep_hdrpkg)
153 dh_builddeb -p$(indep_hdrpkg)
154
155 binary-indep: cloudpkg = $(cloud_common_pkg_name)
156 binary-indep: install-indep
157 @echo Debug: $@
158
159 dh_installchangelogs -i
160 dh_installdocs -i
161 dh_compress -i
162 dh_fixperms -i
163 ifeq ($(do_tools_common),true)
164 dh_installinit -p$(cloudpkg) -n --name hv-kvp-daemon
165 dh_installinit -p$(cloudpkg) -n --name hv-vss-daemon
166 dh_installinit -p$(cloudpkg) -n --name hv-fcopy-daemon
167 dh_systemd_enable -p$(cloudpkg)
168 dh_installinit -p$(cloudpkg) -o --name hv-kvp-daemon
169 dh_installinit -p$(cloudpkg) -o --name hv-vss-daemon
170 dh_installinit -p$(cloudpkg) -o --name hv-fcopy-daemon
171 dh_systemd_start -p$(cloudpkg)
172 endif
173 dh_installdeb -i
174 $(lockme) dh_gencontrol -i
175 dh_md5sums -i
176 dh_builddeb -i