]> git.donarmstrong.com Git - debhelper.git/commitdiff
dh_auto_*: Also support packages using Module::Build.
authorJoey Hess <joey@kodama.kitenet.net>
Fri, 25 Apr 2008 01:05:28 +0000 (21:05 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Fri, 25 Apr 2008 01:05:28 +0000 (21:05 -0400)
* dh_auto_*: Also support packages using Module::Build.
* dh_auto_*: Fix some calls to setup.py.

debian/changelog
dh_auto_build
dh_auto_clean
dh_auto_configure
dh_auto_install

index cf095ac8cf53f6f9c60b9d10f8840a20ddcf08b2..dbc36f24f97dcfa603e463d204d505185d2b1689 100644 (file)
@@ -4,6 +4,8 @@ debhelper (7.0.2) UNRELEASED; urgency=low
     run and there are no packages of that type.
   * dh_auto_configure: Set PERL_MM_USE_DEFAULT when configuring MakeMaker
     packages to avoid interactive prompts.
+  * dh_auto_*: Also support packages using Module::Build.
+  * dh_auto_*: Fix some calls to setup.py.
 
  -- Joey Hess <joeyh@debian.org>  Thu, 24 Apr 2008 14:10:56 -0400
 
index 2d636ea3df179c8ed19ed08a72e72322bd78f6cb..d35dfc636e53b862337befbfc1b462bfc99bcd30 100755 (executable)
@@ -18,7 +18,7 @@ B<dh_auto_build> [S<I<debhelper options>>] [S<B<--> I<params>>]
 dh_auto_build is a debhelper program that tries to automatically
 build a package. If a Makefile is found, this is done by running make (or
 MAKE, if the environment variable is set).
-If there's a setup.py, it is run to build the package.
+If there's a setup.py, or Build.PL, it is run to build the package.
 
 This is intended to work for about 90% of packages. If it doesn't work,
 you're encoruaged to skip using dh_auto_build at all, and just run the
@@ -43,7 +43,10 @@ if (-e "Makefile" || -e "makefile" || -e "GNUmakefile") {
        doit(exists $ENV{MAKE} ? $ENV{MAKE} : "make", @{$dh{U_PARAMS}});
 }
 elsif (-e "setup.py") {
-       doit("python setup.py", "build", @{$dh{U_PARAMS}});
+       doit("python", "setup.py", "build", @{$dh{U_PARAMS}});
+}
+elsif (-e "Build.PL" && -e "Build") {
+       doit("perl", "Build", @{$dh{U_PARAMS}});
 }
 
 =head1 SEE ALSO
index 9a81145a1c88984e01f78e1406227038f32407d7..8ccb8873d581227d3b70d82662af41c3829acd99 100755 (executable)
@@ -18,8 +18,8 @@ B<dh_auto_clean> [S<I<debhelper options>>] [S<B<--> I<params>>]
 dh_auto_clean is a debhelper program that tries to automatically clean up
 after a package build. If there's a Makefile and it contains a "distclean",
 "realclean", or "clean" target, then this is  done by running make (or MAKE,
-if the environment variable is set). If there is a setup.py, it is run to
-clean the package.
+if the environment variable is set). If there is a setup.py or Build.PL, it
+is run to clean the package.
 
 This is intended to work for about 90% of packages. If it doesn't work, or
 tries to use the wrong clean target, you're encoruaged to skip using
@@ -54,9 +54,11 @@ if (-e "Makefile" || -e "makefile" || -e "GNUmakefile") {
        }
 }
 elsif (-e "setup.py") {
-       doit("python setup.py", "clean", "-a", @{$dh{U_PARAMS}});
+       doit("python", "setup.py", "clean", "-a", @{$dh{U_PARAMS}});
+}
+elsif (-e "Build.PL" && -e "Build") {
+       doit("perl", "Build", "--allow_mb_mismatch", 1, "distclean", @{$dh{U_PARAMS}});
 }
-
 
 =head1 SEE ALSO
 
index 6e56c953bd4374ed19799a7890aec92b468bf3d0..4558403d0c2014c6e5f39235edf5688cf4b46015 100755 (executable)
@@ -16,10 +16,10 @@ B<dh_auto_configure> [S<I<debhelper options>>] [S<B<--> I<params>>]
 =head1 DESCRIPTION
 
 dh_auto_configure is a debhelper program that tries to automatically
-configure a package prior to building. It looks for and runs
-a ./configure script, or Makefile.PL. A standard set of parameters is
-determined and passed to the program that is run. If no program to run
-is found, dh_auto_configure will exit without doing anything.
+configure a package prior to building. It looks for and runs a ./configure
+script, Makefile.PL, or Build.PL. A standard set of parameters is
+determined and passed to the program that is run. If no program to run is
+found, dh_auto_configure will exit without doing anything.
 
 This is intended to work for about 90% of packages. If it doesn't work,
 you're encoruaged to skip using dh_auto_configure at all, and just run
@@ -90,6 +90,10 @@ elsif (-e "Makefile.PL") {
        $ENV{PERL_MM_USE_DEFAULT}=1;
        doit("perl", "Makefile.PL", "INSTALLDIRS=vendor", @{$dh{U_PARAMS}});
 }
+elsif (-e "Build.PL") {
+       $ENV{PERL_MM_USE_DEFAULT}=1; # Module::Build can also use this.
+       doit("perl", "Build.PL", "installdirs=vendor", @{$dh{U_PARAMS}});
+}
 
 =head1 SEE ALSO
 
index be052e2142825e3d93c99114893987b12f7534ad..8e6e8934a3a93539cec38faf810cba7b2ac02f30 100755 (executable)
@@ -19,7 +19,7 @@ B<dh_auto_install> [S<I<debhelper options>>] [S<B<--> I<params>>]
 dh_auto_install is a debhelper program that tries to automatically install
 built files. If there's a Makefile and it contains a "install" target,
 then this is done by running make (or MAKE, if the environment variable is
-set). If there is a setup.py, it is used.
+set). If there is a setup.py or Build.PL, it is used.
 
 The files are installed into debian/<package>/ if there is only one binary
 package to act on. In the multiple binary package case, the files are
@@ -80,12 +80,15 @@ if (-e "Makefile" || -e "makefile" || -e "GNUmakefile") {
        }
 }
 elsif (-e "setup.py") {
-       doit("python setup.py", "install", 
+       doit("python", "setup.py", "install", 
                "--root=$destdir",
                "--no-compile", "-O0",
                @{$dh{U_PARAMS}});
 }
-
+elsif (-e "Build.PL" && -e "Build") {
+       doit("perl", "Build", "install", "destdir=$destdir",
+               "create_packlist=0", @{$dh{U_PARAMS}});
+}
 
 =head1 SEE ALSO