--- dh_auto_build | 5 ++++- dh_auto_clean | 5 ++++- dh_auto_configure | 5 ++++- dh_auto_install | 5 ++++- dh_auto_test | 3 +++ 5 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/dh_auto_build b/dh_auto_build index a3c9521..92c3a78 100755 --- a/dh_auto_build +++ b/dh_auto_build @@ -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, or Build.PL, it is run to build the package. +If there's a setup.py, waf, 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 encouraged to skip using dh_auto_build at all, and just run the @@ -45,6 +45,9 @@ if (-e "Makefile" || -e "makefile" || -e "GNUmakefile") { elsif (-e "setup.py") { doit("python", "setup.py", "build", @{$dh{U_PARAMS}}); } +elsif (-x "waf" && -e "wscript") { + doit("./waf", "--nocache", "build", @{$dh{U_PARAMS}}); +} elsif (-e "Build.PL" && -e "Build") { doit("perl", "Build", @{$dh{U_PARAMS}}); } diff --git a/dh_auto_clean b/dh_auto_clean index 6c97b10..14db466 100755 --- a/dh_auto_clean +++ b/dh_auto_clean @@ -18,7 +18,7 @@ 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 or Build.PL, it +if the environment variable is set). If there is a setup.py, waf 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 @@ -59,6 +59,9 @@ elsif (-e "setup.py") { # files. doit('find', '.', '-name', '*.pyc', '-exec', 'rm', '{}', ';'); } +elsif (-x "waf" && -e "wscript") { + doit("./waf", "--nocache", "distclean", @{$dh{U_PARAMS}}); +} elsif (-e "Build.PL" && -e "Build") { doit("perl", "Build", "--allow_mb_mismatch", 1, "distclean", @{$dh{U_PARAMS}}); } diff --git a/dh_auto_configure b/dh_auto_configure index 6b8adf5..b131962 100755 --- a/dh_auto_configure +++ b/dh_auto_configure @@ -17,7 +17,7 @@ B<dh_auto_configure> [S<I<debhelper options>>] [S<B<--> I<params>>] 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, Makefile.PL, or Build.PL. A standard set of parameters is +script, waf, 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. @@ -84,6 +84,9 @@ if (-x "configure") { } doit("./configure", @opts, @{$dh{U_PARAMS}}); } +elsif (-x "waf" && -e "wscript") { + doit("./waf", "--nocache", "configure", "--prefix=/usr", @{$dh{U_PARAMS}}); +} elsif (-e "Makefile.PL") { # If set to a true value then MakeMaker's prompt function will # # always return the default without waiting for user input. diff --git a/dh_auto_install b/dh_auto_install index 8e7ab90..515fdc3 100755 --- a/dh_auto_install +++ b/dh_auto_install @@ -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 or Build.PL, it is used. +set). If there is a setup.py, waf or Build.PL, it is used. The files are installed into debian/<package>/ if there is only one binary package. In the multiple binary package case, the files are instead @@ -89,6 +89,9 @@ elsif (-e "setup.py") { "--no-compile", "-O0", @{$dh{U_PARAMS}}); } +elsif (-x "waf" && -e "wscript") { + doit("./waf", "--nocache", "install", "--destdir=$destdir", @{$dh{U_PARAMS}}); +} elsif (-e "Build.PL" && -e "Build") { doit("perl", "Build", "install", "destdir=$destdir", "create_packlist=0", @{$dh{U_PARAMS}}); diff --git a/dh_auto_test b/dh_auto_test index 05c11b2..03289f5 100755 --- a/dh_auto_test +++ b/dh_auto_test @@ -54,6 +54,9 @@ if (-e "Makefile" || -e "makefile" || -e "GNUmakefile") { } } } +elsif (-x "waf" && -e "wscript") { + doit("./waf", "--nocache", "check", @{$dh{U_PARAMS}}); +} elsif (-e "Build.PL" && -e "Build") { doit(qw/perl Build test/, @{$dh{U_PARAMS}}); } -- 1.6.1.3 >From 4bd5a5248a568f245b3500cbe813ab8c98edc02d Mon Sep 17 00:00:00 2001 From: Trent W. Buck <trentb...@gmail.com> Date: Wed, 25 Feb 2009 14:16:37 +1100 Subject: [PATCH 2/2] Support Setup.lhs (Haskell). --- dh_auto_build | 7 ++++++- dh_auto_clean | 8 ++++++-- dh_auto_configure | 10 +++++++--- dh_auto_install | 6 +++++- dh_auto_test | 4 ++++ 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/dh_auto_build b/dh_auto_build index 92c3a78..80f08d6 100755 --- a/dh_auto_build +++ b/dh_auto_build @@ -18,7 +18,8 @@ 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, waf, or Build.PL, it is run to build the package. +If there's a setup.py, Setup.lhs, Setup.hs, waf, 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 encouraged to skip using dh_auto_build at all, and just run the @@ -48,6 +49,10 @@ elsif (-e "setup.py") { elsif (-x "waf" && -e "wscript") { doit("./waf", "--nocache", "build", @{$dh{U_PARAMS}}); } +elsif (-e "Setup.hs" || -e "Setup.lhs") { + doit("ghc", "--make", "Setup"); + doit("./Setup", "build", "--prefix=/usr", @{$dh{U_PARAMS}}); +} elsif (-e "Build.PL" && -e "Build") { doit("perl", "Build", @{$dh{U_PARAMS}}); } diff --git a/dh_auto_clean b/dh_auto_clean index 14db466..263135f 100755 --- a/dh_auto_clean +++ b/dh_auto_clean @@ -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, waf or Build.PL, it -is run to clean the package. +if the environment variable is set). If there is a setup.py, +Setup.lhs, Setup.hs, waf 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 encouraged to skip using @@ -62,6 +62,10 @@ elsif (-e "setup.py") { elsif (-x "waf" && -e "wscript") { doit("./waf", "--nocache", "distclean", @{$dh{U_PARAMS}}); } +elsif (-e "Setup.hs" || -e "Setup.lhs") { + doit("ghc", "--make", "Setup"); + doit("./Setup", "clean", @{$dh{U_PARAMS}}); +} elsif (-e "Build.PL" && -e "Build") { doit("perl", "Build", "--allow_mb_mismatch", 1, "distclean", @{$dh{U_PARAMS}}); } diff --git a/dh_auto_configure b/dh_auto_configure index b131962..7623218 100755 --- a/dh_auto_configure +++ b/dh_auto_configure @@ -17,9 +17,9 @@ B<dh_auto_configure> [S<I<debhelper options>>] [S<B<--> I<params>>] 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, waf, 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. +script, Setup.lhs, Setup.hs, waf, 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 encouraged to skip using dh_auto_configure at all, and just run @@ -87,6 +87,10 @@ if (-x "configure") { elsif (-x "waf" && -e "wscript") { doit("./waf", "--nocache", "configure", "--prefix=/usr", @{$dh{U_PARAMS}}); } +elsif (-e "Setup.hs" || -e "Setup.lhs") { + doit("ghc", "--make", "Setup"); + doit("./Setup", "configure", "--prefix=/usr", @{$dh{U_PARAMS}}); +} elsif (-e "Makefile.PL") { # If set to a true value then MakeMaker's prompt function will # # always return the default without waiting for user input. diff --git a/dh_auto_install b/dh_auto_install index 515fdc3..5c39abb 100755 --- a/dh_auto_install +++ b/dh_auto_install @@ -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, waf or Build.PL, it is used. +set). If there is a setup.py, Setup.lhs, Setup.hs, waf or Build.PL, it is used. The files are installed into debian/<package>/ if there is only one binary package. In the multiple binary package case, the files are instead @@ -92,6 +92,10 @@ elsif (-e "setup.py") { elsif (-x "waf" && -e "wscript") { doit("./waf", "--nocache", "install", "--destdir=$destdir", @{$dh{U_PARAMS}}); } +elsif (-e "Setup.hs" || -e "Setup.lhs") { + doit("ghc", "--make", "Setup"); + doit("./Setup", "copy", "--destdir=$destdir", @{$dh{U_PARAMS}}); +} elsif (-e "Build.PL" && -e "Build") { doit("perl", "Build", "install", "destdir=$destdir", "create_packlist=0", @{$dh{U_PARAMS}}); diff --git a/dh_auto_test b/dh_auto_test index 03289f5..937559b 100755 --- a/dh_auto_test +++ b/dh_auto_test @@ -57,6 +57,10 @@ if (-e "Makefile" || -e "makefile" || -e "GNUmakefile") { elsif (-x "waf" && -e "wscript") { doit("./waf", "--nocache", "check", @{$dh{U_PARAMS}}); } +elsif (-e "Setup.hs" || -e "Setup.lhs") { + doit("ghc", "--make", "Setup"); + doit("./Setup", "test", @{$dh{U_PARAMS}}); +} elsif (-e "Build.PL" && -e "Build") { doit(qw/perl Build test/, @{$dh{U_PARAMS}}); } -- 1.6.1.3 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org