diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-05-04 16:12:55 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-05-04 16:12:55 -0400 |
commit | 46a3cbebf3ef53caf67f013ade4efa82a948b10a (patch) | |
tree | a3f89cb99c687d9a0656b6d3b55e871bad965a85 /Debian | |
parent | 14698262f45715ebcc232b83b7a346d724fda355 (diff) |
dh addon interface
* dh: Add an interface that third-party packages providing debhelper commands
can use to insert them into a command sequence.
(See dh(1), "SEQUENCE ADDONS".)
* dh: --with=foo can be used to include such third-party commands.
So, for example, --with=cli could add the dh_cli* commands from
cli-common.
* Moved python-support special case out of dh and into a python-support
sequence addon. --with=python-support is enabled by default to avoid
breaking backwards compatability.
Diffstat (limited to 'Debian')
-rw-r--r-- | Debian/Debhelper/Dh_Getopt.pm | 6 | ||||
-rw-r--r-- | Debian/Debhelper/Sequence/python_support.pm | 15 |
2 files changed, 21 insertions, 0 deletions
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm index 55e37fd2..77e4a723 100644 --- a/Debian/Debhelper/Dh_Getopt.pm +++ b/Debian/Debhelper/Dh_Getopt.pm @@ -68,6 +68,11 @@ sub AddIgnore { my($option,$file)=@_; $options{IGNORE}->{$file}=1; } +# Add an item to the with list. +sub AddWith { my($option,$value)=@_; + push @{$options{WITH}},$value; +} + # This collects non-options values. sub NonOption { push @{$options{ARGV}}, @_; @@ -180,6 +185,7 @@ sub parseopts { "after=s" => \$options{AFTER}, "before=s" => \$options{BEFORE}, "remaining" => \$options{REMAINING}, + "with=s" => \&AddWith, "<>" => \&NonOption, ); diff --git a/Debian/Debhelper/Sequence/python_support.pm b/Debian/Debhelper/Sequence/python_support.pm new file mode 100644 index 00000000..3d03ebb3 --- /dev/null +++ b/Debian/Debhelper/Sequence/python_support.pm @@ -0,0 +1,15 @@ +#!/usr/bin/perl +# debhelper sequence file for python-support + +use warnings; +use strict; +use Debian::Debhelper::Dh_Lib; + +# Test if dh_pysupport is available before inserting it. +# (This would not be needed if this file was contained in the python-support +# package.) +if (-x "/usr/bin/dh_pysupport") { + insert_after("dh_perl", "dh_pysupport"); +} + +1 |