From e3d56724e48bb3404c0703cdb35f4bb2593861e1 Mon Sep 17 00:00:00 2001 From: Yves-Alexis Perez Date: Tue, 10 Nov 2015 18:42:38 +0100 Subject: [PATCH] split docs package to a different template only include them in the control file if docs are enabled in the config --- debian/bin/gencontrol.py | 5 +++++ debian/templates/control.docs.in | 33 ++++++++++++++++++++++++++++++++ debian/templates/control.main.in | 33 -------------------------------- 3 files changed, 38 insertions(+), 33 deletions(-) create mode 100644 debian/templates/control.docs.in diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index e1881d08d..a1a4f955e 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -41,6 +41,9 @@ class Gencontrol(Base): 'xen': { 'flavours': config.SchemaItemList(), 'versions': config.SchemaItemList(), + }, + 'docs': { + 'enabled': config.SchemaItemBoolean(), } } @@ -113,6 +116,8 @@ class Gencontrol(Base): def do_main_packages(self, packages, vars, makeflags, extra): packages.extend(self.process_packages(self.templates["control.main"], self.vars)) + if self.config.merge('docs', None, None).get('enabled', True): + packages.extend(self.process_packages(self.templates["control.docs"], self.vars)) arch_makeflags = ( ('kernel-arch', 'KERNEL_ARCH', False), diff --git a/debian/templates/control.docs.in b/debian/templates/control.docs.in new file mode 100644 index 000000000..c773bf509 --- /dev/null +++ b/debian/templates/control.docs.in @@ -0,0 +1,33 @@ +Package: @source_package@-doc-@version@ +Build-Profiles: +Architecture: all +Depends: ${misc:Depends} +Section: doc +Multi-Arch: foreign +Description: Linux kernel specific documentation for version @version@ + This package provides the various README files and HTML documentation for + the Linux kernel version @version@. Plenty of information, including the + descriptions of various kernel subsystems, filesystems, driver-specific + notes and the like. Consult the file + /usr/share/doc/linux-doc-@version@/Documentation/00-INDEX + for the detailed description of the contents. + +Package: @source_package@-manual-@version@ +Build-Profiles: +Architecture: all +Depends: ${misc:Depends} +Section: doc +Provides: linux-manual +Conflicts: linux-manual +Replaces: linux-manual +Multi-Arch: foreign +Description: Linux kernel API manual pages for version @version@ + This package provides the Kernel Hacker's Guide in the form of + manual pages, describing the kernel API functions. They + are installed into section 9 of the manual. + . + As the files containing manual pages for different kernel versions + are installed in the same location, only one linux-manual package + may be installed at a time. The linux-doc package containing the + documentation in other formats is free from such restriction. + diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index d301618c5..80794db64 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -13,39 +13,6 @@ Description: Linux kernel source for version @version@ with Debian patches features that have already been (or are believed to be) accepted by the upstream maintainers. -Package: @source_package@-doc-@version@ -Build-Profiles: -Architecture: all -Depends: ${misc:Depends} -Section: doc -Multi-Arch: foreign -Description: Linux kernel specific documentation for version @version@ - This package provides the various README files and HTML documentation for - the Linux kernel version @version@. Plenty of information, including the - descriptions of various kernel subsystems, filesystems, driver-specific - notes and the like. Consult the file - /usr/share/doc/linux-doc-@version@/Documentation/00-INDEX - for the detailed description of the contents. - -Package: @source_package@-manual-@version@ -Build-Profiles: -Architecture: all -Depends: ${misc:Depends} -Section: doc -Provides: linux-manual -Conflicts: linux-manual -Replaces: linux-manual -Multi-Arch: foreign -Description: Linux kernel API manual pages for version @version@ - This package provides the Kernel Hacker's Guide in the form of - manual pages, describing the kernel API functions. They - are installed into section 9 of the manual. - . - As the files containing manual pages for different kernel versions - are installed in the same location, only one linux-manual package - may be installed at a time. The linux-doc package containing the - documentation in other formats is free from such restriction. - Package: @source_package@-support-@abiname@ Build-Profiles: Architecture: all