[Git][haskell-team/dh-haskell][master] 4 commits: Only set HOME envvar if it's not already set
Scott Talbert (@swt2c)
gitlab at salsa.debian.org
Tue Oct 28 05:00:46 GMT 2025
Scott Talbert pushed to branch master at Debian Haskell Group / dh-haskell
Commits:
998d4504 by Scott Talbert at 2025-10-26T10:55:44-04:00
Only set HOME envvar if it's not already set
This enables the HOME envvar to be overridden if necessary (e.g., for some
test suites that require a writable HOME).
- - - - -
24db9660 by Scott Talbert at 2025-10-28T00:03:14-04:00
Add dh_haskell_install_docfiles
This is intended to replace the automatic installation by cdbs of files
such as README, AUTHORS, etc.
- - - - -
ec8ae7c0 by Scott Talbert at 2025-10-28T00:06:31-04:00
Bump require haskell-devscripts version
- - - - -
6b41bb06 by Scott Talbert at 2025-10-28T00:07:09-04:00
dh-haskell (0.6.11) unstable; urgency=medium
- - - - -
8 changed files:
- debian/changelog
- debian/control
- + debian/dh-haskell.install
- + debian/dh-haskell.manpages
- debian/rules
- + dh_haskell_install_docfiles
- lib/Debian/Debhelper/Buildsystem/haskell.pm
- lib/Debian/Debhelper/Sequence/haskell.pm
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+dh-haskell (0.6.11) unstable; urgency=medium
+
+ * Only set HOME envvar if it's not already set
+ * Add dh_haskell_install_docfiles
+ * Bump require haskell-devscripts version
+
+ -- Scott Talbert <swt at techie.net> Tue, 28 Oct 2025 00:06:52 -0400
+
dh-haskell (0.6.10) unstable; urgency=medium
* Run check_recipe as part of test method vs build
=====================================
debian/control
=====================================
@@ -23,7 +23,7 @@ Depends:
${perl:Depends},
${shlibs:Depends},
debhelper (>= 9.20151220),
- haskell-devscripts-minimal (>= 0.16.39~) | haskell-devscripts (>= 0.16.39~),
+ haskell-devscripts-minimal (>= 0.16.42~) | haskell-devscripts (>= 0.16.42~),
libconst-fast-perl,
liblist-someutils-perl,
libpath-tiny-perl
=====================================
debian/dh-haskell.install
=====================================
@@ -0,0 +1 @@
+dh_haskell_install_docfiles usr/bin
=====================================
debian/dh-haskell.manpages
=====================================
@@ -0,0 +1 @@
+manual/dh_haskell_install_docfiles.1
=====================================
debian/rules
=====================================
@@ -1,5 +1,22 @@
#!/usr/bin/make -f
include /usr/share/dpkg/default.mk
+manual_dir := manual
+manual_pages := $(shell cat debian/dh-haskell.manpages)
+pod2man := pod2man --center 'Haskell devscripts documentation' --release 'dh-haskell $(DEB_VERSION)'
+
%:
dh $@
+
+.PHONY: after_dh_auto_build
+execute_after_dh_auto_build:
+ -mkdir -p $(manual_dir)
+ set -e ; for MANUAL_PAGE in $(manual_pages) ; do \
+ BASENAME=$$(basename "$$MANUAL_PAGE" .1) ; \
+ $(pod2man) "$$BASENAME" > "$$MANUAL_PAGE" ; \
+ done
+
+.PHONY: after_dh_auto_clean
+execute_after_dh_auto_clean:
+ rm -f $(manual_pages)
+ -rmdir $(manual_dir)
=====================================
dh_haskell_install_docfiles
=====================================
@@ -0,0 +1,85 @@
+#!/usr/bin/perl
+
+# Copyright © 2025 Scott Talbert <swt at techie.net>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+use v5.20;
+use warnings;
+use utf8;
+
+use Const::Fast;
+use Cwd;
+use Unicode::UTF8 qw(encode_utf8);
+
+use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(
+ run_quiet
+);
+use Debian::Debhelper::Dh_Lib;
+
+const my $DOT => q{.};
+const my $SEMICOLON => q{;};
+
+init();
+
+for my $installable (@{ $dh{DOPACKAGES} }) {
+
+ run_quiet(
+ 'find', '.',
+ qw{-maxdepth 1},
+ qw{( -name README -o -name NEWS -o -name TODO -o -name BUGS -o -name AUTHORS -o -name CONTRIBUTORS -o -name CREDITS -o -name THANKS )},
+ qw{-exec install -D -p --mode=644},
+ '{}', "debian/$installable/usr/share/doc/$installable/{}", $SEMICOLON
+ );
+
+ my $installed = run_quiet(
+ 'find', '.',
+ qw{-maxdepth 1},
+ qw{( -name README -o -name NEWS -o -name TODO -o -name BUGS -o -name AUTHORS -o -name CONTRIBUTORS -o -name CREDITS -o -name THANKS )},
+ qw{-print0},
+ );
+ my @installed_files = split(/\0/, $installed);
+ log_installed_files($installable, @installed_files);
+}
+
+exit;
+
+=head1 NAME
+
+dh_haskell_install_docfiles - Haskell install helper
+
+=head1 SYNOPSIS
+
+B<dh_haskell_install_docfiles> [S<I<debhelper options>>]
+
+=head1 DESCRIPTION
+
+dh_haskell_install_docfiles is a Debhelper program that helps with installing files
+when building Haskell libraries. It is intended to install documentation files such as README files that were previously automatically installed by cdbs.
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+=head1 AUTHOR
+
+Scott Talbert <swt at techie.net>
+
+=cut
+
+# Local Variables:
+# indent-tabs-mode: nil
+# cperl-indent-level: 4
+# End:
+# vim: syntax=perl sw=4 sts=4 sr et
=====================================
lib/Debian/Debhelper/Buildsystem/haskell.pm
=====================================
@@ -94,7 +94,7 @@ sub new {
init_hs_env();
# set a dummy HOME variable; Cabal expects one
- $ENV{HOME} = '/homedoesnotexistatbuildtime';
+ $ENV{HOME} //= '/homedoesnotexistatbuildtime';
$ENV{"DEB_DH_GENCONTROL_ARGS_libghc-$ENV{CABAL_PACKAGE}-dev"}
.= $SPACE . '-- -DGHC-Package=\${haskell:ghc-package}';
=====================================
lib/Debian/Debhelper/Sequence/haskell.pm
=====================================
@@ -67,6 +67,7 @@ insert_after('dh_auto_install', 'dh_haskell_extra_depends_ghc');
insert_after('dh_auto_install', 'dh_haskell_depends_hugs');
insert_after('dh_auto_install', 'dh_haskell_depends_haddock');
insert_after('dh_auto_install', 'dh_haskell_depends_cabal');
+insert_after('dh_auto_install', 'dh_haskell_install_docfiles');
insert_after('dh_auto_install', 'dh_haskell_install_haddock');
insert_after('dh_auto_install', 'dh_haskell_install_htmldocs');
insert_after('dh_auto_install', 'dh_haskell_install_profiling_libs');
View it on GitLab: https://salsa.debian.org/haskell-team/dh-haskell/-/compare/89833094a5c65a7283cb1b3fad0469f8e0223be6...6b41bb0618756123a44602ada0b37720325af4a1
--
View it on GitLab: https://salsa.debian.org/haskell-team/dh-haskell/-/compare/89833094a5c65a7283cb1b3fad0469f8e0223be6...6b41bb0618756123a44602ada0b37720325af4a1
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/20251028/28cafd13/attachment-0001.htm>
More information about the Pkg-haskell-commits
mailing list