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
)
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
)
31 docpkg
= $(doc_pkg_name
)
32 docdir
= $(CURDIR
)/debian
/$(docpkg
)/usr
/share
/doc
/$(docpkg
)
33 install-doc
: install-headers
35 ifeq ($(do_doc_package
),true
)
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 mv
$(docdir
)/$(doc_pkg_name
)-tmp
/Documentation
/DocBook \
47 rm -rf
$(docdir
)/$(doc_pkg_name
)-tmp
; \
51 cp
-a Documentation
/* $(docdir
)
52 rm -rf
$(docdir
)/DocBook
53 find
$(docdir
) -name .gitignore | xargs
rm -f
56 srcpkg
= $(src_pkg_name
)-source-
$(release
)
57 srcdir = $(CURDIR
)/debian
/$(srcpkg
)/usr
/src
/$(srcpkg
)
58 balldir
= $(CURDIR
)/debian
/$(srcpkg
)/usr
/src
/$(srcpkg
)/$(srcpkg
)
59 install-source
: install-doc
61 ifeq ($(do_source_package
),true
)
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
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 \
79 cpio
-pd
--preserve-modification-time
$(srcdir)
80 ln
-s
$(srcpkg
)/$(srcpkg
).
tar.bz2
$(srcdir)/..
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
: install-source
$(stampdir
)/stamp-build-perarch
90 ifeq ($(do_tools
),true
)
92 install -d
$(toolsbin
)
93 install -d
$(toolsman
)/man1
95 install -m755 debian
/tools
/generic
$(toolsbin
)/cpupower
96 install -m644
$(CURDIR
)/tools
/power
/cpupower
/man
/*.1 $(toolsman
)/man1
/
98 ifeq ($(do_tools_perf
),true
)
99 install -m755 debian
/tools
/generic
$(toolsbin
)/perf
101 ifeq ($(do_tools_x86
),true
)
102 install -m755 debian
/tools
/generic
$(toolsbin
)/x86_energy_perf_policy
103 install -m755 debian
/tools
/generic
$(toolsbin
)/turbostat
105 ifeq ($(do_tools_hyperv
),true
)
106 install -d
$(toolssbin
)
107 install -m755 debian
/tools
/generic
$(toolssbin
)/hv_kvp_daemon
108 install -m755 debian
/tools
/generic
$(toolssbin
)/hv_vss_daemon
111 rm -rf
$(builddir
)/tools
112 install -d
$(builddir
)/tools
113 for i in
*; do ln
-s
$(CURDIR
)/$$i $(builddir
)/tools
/; done
114 rm $(builddir
)/tools
/tools
115 rsync
-a tools
/ $(builddir
)/tools
/tools
/
117 ifeq ($(do_tools_perf
),true
)
118 cd
$(builddir
)/tools
/tools
/perf
&& make man
119 install -m644
$(builddir
)/tools
/tools
/perf
/Documentation
/*.1 \
122 ifeq ($(do_tools_x86
),true
)
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_tools_hyperv
),true
)
128 install -m644
$(CURDIR
)/tools
/hv
/*.8 $(toolsman
)/man8
132 install-indep
: install-tools
135 # This is just to make it easy to call manually. Normally done in
136 # binary-indep target during builds.
137 binary-headers
: install-headers
139 dh_installchangelogs
-p
$(indep_hdrpkg
)
140 dh_installdocs
-p
$(indep_hdrpkg
)
141 dh_compress
-p
$(indep_hdrpkg
)
142 dh_fixperms
-p
$(indep_hdrpkg
)
143 dh_installdeb
-p
$(indep_hdrpkg
)
144 $(lockme
) dh_gencontrol
-p
$(indep_hdrpkg
)
145 dh_md5sums
-p
$(indep_hdrpkg
)
146 dh_builddeb
-p
$(indep_hdrpkg
)
148 binary-indep
: install-indep
151 dh_installchangelogs
-i
156 $(lockme
) dh_gencontrol
-i