Source: u-boot
Followup-For: Bug #976318

With the attachments...
>From e73ab6b762a156523d12583fc80631236ac3018b Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <nico...@debian.org>
Date: Tue, 1 Dec 2020 19:21:02 +0100
Subject: Use specific dh_installman instead of dh_install

For example, dh_installman respects the nodoc build profile.

diff --git a/debian/u-boot-sunxi.install b/debian/u-boot-sunxi.install
index 833ce20943..7774d48f49 100755
--- a/debian/u-boot-sunxi.install
+++ b/debian/u-boot-sunxi.install
@@ -4,4 +4,3 @@ cp board/sunxi/mksunxi_fit_atf.sh debian/build/mksunxi_fit_atf
 echo debian/build/mksunxi_fit_atf /usr/bin/
 
 echo debian/bin/u-boot-install-sunxi64 /usr/bin/
-echo debian/manpages/u-boot-install-sunxi64.8 /usr/share/man/man8/
diff --git a/debian/u-boot-sunxi.manpages b/debian/u-boot-sunxi.manpages
new file mode 100644
index 0000000000..f72604d63f
--- /dev/null
+++ b/debian/u-boot-sunxi.manpages
@@ -0,0 +1 @@
+debian/manpages/u-boot-install-sunxi64.8
diff --git a/debian/u-boot-tools.install b/debian/u-boot-tools.install
index 74e80d942c..80fbad26b7 100755
--- a/debian/u-boot-tools.install
+++ b/debian/u-boot-tools.install
@@ -8,9 +8,6 @@ done
 # install config
 echo ${builddir}/config /usr/share/doc/u-boot-tools/
 
-echo doc/mkimage.1 /usr/share/man/man1/
-echo doc/kwboot.1 /usr/share/man/man1/
-
 # example env configs
 for env_config in debian/env-configs/*.config tools/env/fw_env.config ; do
        echo ${env_config} /usr/share/doc/u-boot-tools/examples/
diff --git a/debian/u-boot-tools.manpages b/debian/u-boot-tools.manpages
new file mode 100644
index 0000000000..a250e967fd
--- /dev/null
+++ b/debian/u-boot-tools.manpages
@@ -0,0 +1,2 @@
+doc/kwboot.1
+doc/mkimage.1
>From b246be4e59602350b4df6d42bbcc7a9367e31f25 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <nico...@debian.org>
Date: Tue, 1 Dec 2020 19:22:47 +0100
Subject: Simplify debian/u-boot-tools.install

It was made executable when dpkg-architecture variables where needed.

diff --git a/debian/u-boot-tools.install b/debian/u-boot-tools.install
old mode 100755
new mode 100644
index 80fbad26b7..47e333dbdb
--- a/debian/u-boot-tools.install
+++ b/debian/u-boot-tools.install
@@ -1,14 +1,12 @@
-#!/bin/sh
-
-builddir=debian/build/tools
-for tool in dumpimage mkimage mkenvimage mksunxiboot kwboot ; do
-    echo ${builddir}/tools/${tool} /usr/bin/
-done
+debian/build/tools/tools/dumpimage      usr/bin
+debian/build/tools/tools/kwboot         usr/bin
+debian/build/tools/tools/mkenvimage     usr/bin
+debian/build/tools/tools/mkimage        usr/bin
+debian/build/tools/tools/mksunxiboot    usr/bin
 
 # install config
-echo ${builddir}/config /usr/share/doc/u-boot-tools/
+debian/build/tools/config               usr/share/doc/u-boot-tools
 
 # example env configs
-for env_config in debian/env-configs/*.config tools/env/fw_env.config ; do
-       echo ${env_config} /usr/share/doc/u-boot-tools/examples/
-done
+debian/env-configs/*.config             usr/share/doc/u-boot-tools/examples
+tools/env/fw_env.config                 usr/share/doc/u-boot-tools/examples
>From fd075f84219564df6c9ffedb9073b61fbf9c78ae Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <nico...@debian.org>
Date: Thu, 3 Dec 2020 20:01:13 +0100
Subject: Simplify handling of DEB_BUILD_OPTIONS=parallel=N


diff --git a/debian/rules b/debian/rules
index 1bd0591119..ae6a32775c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,9 +10,7 @@ cross_build_tools ?= y
 endif
 
 # support parallel build using DEB_BUILD_OPTIONS=parallel=N
-ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-  DEB_UBOOT_FLAGS += -j$(patsubst parallel=%,%,$(filter 
parallel=%,$(DEB_BUILD_OPTIONS)))
-endif
+DEB_UBOOT_FLAGS += $(patsubst parallel=%,-j%,$(filter 
parallel=%,$(DEB_BUILD_OPTIONS)))
 
 # Enable verbose build by default, disable when terse is specified.
 ifneq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
>From 1c3702cb0811070b55162fccca75330dc28d4697 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <nico...@debian.org>
Date: Thu, 3 Dec 2020 20:03:23 +0100
Subject: In debian/rules, add prerequisite configs/*_defconfig it

This lets Make regenerate them if the source ever changes.

diff --git a/debian/rules b/debian/rules
index ae6a32775c..5069edb2af 100755
--- a/debian/rules
+++ b/debian/rules
@@ -36,11 +36,11 @@ endif
 %:
        dh $@
 
-configs/novena-rawsd_defconfig:
+configs/novena-rawsd_defconfig: configs/novena_defconfig
        sed -e 's,CONFIG_SPL_FS_FAT=y,# CONFIG_SPL_FS_FAT is not set,' \
                configs/novena_defconfig > configs/novena-rawsd_defconfig
 
-configs/am335x_boneblack_defconfig:
+configs/am335x_boneblack_defconfig: configs/am335x_evm_defconfig
        sed -e 's,CONFIG_OF_LIST=.*,CONFIG_OF_LIST="am335x-evm 
am335x-boneblack",g' \
                configs/am335x_evm_defconfig > 
configs/am335x_boneblack_defconfig
 
>From 403e6a701e9bc17f5f29c6167a12473901c4c0b9 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <nico...@debian.org>
Date: Thu, 3 Dec 2020 20:04:51 +0100
Subject: In debian/rules, simplify DEB_BUILD_PROFILES=pkg.uboot.notools


diff --git a/debian/rules b/debian/rules
index 5069edb2af..955f464a9e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -46,11 +46,7 @@ configs/am335x_boneblack_defconfig: 
configs/am335x_evm_defconfig
 
 override_dh_auto_build-arch: TOOLSDIR := debian/build/tools
 override_dh_auto_build-arch: TARGETARCH := $(DEB_HOST_ARCH)
-ifeq (,$(filter pkg.uboot.notools,$(DEB_BUILD_PROFILES)))
 override_dh_auto_build-arch: build-targets build-tools
-else
-override_dh_auto_build-arch: build-targets
-endif
 
 override_dh_auto_build-indep: TOOLSDIR := debian/build/tools
 override_dh_auto_build-indep: TARGETARCH := all
@@ -115,6 +111,7 @@ build-targets: configs/novena-rawsd_defconfig 
configs/am335x_boneblack_defconfig
        done
 
 build-tools:
+ifeq (,$(filter pkg.uboot.notools,$(DEB_BUILD_PROFILES)))
        $(MAKE) V=$(VERBOSE) O=$(TOOLSDIR) CROSS_COMPILE=$(CROSS_COMPILE) 
tools-only_defconfig
        # Disable fit signatures, which requires OpenSSL which triggers
        # licensing incompatibilities with the GPL:
@@ -132,6 +129,7 @@ build-tools:
        $(CROSS_COMPILE)strip --strip-unneeded --remove-section=.comment 
--remove-section=.note $(TOOLSDIR)/tools/kwboot
        $(CROSS_COMPILE)strip --strip-unneeded --remove-section=.comment 
--remove-section=.note $(TOOLSDIR)/tools/mksunxiboot
        $(CROSS_COMPILE)strip --strip-unneeded --remove-section=.comment 
--remove-section=.note $(TOOLSDIR)/tools/dumpimage
+endif
 
 override_dh_auto_test:
 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))

Reply via email to