@@ -103,19 +103,6 @@ Description: Header files related to Linux kernel version PKGVER
that want the latest kernel headers. Please read
/usr/share/doc/SRCPKGNAME-headers-PKGVER-ABINUM/debian.README.gz for details
-Package: linux-libc-dev
-Architecture: amd64 armhf arm64 i386 ppc64el s390x
-Depends: ${misc:Depends}
-Conflicts: SRCPKGNAME-kernel-headers
-Replaces: SRCPKGNAME-kernel-headers
-Provides: SRCPKGNAME-kernel-headers, aufs-dev
-Multi-Arch: same
-Description: Linux Kernel Headers for development
- This package provides headers from the Linux kernel. These headers
- are used by the installed headers for GNU glibc and other system
- libraries. They are NOT meant to be used to build third-party modules for
- your kernel. Use SRCPKGNAME-headers-* packages for that.
-
Package: SRCPKGNAME-tools-common
Build-Profiles: <!stage1>
Architecture: all
new file mode 100644
@@ -0,0 +1,12 @@
+Package: linux-libc-dev
+Architecture: amd64 armhf arm64 i386 ppc64el s390x
+Depends: ${misc:Depends}
+Conflicts: linux-kernel-headers
+Replaces: linux-kernel-headers
+Provides: linux-kernel-headers, aufs-dev
+Multi-Arch: same
+Description: Linux Kernel Headers for development
+ This package provides headers from the Linux kernel. These headers
+ are used by the installed headers for GNU glibc and other system
+ libraries. They are NOT meant to be used to build third-party modules for
+ your kernel. Use SRCPKGNAME-headers-* packages for that.
@@ -175,22 +175,27 @@ include $(DROOT)/rules.d/3-binary-indep.mk
# Various checks to be performed on builds
include $(DROOT)/rules.d/4-checks.mk
+control_files := $(DEBIAN)/control.stub.in
+ifeq ($(do_libc_dev_package),true)
+ control_files += $(DROOT)/control.d/linux-libc-dev.stub
+endif
+
# Misc stuff
.PHONY: $(DEBIAN)/control.stub
$(DEBIAN)/control.stub: \
$(DROOT)/scripts/control-create \
- $(DEBIAN)/control.stub.in \
+ $(control_files) \
$(DEBIAN)/changelog \
$(wildcard $(DEBIAN)/control.d/* $(DEBIAN)/sub-flavours/*.vars)
- for i in $(DEBIAN)/control.stub.in; do \
- new=`echo $$i | sed 's/\.in$$//'`; \
- cat $$i | sed -e 's/PKGVER/$(release)/g' \
+ for i in $(control_files); do \
+ cat $$i; \
+ echo ""; \
+ done | sed -e 's/PKGVER/$(release)/g' \
-e 's/ABINUM/$(abinum)/g' \
-e 's/SRCPKGNAME/$(src_pkg_name)/g' \
-e 's/=HUMAN=/$(human_arch)/g' \
-e 's/=SERIES=/$(series)/g' \
- > $$new; \
- done
+ > $(DEBIAN)/control.stub;
flavours="$(sort $(wildcard $(DEBIAN)/control.d/vars.* $(DEBIAN)/sub-flavours/*.vars))";\
for i in $$flavours; do \
$(SHELL) $(DROOT)/scripts/control-create $$i "$(any_signed)" | \
@@ -169,8 +169,13 @@ ifeq ($(full_build),false)
do_source_package_content=false
endif
-# linux-libc-dev may not be needed, default to building it.
+# linux-libc-dev may not be needed, default to building it only for the
+# primary variant
+ifneq ($(filter --,$(variants)),)
do_libc_dev_package=true
+else
+do_libc_dev_package=false
+endif
# common headers normally is built as an indep package, but may be arch
do_common_headers_indep=true
The only kernel which should ever generate a linux-libc-dev package is the master kernel, i.e. the "--" variant. Set the default value of do_libc_dev_package based on whether or not the primary kernel is in the variants list. Move the linux-libc-dev control paragraph into its own stub, which is included in the control file only when do_libc_dev_package=true. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> --- debian.master/control.stub.in | 13 ------------- debian/control.d/linux-libc-dev.stub | 12 ++++++++++++ debian/rules | 17 +++++++++++------ debian/rules.d/0-common-vars.mk | 7 ++++++- 4 files changed, 29 insertions(+), 20 deletions(-) create mode 100644 debian/control.d/linux-libc-dev.stub