Makefile.package (6fc91752d7c4706f1036838544b1ef5d9f41c058) Makefile.package (6eabebb1b66c48d830549dbca5952f72307fbd0b)
1# SPDX-License-Identifier: GPL-2.0-only
2# Makefile for the different targets used to generate full packages of a kernel
3
4include $(srctree)/scripts/Kbuild.include
5
6KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE))
1# SPDX-License-Identifier: GPL-2.0-only
2# Makefile for the different targets used to generate full packages of a kernel
3
4include $(srctree)/scripts/Kbuild.include
5
6KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE))
7KDEB_SOURCENAME ?= linux-upstream
8KBUILD_PKG_ROOTCMD ?="fakeroot -u"
7KBUILD_PKG_ROOTCMD ?="fakeroot -u"
9export KDEB_SOURCENAME
10# Include only those top-level files that are needed by make, plus the GPL copy
11TAR_CONTENT := Documentation LICENSES arch block certs crypto drivers fs \
12 include init io_uring ipc kernel lib mm net rust \
13 samples scripts security sound tools usr virt \
14 .config Makefile \
15 Kbuild Kconfig COPYING $(wildcard localversion*)
16MKSPEC := $(srctree)/scripts/package/mkspec
17

--- 64 unchanged lines hidden (view full) ---

82# ---------------------------------------------------------------------------
83PHONY += binrpm-pkg
84binrpm-pkg:
85 $(MAKE) -f $(srctree)/Makefile
86 $(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec
87 +rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
88 $(UTS_MACHINE)-linux -bb $(objtree)/binkernel.spec
89
8# Include only those top-level files that are needed by make, plus the GPL copy
9TAR_CONTENT := Documentation LICENSES arch block certs crypto drivers fs \
10 include init io_uring ipc kernel lib mm net rust \
11 samples scripts security sound tools usr virt \
12 .config Makefile \
13 Kbuild Kconfig COPYING $(wildcard localversion*)
14MKSPEC := $(srctree)/scripts/package/mkspec
15

--- 64 unchanged lines hidden (view full) ---

80# ---------------------------------------------------------------------------
81PHONY += binrpm-pkg
82binrpm-pkg:
83 $(MAKE) -f $(srctree)/Makefile
84 $(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec
85 +rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
86 $(UTS_MACHINE)-linux -bb $(objtree)/binkernel.spec
87
88quiet_cmd_debianize = GEN $@
89 cmd_debianize = $(srctree)/scripts/package/mkdebian
90
91debian: FORCE
92 $(call cmd,debianize)
93
94PHONY += debian-orig
95debian-orig: private source = $(shell dpkg-parsechangelog -S Source)
96debian-orig: private version = $(shell dpkg-parsechangelog -S Version | sed 's/-[^-]*$$//')
97debian-orig: private orig-name = $(source)_$(version).orig.tar.gz
98debian-orig: linux.tar.gz debian
99 $(Q)cp $< ../$(orig-name)
100
90PHONY += deb-pkg
101PHONY += deb-pkg
91deb-pkg: linux.tar.gz
92 $(CONFIG_SHELL) $(srctree)/scripts/package/mkdebian
93 origversion=$$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$$//');\
94 cp linux.tar.gz ../$(KDEB_SOURCENAME)_$${origversion}.orig.tar.gz
102deb-pkg: debian-orig
95 +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) \
96 --build=source,binary --source-option=-sP -nc -us -uc
97
98PHONY += bindeb-pkg
103 +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) \
104 --build=source,binary --source-option=-sP -nc -us -uc
105
106PHONY += bindeb-pkg
99bindeb-pkg:
100 $(CONFIG_SHELL) $(srctree)/scripts/package/mkdebian
107bindeb-pkg: debian
101 +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -b -nc -uc
102
103PHONY += intdeb-pkg
104intdeb-pkg:
105 +$(CONFIG_SHELL) $(srctree)/scripts/package/builddeb
106
107# snap-pkg
108# ---------------------------------------------------------------------------

--- 79 unchanged lines hidden ---
108 +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -b -nc -uc
109
110PHONY += intdeb-pkg
111intdeb-pkg:
112 +$(CONFIG_SHELL) $(srctree)/scripts/package/builddeb
113
114# snap-pkg
115# ---------------------------------------------------------------------------

--- 79 unchanged lines hidden ---