[Git][haskell-team/dh-haskell][history] 4 commits: Fix globbing invocation in two places.
Felix Lechner (@lechner)
gitlab at salsa.debian.org
Thu Apr 7 15:34:40 BST 2022
Felix Lechner pushed to branch history at Debian Haskell Group / dh-haskell
Commits:
febd03da by Felix Lechner at 2022-04-07T06:43:29-07:00
Fix globbing invocation in two places.
Commit 808e0501 was defective with respect to variable expansion.
- - - - -
0acec9f7 by Felix Lechner at 2022-04-07T07:21:21-07:00
Use run() facility from build system instead of IPC::Run3.
Produces log messages that are more consistent from a user's perspective.
- - - - -
a006e8ef by Felix Lechner at 2022-04-07T07:21:21-07:00
Invoke build time tests ("make check") when appropriate.
- - - - -
d81293cf by Felix Lechner at 2022-04-07T07:33:25-07:00
Call Haddock after the build to generate documentation.
- - - - -
2 changed files:
- debian/control
- lib/Debian/Debhelper/Buildsystem/haskell.pm
Changes:
=====================================
debian/control
=====================================
@@ -22,7 +22,6 @@ Depends:
debhelper (>= 9.20151220),
haskell-devscripts (>= 0.16.3~),
libconst-fast-perl,
- libipc-run3-perl,
liblist-someutils-perl,
libpath-tiny-perl
Description: Debhelper add-on for software written in Haskell
=====================================
lib/Debian/Debhelper/Buildsystem/haskell.pm
=====================================
@@ -48,20 +48,26 @@ use parent qw(Debian::Debhelper::Buildsystem);
use Const::Fast;
use Debian::Debhelper::Dh_Lib;
-use IPC::Run3;
use List::SomeUtils qw(any);
use Path::Tiny;
-
-use Debian::Debhelper::Buildsystem::Haskell::Recipes
- qw(make_setup_recipe configure_recipe build_recipe clean_recipe);
+use Unicode::UTF8 qw(encode_utf8);
+
+use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(
+ run
+ make_setup_recipe
+ configure_recipe
+ build_recipe
+ check_recipe
+ haddock_recipe
+ clean_recipe
+ packages_hc
+);
const my $SPACE => q{ };
const my $DOT => q{.};
const my $CURRENT_DIRECTORY => $DOT;
-const my $WAIT_STATUS_SHIFT => 8;
-
sub DESCRIPTION {
return 'cabalized Haskell packages';
}
@@ -72,7 +78,7 @@ sub check_auto_buildable {
my $sourcedir = $self->get_sourcedir;
return 1
- if glob('$sourcedir/*.cabal');
+ if glob("$sourcedir/*.cabal");
return 0;
}
@@ -89,7 +95,7 @@ sub new {
$ENV{DEB_DEFAULT_COMPILER} //= 'ghc';
- my @cabal_candidates= <*.cabal>;
+ my @cabal_candidates = glob('*.cabal');
error('No cabal file found')
unless @cabal_candidates;
@@ -185,20 +191,45 @@ sub build {
build_recipe();
+ haddock_recipe();
+
+ $self->check;
+
+ return;
+}
+
+sub check {
+ my ($self) = @_;
+
+ if ($ENV{DEB_ENABLE_TESTS} ne 'yes') {
+
+ say encode_utf8(
+'DEB_ENABLE_TESTS not set to yes, not running any build-time tests.'
+ );
+ return;
+ }
+
+ if ($ENV{DEB_BUILD_OPTIONS} =~ m{ nocheck }x) {
+
+ say encode_utf8(
+'DEB_BUILD_OPTIONS contains nocheck, not running any build-time tests.'
+ );
+ return;
+ }
+
+ check_recipe();
+
return;
}
sub install {
my ($self) = @_;
- my @command = (
- $ENV{DEB_SETUP_BIN_NAME},
- 'copy', '--builddir=dist-ghc', '--destdir=debian/tmp'
- );
- run3(\@command);
+ my $compiler = packages_hc();
+
+ run($ENV{DEB_SETUP_BIN_NAME},
+ 'copy', "--builddir=dist-$compiler", '--destdir=debian/tmp');
- my $exitcode = $?;
- my $status = ($exitcode >> $WAIT_STATUS_SHIFT);
return;
}
View it on GitLab: https://salsa.debian.org/haskell-team/dh-haskell/-/compare/172c92c6301427b5dccb11abe71ae784a6761536...d81293cfa953cb97210de06cc82acb46cd7515ed
--
View it on GitLab: https://salsa.debian.org/haskell-team/dh-haskell/-/compare/172c92c6301427b5dccb11abe71ae784a6761536...d81293cfa953cb97210de06cc82acb46cd7515ed
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20220407/b5eb2eb5/attachment-0001.htm>
More information about the Pkg-haskell-commits
mailing list