aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/package/Makefile
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@linaro.org>2015-09-02 05:57:24 -0400
committerMichal Marek <mmarek@suse.com>2015-09-04 05:25:03 -0400
commit3716001bcb7f5822382ac1f2f54226b87312cc6b (patch)
tree21ec20a68bf4d6787fc014dc2791c5fb5d19beae /scripts/package/Makefile
parent26803821463c4e76322559b3dfb0c6b0fcc8aee8 (diff)
deb-pkg: add source package
Make deb-pkg build both source and binary package like make rpm-pkg does. For people who only need binary kernel package, there is now bindeb-pkg target, same target also used to build the .deb files if built from the source package using dpkg-buildpackage. Generated source package will build the same kernel .config than what was available for make deb-pkg. The name of the source package can be set with KDEB_SOURCENAME enviroment variable. The source package is useful for GPL compliance, or for feeding to a automated debian package builder. Cc: Chris J Arges <chris.j.arges@canonical.com> Reviewed-by: maximilian attems <maks@stro.at> Reviewed-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts/package/Makefile')
-rw-r--r--scripts/package/Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 297e75684738..1aca224e8597 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -23,6 +23,8 @@
23 23
24# Remove hyphens since they have special meaning in RPM filenames 24# Remove hyphens since they have special meaning in RPM filenames
25KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE)) 25KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE))
26KDEB_SOURCENAME ?= linux-$(KERNELRELEASE)
27export KDEB_SOURCENAME
26# Include only those top-level files that are needed by make, plus the GPL copy 28# Include only those top-level files that are needed by make, plus the GPL copy
27TAR_CONTENT := $(KBUILD_ALLDIRS) .config .scmversion Makefile \ 29TAR_CONTENT := $(KBUILD_ALLDIRS) .config .scmversion Makefile \
28 Kbuild Kconfig COPYING $(wildcard localversion*) 30 Kbuild Kconfig COPYING $(wildcard localversion*)
@@ -83,11 +85,17 @@ quiet_cmd_builddeb = BUILDDEB
83 } && \ 85 } && \
84 \ 86 \
85 $$KBUILD_PKG_ROOTCMD $(CONFIG_SHELL) \ 87 $$KBUILD_PKG_ROOTCMD $(CONFIG_SHELL) \
86 $(srctree)/scripts/package/builddeb 88 $(srctree)/scripts/package/builddeb $@
87 89
88deb-pkg: FORCE 90deb-pkg: FORCE
91 $(MAKE) clean
92 $(call cmd,src_tar,$(KDEB_SOURCENAME))
93 $(MAKE) KBUILD_SRC=
94 +$(call cmd,builddeb)
95
96bindeb-pkg: FORCE
89 $(MAKE) KBUILD_SRC= 97 $(MAKE) KBUILD_SRC=
90 $(call cmd,builddeb) 98 +$(call cmd,builddeb)
91 99
92clean-dirs += $(objtree)/debian/ 100clean-dirs += $(objtree)/debian/
93 101
@@ -132,8 +140,9 @@ perf-%pkg: FORCE
132# --------------------------------------------------------------------------- 140# ---------------------------------------------------------------------------
133help: FORCE 141help: FORCE
134 @echo ' rpm-pkg - Build both source and binary RPM kernel packages' 142 @echo ' rpm-pkg - Build both source and binary RPM kernel packages'
135 @echo ' binrpm-pkg - Build only the binary kernel package' 143 @echo ' binrpm-pkg - Build only the binary kernel RPM package'
136 @echo ' deb-pkg - Build the kernel as a deb package' 144 @echo ' deb-pkg - Build both source and binary deb kernel packages'
145 @echo ' bindeb-pkg - Build only the binary kernel deb package'
137 @echo ' tar-pkg - Build the kernel as an uncompressed tarball' 146 @echo ' tar-pkg - Build the kernel as an uncompressed tarball'
138 @echo ' targz-pkg - Build the kernel as a gzip compressed tarball' 147 @echo ' targz-pkg - Build the kernel as a gzip compressed tarball'
139 @echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball' 148 @echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball'