tags 570935 + patch thanks Patch adding a DH_WITH environment var attached.
-- :wq
From d19c6cec85781d1e5585c7f97e956dbb44463b1a Mon Sep 17 00:00:00 2001 From: Paul Tagliamonte <paul...@debian.org> Date: Tue, 12 Dec 2017 23:35:39 -0500 Subject: [PATCH] Add DH_WITH env variable to specify local addons. This is intended to be used by downstreams or specific local configurations that require a debhelper addon to be run during multiple builds without having to patch a large number of rules file. If at all possible, this should be avoided in favor of a --with flag in the rules file. --- debhelper.pod | 12 ++++++++++++ dh | 1 + 2 files changed, 13 insertions(+) diff --git a/debhelper.pod b/debhelper.pod index 00171e2e..88560038 100644 --- a/debhelper.pod +++ b/debhelper.pod @@ -961,6 +961,18 @@ your package is built. Multiple things to exclude can be separated with colons, as in B<DH_ALWAYS_EXCLUDE=CVS:.svn> +=item B<DH_WITH> + +If set, this adds the specified dh addons to be run in the appropriate places +in the sequence of commands. This is equivalent to specifying the addon to run +with the --with flag in the debian/rules file. Any --without calls specifying +an addon in this environment variable will not be run. + +This is intended to be used by downstreams or specific local configurations +that require a debhelper addon to be run during multiple builds without +having to patch a large number of rules file. If at all possible, this should +be avoided in favor of a --with flag in the rules file. + =back =head1 SEE ALSO diff --git a/dh b/dh index 3d268268..f43d9f7b 100755 --- a/dh +++ b/dh @@ -303,6 +303,7 @@ if (not compat(9, 1)) { unshift(@ARGV, "--with=build-stamp"); } +push @{$dh{WITH}},split(",", $ENV{DH_WITH}); inhibit_log(); -- 2.15.1