From c346a6be262a25536f13e85b58494af999de4925 Mon Sep 17 00:00:00 2001 From: Yves-Alexis Perez Date: Tue, 10 Nov 2015 18:27:41 +0100 Subject: [PATCH] use source package name as source for binary ones use source package name in templates so it's easier for derivatives like src:linux-grsec to not conflict with binaries from src:linux. Original patch by Ben Hutchings. --- debian/rules.real | 9 +++++---- debian/templates/control.main.in | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/debian/rules.real b/debian/rules.real index 9d4e20894..bced6ad5b 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -13,6 +13,7 @@ DEB_HOST_MULTIARCH:= $(shell dpkg-architecture -a'$(ARCH)' -qDEB_HOST_MULTIARCH) DEB_BUILD_ARCH := $(shell dpkg-architecture -a'$(ARCH)' -qDEB_BUILD_ARCH) endif MAINTAINER := $(shell sed -ne 's,^Maintainer: .[^<]*<\([^>]*\)>,\1,p' debian/control) +SOURCE_PACKAGE_NAME := $(shell dpkg-parsechangelog -SSource) DISTRIBUTION := $(shell dpkg-parsechangelog -SDistribution) SOURCE_DATE := $(shell dpkg-parsechangelog -SDate) SOURCE_DATE_UTC_ISO := $(shell date -u -d '$(SOURCE_DATE)' +%Y-%m-%d) @@ -191,7 +192,7 @@ install-dummy: dh_prep +$(MAKE_SELF) install-base -install-doc: PACKAGE_NAME = linux-doc-$(VERSION) +install-doc: PACKAGE_NAME = $(SOURCE_PACKAGE_NAME)-doc-$(VERSION) install-doc: DIR = $(BUILD_DIR)/build-doc install-doc: PACKAGE_DIR = debian/$(PACKAGE_NAME) install-doc: OUT_DIR = $(PACKAGE_DIR)/usr/share/doc/$(PACKAGE_NAME) @@ -210,7 +211,7 @@ install-doc: $(STAMPS_DIR)/build-doc gzip -9nqfr $(OUT_DIR)/Documentation +$(MAKE_SELF) install-base -install-manual: PACKAGE_NAME = linux-manual-$(VERSION) +install-manual: PACKAGE_NAME = $(SOURCE_PACKAGE_NAME)-manual-$(VERSION) install-manual: DIR=$(BUILD_DIR)/build-doc install-manual: DH_OPTIONS = -p$(PACKAGE_NAME) install-manual: $(STAMPS_DIR)/build-doc @@ -329,7 +330,7 @@ install-libc-dev_$(ARCH): +$(MAKE_SELF) install-base -install-support: PACKAGE_NAME = linux-support-$(ABINAME) +install-support: PACKAGE_NAME = $(SOURCE_PACKAGE_NAME)-support-$(ABINAME) install-support: DH_OPTIONS = -p$(PACKAGE_NAME) install-support: PACKAGE_DIR = debian/$(PACKAGE_NAME) install-support: PACKAGE_ROOT = /usr/share/$(PACKAGE_NAME) @@ -440,7 +441,7 @@ install-udeb_$(ARCH): dh_gencontrol dh_builddeb -install-source: PACKAGE_NAME = linux-source-$(VERSION) +install-source: PACKAGE_NAME = $(SOURCE_PACKAGE_NAME)-source-$(VERSION) install-source: DH_OPTIONS = -p$(PACKAGE_NAME) install-source: $(BUILD_DIR)/linux-source-$(UPSTREAMVERSION).tar.xz $(foreach FEATURESET,$(filter-out none,$(ALL_FEATURESETS)),$(BUILD_DIR)/linux-patch-$(UPSTREAMVERSION)-$(FEATURESET).patch.xz) dh_testdir diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index a2c28ba8e..d301618c5 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -1,4 +1,4 @@ -Package: linux-source-@version@ +Package: @source_package@-source-@version@ Build-Profiles: Architecture: all Section: kernel @@ -13,7 +13,7 @@ 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: linux-doc-@version@ +Package: @source_package@-doc-@version@ Build-Profiles: Architecture: all Depends: ${misc:Depends} @@ -27,7 +27,7 @@ Description: Linux kernel specific documentation for version @version@ /usr/share/doc/linux-doc-@version@/Documentation/00-INDEX for the detailed description of the contents. -Package: linux-manual-@version@ +Package: @source_package@-manual-@version@ Build-Profiles: Architecture: all Depends: ${misc:Depends} @@ -46,7 +46,7 @@ Description: Linux kernel API manual pages for version @version@ may be installed at a time. The linux-doc package containing the documentation in other formats is free from such restriction. -Package: linux-support-@abiname@ +Package: @source_package@-support-@abiname@ Build-Profiles: Architecture: all Section: devel