diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index bffbfc4ce..1ce6141b3 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -48,6 +48,7 @@ class Gencontrol(Base): 'libc-dev': config.SchemaItemBoolean(), 'tools-unversioned': config.SchemaItemBoolean(), 'tools-versioned': config.SchemaItemBoolean(), + 'source': config.SchemaItemBoolean(), } } @@ -111,6 +112,8 @@ class Gencontrol(Base): makeflags['ALL_TRIPLETS'] = ' '.join(triplet_enabled) if not self.config.merge('packages').get('docs', True): makeflags['DO_DOCS'] = False + if not self.config.merge('packages').get('source', True): + makeflags['DO_SOURCE'] = False super(Gencontrol, self).do_main_makefile(makefile, makeflags, extra) # linux-source-$UPSTREAMVERSION will contain all kconfig files diff --git a/debian/changelog b/debian/changelog index 5f40ebb09..a9ce59801 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ linux (4.17~rc3-1~exp2) UNRELEASED; urgency=medium [ Luca Boccassi ] * Disable building linux-doc-* and tools documentation when the "nodoc" build profile is used. + * Add new "pkg.linux.nosource" build profile that disables building the + linux-source-* package, and a "[packages] source" option for the + debian/config/defines file that defines the default behaviour. [ John Paul Adrian Glaubitz ] * [m68k] Enable CONFIG_PATA_GAYLE as module. diff --git a/debian/rules.real b/debian/rules.real index f570dcab6..d8a8e3ada 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -71,7 +71,11 @@ ifneq ($(DO_DOCS),False) build-indep: $(STAMPS_DIR)/build-doc endif endif -binary-indep: install-source +ifeq (,$(filter pkg.linux.nosource,$(DEB_BUILD_PROFILES))) + ifneq ($(DO_SOURCE),False) + binary-indep: install-source + endif +endif binary-indep: install-support ifneq ($(DO_TOOLS_VERSIONED),False) diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 2372cdde4..aebe8e4f9 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -1,5 +1,5 @@ Package: @source_basename@-source-@version@ -Build-Profiles: +Build-Profiles: Architecture: all Section: kernel Depends: binutils, xz-utils, ${misc:Depends}