[debhelper-devel] [debhelper] 12/17: dh_installexamples: Support --sourcedir and fallback to d/tmp [c11]
Niels Thykier
nthykier at moszumanska.debian.org
Thu Jun 29 15:49:20 UTC 2017
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit 6f811431832f6c00d420b0bdeec373acbf5911c9
Author: Niels Thykier <niels at thykier.net>
Date: Thu Jun 29 11:30:09 2017 +0000
dh_installexamples: Support --sourcedir and fallback to d/tmp [c11]
Signed-off-by: Niels Thykier <niels at thykier.net>
---
dh_installexamples | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/dh_installexamples b/dh_installexamples
index 0956d6c..e459853 100755
--- a/dh_installexamples
+++ b/dh_installexamples
@@ -39,6 +39,16 @@ Lists example files or directories to be installed.
Install any files specified by command line parameters in ALL packages
acted on.
+=item B<--sourcedir=>I<dir>
+
+Look in the specified directory for files to be installed. This option
+requires compat 11 or later (it is silently ignored in compat 10 or earlier).
+
+Note that this is not the same as the B<--sourcedirectory> option used
+by the B<dh_auto_>I<*> commands. You rarely need to use this option, since
+B<dh_installexamples> automatically looks for files in F<debian/tmp> in debhelper
+compatibility level 11 and above.
+
=item B<-X>I<item>, B<--exclude=>I<item>
Exclude files that contain I<item> anywhere in their filename from
@@ -59,7 +69,9 @@ directory, it will install the complete contents of the directory.
=cut
-init();
+init(options => {
+ "sourcedir=s" => \$dh{SOURCEDIR},
+});
# PROMISE: DH NOOP WITHOUT examples
@@ -71,6 +83,8 @@ my $nodocs = is_build_profile_active('nodoc') ? 1 : 0;
# or dh_missing might make noise.
$error_handler = \&glob_expand_error_handler_silently_ignore if $nodocs;
+ at search_dirs = ($dh{SOURCEDIR} // '.', 'debian/tmp') if not compat(10);
+
foreach my $package (getpackages()) {
next if is_udeb($package);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list