debian/control,debian/rules,debian/rules.d: Support the 'nodoc' build profile

This commit is contained in:
Ben Hutchings 2016-05-15 00:19:24 +01:00
parent 0e3efec1d5
commit 59b5fabac6
10 changed files with 39 additions and 7 deletions

2
debian/changelog vendored
View File

@ -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 <aurel32@debian.org> Tue, 10 May 2016 23:58:07 +0200

5
debian/rules vendored
View File

@ -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

View File

@ -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'

View File

@ -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

View File

@ -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)

17
debian/rules.real vendored
View File

@ -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

View File

@ -1,5 +1,5 @@
Package: @source_package@-doc-@version@
Build-Profiles: <!stage1>
Build-Profiles: <!stage1 !nodoc>
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: <!stage1>
Build-Profiles: <!stage1 !nodoc>
Architecture: all
Depends: ${misc:Depends}
Section: doc

View File

@ -23,8 +23,8 @@ Build-Depends:
libssl-dev <!stage1>,
openssl <!stage1>,
# used by upstream to build perf documentation
asciidoc <!stage1 !pkg.linux.notools>,
xmlto <!stage1 !pkg.linux.notools>,
asciidoc <!stage1 !nodoc !pkg.linux.notools>,
xmlto <!stage1 !nodoc !pkg.linux.notools>,
# used by upstream to build perf
bison <!stage1 !pkg.linux.notools>,
flex <!stage1 !pkg.linux.notools>,
@ -55,7 +55,7 @@ Build-Depends-Indep:
# used by debian/rules.real to build linux-source
patchutils <!stage1>,
# used by upstream to build documentation
xmlto <!stage1>,
xmlto <!stage1 !nodoc>,
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/

View File

@ -1,4 +1,2 @@
usr/sbin/usbip
usr/sbin/usbipd
usr/share/man/man8/usbip.8
usr/share/man/man8/usbipd.8

2
debian/usbip.manpages vendored Normal file
View File

@ -0,0 +1,2 @@
tools/usb/usbip/doc/usbip.8
tools/usb/usbip/doc/usbipd.8