summaryrefslogtreecommitdiff
path: root/scripts/package/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/package/Makefile')
-rw-r--r--scripts/package/Makefile34
1 files changed, 10 insertions, 24 deletions
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 9fbcf5ed0ca7..73503ebce632 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -24,6 +24,7 @@
# Remove hyphens since they have special meaning in RPM filenames
KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE))
KDEB_SOURCENAME ?= linux-$(KERNELRELEASE)
+KBUILD_PKG_ROOTCMD ?="fakeroot -u"
export KDEB_SOURCENAME
# Include only those top-level files that are needed by make, plus the GPL copy
TAR_CONTENT := $(KBUILD_ALLDIRS) .config .scmversion Makefile \
@@ -66,35 +67,20 @@ binrpm-pkg: FORCE
clean-files += $(objtree)/*.spec
-# Deb target
-# ---------------------------------------------------------------------------
-quiet_cmd_builddeb = BUILDDEB
- cmd_builddeb = set -e; \
- test `id -u` = 0 || \
- test -n "$(KBUILD_PKG_ROOTCMD)" || { \
- which fakeroot >/dev/null 2>&1 && \
- KBUILD_PKG_ROOTCMD="fakeroot -u"; \
- } || { \
- echo; \
- echo "builddeb must be run as root (or using fakeroot)."; \
- echo "KBUILD_PKG_ROOTCMD is unset and fakeroot not found."; \
- echo "Try setting KBUILD_PKG_ROOTCMD to a command to acquire"; \
- echo "root privileges (e.g., 'fakeroot -u' or 'sudo')."; \
- false; \
- } && \
- \
- $$KBUILD_PKG_ROOTCMD $(CONFIG_SHELL) \
- $(srctree)/scripts/package/builddeb $@
-
deb-pkg: FORCE
$(MAKE) clean
+ $(CONFIG_SHELL) $(srctree)/scripts/package/mkdebian
$(call cmd,src_tar,$(KDEB_SOURCENAME))
- $(MAKE) KBUILD_SRC=
- +$(call cmd,builddeb)
+ origversion=$$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$$//');\
+ mv $(KDEB_SOURCENAME).tar.gz ../$(KDEB_SOURCENAME)_$${origversion}.orig.tar.gz
+ +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) -i.git -us -uc
bindeb-pkg: FORCE
- $(MAKE) KBUILD_SRC=
- +$(call cmd,builddeb)
+ $(CONFIG_SHELL) $(srctree)/scripts/package/mkdebian
+ +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) -b -nc -uc
+
+intdeb-pkg: FORCE
+ +$(CONFIG_SHELL) $(srctree)/scripts/package/builddeb
clean-dirs += $(objtree)/debian/