From 59b5fabac66ec8550bc73077608b6ffc366e22ab Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 15 May 2016 00:19:24 +0100 Subject: [PATCH] debian/control,debian/rules,debian/rules.d: Support the 'nodoc' build profile --- debian/changelog | 2 ++ debian/rules | 5 +++++ debian/rules.d/tools/perf/Makefile | 2 ++ debian/rules.d/tools/power/cpupower/Makefile | 3 +++ debian/rules.d/tools/usb/usbip/Makefile | 3 +++ debian/rules.real | 17 +++++++++++++++++ debian/templates/control.docs.in | 4 ++-- debian/templates/control.source.in | 6 +++--- debian/usbip.install | 2 -- debian/usbip.manpages | 2 ++ 10 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 debian/usbip.manpages diff --git a/debian/changelog b/debian/changelog index 8fb720033..1706bdab8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -101,6 +101,8 @@ linux (4.5.4-1) UNRELEASED; urgency=medium * debian/control: Exclude tools from 'stage1' build profile * debian/control,debian/rules: Support a 'pkg.linux.notools' build profile which does not build tools packages + * debian/control,debian/rules,debian/rules.d: Support the 'nodoc' build + profile -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 diff --git a/debian/rules b/debian/rules index 17646a4d5..fbf9eade1 100755 --- a/debian/rules +++ b/debian/rules @@ -16,6 +16,11 @@ 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.d/tools/perf/Makefile b/debian/rules.d/tools/perf/Makefile index 7eb5faf5d..fc964144c 100644 --- a/debian/rules.d/tools/perf/Makefile +++ b/debian/rules.d/tools/perf/Makefile @@ -47,7 +47,9 @@ ifdef KERNEL_ARCH_PERF # set. We must define it even when building to avoid a rebuild when we # run 'make install'. +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf all VERSION=$(VERSION) DESTDIR=dummy +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) +$(MAKE_PERF) -C $(top_srcdir)/tools/perf/Documentation man VERSION=$(VERSION) +endif # Check that perf didn't get linked against libbfd type ldd ! ldd $(CURDIR)/perf | grep '\blibbfd' diff --git a/debian/rules.d/tools/power/cpupower/Makefile b/debian/rules.d/tools/power/cpupower/Makefile index 79b131430..3f994a3f1 100644 --- a/debian/rules.d/tools/power/cpupower/Makefile +++ b/debian/rules.d/tools/power/cpupower/Makefile @@ -9,6 +9,9 @@ all: install: $(MAKE) -C $(top_srcdir)/tools/power/cpupower O=$(CURDIR) install mandir=/usr/share/man DESTDIR=$(DESTDIR) CPUFREQ_BENCH=false +ifneq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) + rm -rf $(DESTDIR)/usr/share/man +endif clean: $(MAKE) -C $(top_srcdir)/tools/power/cpupower O=$(CURDIR) clean diff --git a/debian/rules.d/tools/usb/usbip/Makefile b/debian/rules.d/tools/usb/usbip/Makefile index 11d1db4ca..4c29b61a8 100644 --- a/debian/rules.d/tools/usb/usbip/Makefile +++ b/debian/rules.d/tools/usb/usbip/Makefile @@ -16,6 +16,9 @@ all: install: $(MAKE) install +ifneq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) + rm -rf $(DESTDIR)/usr/share/man +endif clean: rm -rf $(addprefix $(srcdir)/,autom4te.cache aclocal.m4 compile config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing) diff --git a/debian/rules.real b/debian/rules.real index 3e7839a4d..52ff4b6e4 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -190,7 +190,9 @@ $(STAMPS_DIR)/build-doc: $(STAMPS_DIR)/source @$(stamp) install-base: +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs $(INSTALLDOCS_ARGS) +endif dh_installchangelogs dh_strip dh_compress @@ -503,7 +505,9 @@ install-kbuild: $(STAMPS_DIR)/build-tools $(call make-tools,scripts) install DESTDIR=$(DIR) prefix=$(PREFIX_DIR) dh_link $(PREFIX_DIR) /usr/src/$(PACKAGE_NAME) dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_strip dh_compress dh_fixperms @@ -522,7 +526,9 @@ install-cpupower: $(STAMPS_DIR)/build-tools $(call make-tools,tools/power/cpupower) install DESTDIR=$(DIR) dh_install --sourcedir=$(DIR) dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_strip dh_compress dh_fixperms @@ -544,7 +550,9 @@ install-perf: $(STAMPS_DIR)/build-tools dh_perl /usr/share/perf_$(VERSION)-core/scripts/perl/Perf-Trace-Util/lib/ dh_python2 /usr/share/perf_$(VERSION)-core/scripts/python/Perf-Trace-Util/lib/ dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_lintian dh_strip dh_compress @@ -565,7 +573,10 @@ install-usbip: $(STAMPS_DIR)/build-tools $(call make-tools,tools/usb/usbip) install DESTDIR=$(DIR) dh_install --sourcedir=$(DIR) dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs + dh_installman +endif dh_lintian dh_strip dh_compress @@ -592,7 +603,9 @@ install-hyperv-daemons: $(STAMPS_DIR)/build-tools || break; \ done dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_systemd_enable for service in fcopy kvp vss; do \ dh_installinit --name hyperv-daemons.hv-$$service-daemon \ @@ -621,7 +634,9 @@ install-liblockdep: $(STAMPS_DIR)/build-tools 'usr/lib/*/liblockdep.so.*' dh_install --sourcedir=$(DIR) dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_strip dh_compress dh_fixperms @@ -646,7 +661,9 @@ install-lockdep: > $(DIR)/usr/bin/lockdep chmod 755 $(DIR)/usr/bin/lockdep dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_compress dh_fixperms dh_installdeb diff --git a/debian/templates/control.docs.in b/debian/templates/control.docs.in index c773bf509..9b16f0918 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 @@ -13,7 +13,7 @@ Description: Linux kernel specific documentation for version @version@ for the detailed description of the contents. Package: @source_package@-manual-@version@ -Build-Profiles: +Build-Profiles: Architecture: all Depends: ${misc:Depends} Section: doc diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 71d465d70..fb666c492 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -23,8 +23,8 @@ Build-Depends: libssl-dev , openssl , # used by upstream to build perf documentation - asciidoc , - xmlto , + asciidoc , + xmlto , # used by upstream to build perf bison , flex , @@ -55,7 +55,7 @@ Build-Depends-Indep: # used by debian/rules.real to build linux-source patchutils , # used by upstream to build documentation - xmlto , + xmlto , Vcs-Git: https://anonscm.debian.org/git/kernel/linux.git Vcs-Browser: https://anonscm.debian.org/cgit/kernel/linux.git Homepage: https://www.kernel.org/ diff --git a/debian/usbip.install b/debian/usbip.install index 4252b2807..04a6ce5b5 100644 --- a/debian/usbip.install +++ b/debian/usbip.install @@ -1,4 +1,2 @@ usr/sbin/usbip usr/sbin/usbipd -usr/share/man/man8/usbip.8 -usr/share/man/man8/usbipd.8 diff --git a/debian/usbip.manpages b/debian/usbip.manpages new file mode 100644 index 000000000..ff94009a6 --- /dev/null +++ b/debian/usbip.manpages @@ -0,0 +1,2 @@ +tools/usb/usbip/doc/usbip.8 +tools/usb/usbip/doc/usbipd.8