summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-04-23 20:31:25 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-04-23 20:31:25 -0400
commit09863c18e5ab00046cfd5163ddfa2a04ee063357 (patch)
tree879b7d40f12914924c349dd6035666595ac1ed72
parent6c051826f3241caa4afc982d402682101c63c7e3 (diff)
dh is fully working and is being used to build debhelper
-rwxr-xr-xdebian/rules3
-rwxr-xr-xdh14
-rwxr-xr-xrun1
3 files changed, 17 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index 5b8fd17..03db2d0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,4 +1,7 @@
#!/usr/bin/make -f
+# If you're looking for an example debian/rules that uses debhelper, see
+# the examples directory.
+#
# Each debhelper command in this rules file has to be run using ./run,
# to ensure that the commands and libraries in the source tree are used,
# rather than the installed ones.
diff --git a/dh b/dh
index 15e922c..215833f 100755
--- a/dh
+++ b/dh
@@ -221,7 +221,7 @@ $sequences{install} = [@{$sequences{build}}, qw{
dh_gconf
dh_icons
dh_perl
- dh_python
+ dh_pysupport
dh_scrollkeeper
dh_usrlocal
@@ -242,6 +242,13 @@ $sequences{binary} = [@{$sequences{install}}, qw{
}, @b];
$sequences{'binary-arch'} = [@{$sequences{binary}}];
+# Third-party commands can be listed in the sequences, but should be
+# listed here as well. They will not be run if not present.
+my %thirdparty=(
+ dh_pycompat => 1,
+ dh_pysupport => 1,
+);
+
# Get the sequence of commands to run.
if (! @ARGV) {
error "specify a sequence to run";
@@ -350,6 +357,11 @@ sub run {
unshift @options, "-k";
}
+ # If a third party command is not in /usr/bin, don't try to run it.
+ if ($thirdparty{$command} && ! -x "/usr/bin/$command") {
+ return;
+ }
+
# The 4 spaces is a kind of half indent.
print " ".escape_shell($command, @options)."\n";
diff --git a/run b/run
index 00449b0..2c74976 100755
--- a/run
+++ b/run
@@ -3,6 +3,7 @@
# Run items from current directory by preference.
PATH=.:$PATH
+export PATH
# Ensure that builds are self-hosting, which means I have to use the .pm
# files in this package, not any that may be on the system.