From fe5c3cbe607fb8eb6db80e8051978c4baf5fb9fe Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 30 Sep 2017 12:26:27 +0100 Subject: [PATCH] linux-doc: Build an empty package when the nodoc profile is used Wiki page BuildProfileSpec says the set of binary packages can change, but policy says not (since 4.0.0). --- debian/changelog | 2 ++ debian/rules | 5 ----- debian/rules.real | 8 +++++++- debian/templates/control.docs.in | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8c06020b0..e8bbccc55 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,8 @@ linux (4.13.4-1~exp1) UNRELEASED; urgency=medium * ALSA: Enable SND_OSSEMUL, a new dependency of SND_{MIXER,PCM}_OSS * [armel] rtc: Disable RTC_NVMEM * [x86] hyperv-daemons: Use pid file name in init script status operation + * Update policy version to 4.1.1: + - linux-doc: Build an empty package when the nodoc profile is used [ Uwe Kleine-König ] * [arm64] really enable NET_DSA_MV88E6XXX for Espressobin diff --git a/debian/rules b/debian/rules index 8ee38b605..abfbe8370 100755 --- a/debian/rules +++ b/debian/rules @@ -16,11 +16,6 @@ ifdef DEBIAN_KERNEL_JOBS MAKEFLAGS += -j$(DEBIAN_KERNEL_JOBS) endif BUILD_STAGE1 := $(filter stage1,$(DEB_BUILD_PROFILES)) -ifneq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) -# This only disables building the linux-doc and linux-manual packages. -# The rules for tools packages check separately for the 'nodoc' profile. - MAKEFLAGS += DO_DOCS=False -endif ifneq (,$(filter pkg.linux.notools,$(DEB_BUILD_PROFILES))) MAKEFLAGS += DO_TOOLS=False endif diff --git a/debian/rules.real b/debian/rules.real index 39a072ba5..2b2a09cad 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -67,7 +67,9 @@ binary-arch-flavour: install-headers_$(ARCH)_$(FEATURESET)_$(FLAVOUR) ifneq ($(DO_DOCS),False) binary-indep: install-doc - build-indep: $(STAMPS_DIR)/build-doc + ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) + build-indep: $(STAMPS_DIR)/build-doc + endif endif binary-indep: install-source binary-indep: install-support @@ -191,11 +193,13 @@ $(STAMPS_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR): $(STAMPS_DIR)/build-doc: DIR=$(BUILD_DIR)/build-doc $(STAMPS_DIR)/build-doc: $(STAMPS_DIR)/source +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) mkdir -p '$(BUILD_DIR)' rm -rf '$(DIR)' $(call copy_source,$(DIR)) +$(MAKE_CLEAN) -C '$(DIR)' xmldocs +$(MAKE_CLEAN) -C '$(DIR)' htmldocs mandocs +endif @$(stamp) install-base: @@ -223,6 +227,7 @@ install-doc: OUT_DIR = $(PACKAGE_DIR)/usr/share/doc/$(PACKAGE_NAME) install-doc: DH_OPTIONS = -p$(PACKAGE_NAME) install-doc: $(STAMPS_DIR)/build-doc dh_prep +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) mkdir -p $(OUT_DIR) set -o pipefail; \ find CREDITS MAINTAINERS README Documentation \ @@ -247,6 +252,7 @@ install-doc: $(STAMPS_DIR)/build-doc ln -sr "$$dest.gz" "$$link.gz"; \ fi; \ done +endif +$(MAKE_SELF) install-base install-manual: PACKAGE_NAME = $(SOURCE_PACKAGE_NAME)-manual-$(VERSION) diff --git a/debian/templates/control.docs.in b/debian/templates/control.docs.in index a0886d586..30e55def9 100644 --- a/debian/templates/control.docs.in +++ b/debian/templates/control.docs.in @@ -1,5 +1,5 @@ Package: @source_package@-doc-@version@ -Build-Profiles: +Build-Profiles: Architecture: all Depends: ${misc:Depends} Section: doc