[Git][haskell-team/haskell-devscripts][master] 20 commits: Update dh_haskell_blurbs to not require dev parameter

Scott Talbert (@swt2c) gitlab at salsa.debian.org
Fri Oct 10 19:30:17 BST 2025



Scott Talbert pushed to branch master at Debian Haskell Group / haskell-devscripts


Commits:
7461878b by Scott Talbert at 2025-09-26T19:46:17-04:00
Update dh_haskell_blurbs to not require dev parameter

This is in preparation for dh-haskell calling this script once for all
installables.

- - - - -
c85df1dd by Scott Talbert at 2025-09-26T21:03:50-04:00
Update dh_haskell_depends_cabal to not require config-shipper parameter

This is in preparation for dh-haskell calling this script once for all
installables.

- - - - -
6adf13a4 by Scott Talbert at 2025-09-26T21:20:34-04:00
Update dh_haskell_depends_haddock to ignore non-doc packages

- - - - -
6f1d9c51 by Scott Talbert at 2025-09-28T15:30:18-04:00
Update dh_haskell_depends_hugs to ignore non-hugs packages

- - - - -
815752ac by Scott Talbert at 2025-09-28T15:30:22-04:00
Update dh_haskell_install_development_libs to ignore non-dev packages

- - - - -
f9c03488 by Scott Talbert at 2025-09-28T15:30:22-04:00
Update dh_haskell_install_ghc_registration to ignore non-dev packages

- - - - -
5d16c803 by Scott Talbert at 2025-09-28T15:30:22-04:00
Update dh_haskell_install_haddock to ignore non-doc packages

- - - - -
fa910efa by Scott Talbert at 2025-09-28T15:30:22-04:00
Update dh_haskell_install_htmldocs to ignore non-doc packages

- - - - -
e0d14977 by Scott Talbert at 2025-09-28T15:30:22-04:00
Update dh_haskell_install_profiling_libs to ignore non-prof packages

- - - - -
4b0c197f by Scott Talbert at 2025-09-28T15:30:22-04:00
Update dh_haskell_provides_ghc to not require config-shipper parameter

- - - - -
99a90c8d by Scott Talbert at 2025-09-28T15:30:22-04:00
Update dh_haskell_recommends_documentation_references to ignore non-doc pkgs

- - - - -
862a3cba by Scott Talbert at 2025-09-28T15:30:22-04:00
Update dh_haskell_shlibdeps to ignore non-dev packages

- - - - -
6df7a7ca by Scott Talbert at 2025-09-28T15:30:22-04:00
Update dh_haskell_suggests to ignore non-doc packages

- - - - -
dea768b9 by Scott Talbert at 2025-09-28T15:30:22-04:00
Update dh_haskell_extra_depends_ghc to not require type param

- - - - -
f609490c by Scott Talbert at 2025-09-28T15:30:22-04:00
Add myself to Uploaders

- - - - -
ef2dcea0 by Scott Talbert at 2025-10-08T18:35:11-04:00
Move envvars needed by dh_haskell_ scripts to common library

- - - - -
6ebcfd47 by Scott Talbert at 2025-10-08T18:35:11-04:00
Change default source-dir for installation scripts to debian/tmp

- - - - -
732a0a5f by Scott Talbert at 2025-10-10T14:20:40-04:00
Update Standards-Version to 4.7.2 (no changes needed)

- - - - -
88975bd1 by Scott Talbert at 2025-10-10T14:20:40-04:00
Remove FSF mailing address from d/copyright

- - - - -
8e59b6da by Scott Talbert at 2025-10-10T14:21:56-04:00
Release version 0.16.37 to unstable

- - - - -


18 changed files:

- debian/changelog
- debian/control
- debian/copyright
- dh_haskell_blurbs
- dh_haskell_depends_cabal
- dh_haskell_depends_haddock
- dh_haskell_depends_hugs
- dh_haskell_extra_depends_ghc
- dh_haskell_install_development_libs
- dh_haskell_install_ghc_registration
- dh_haskell_install_haddock
- dh_haskell_install_htmldocs
- dh_haskell_install_profiling_libs
- dh_haskell_provides_ghc
- dh_haskell_recommends_documentation_references
- dh_haskell_shlibdeps
- dh_haskell_suggests
- lib/Debian/Debhelper/Buildsystem/Haskell/Recipes.pm


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,27 @@
+haskell-devscripts (0.16.37) unstable; urgency=medium
+
+  * Update dh_haskell_blurbs to not require dev parameter
+  * Update dh_haskell_depends_cabal to not require config-shipper parameter
+  * Update dh_haskell_depends_haddock to ignore non-doc packages
+  * Update dh_haskell_depends_hugs to ignore non-hugs packages
+  * Update dh_haskell_install_development_libs to ignore non-dev packages
+  * Update dh_haskell_install_ghc_registration to ignore non-dev packages
+  * Update dh_haskell_install_haddock to ignore non-doc packages
+  * Update dh_haskell_install_htmldocs to ignore non-doc packages
+  * Update dh_haskell_install_profiling_libs to ignore non-prof packages
+  * Update dh_haskell_provides_ghc to not require config-shipper parameter
+  * Update dh_haskell_recommends_documentation_references to ignore non-doc pkgs
+  * Update dh_haskell_shlibdeps to ignore non-dev packages
+  * Update dh_haskell_suggests to ignore non-doc packages
+  * Update dh_haskell_extra_depends_ghc to not require type param
+  * Add myself to Uploaders
+  * Move envvars needed by dh_haskell_ scripts to common library
+  * Change default source-dir for installation scripts to debian/tmp
+  * Update Standards-Version to 4.7.2 (no changes needed)
+  * Remove FSF mailing address from d/copyright
+
+ -- Scott Talbert <swt at techie.net>  Fri, 10 Oct 2025 14:21:01 -0400
+
 haskell-devscripts (0.16.36) unstable; urgency=medium
 
   * Introduce config_to_package_id method


=====================================
debian/control
=====================================
@@ -4,9 +4,10 @@ Priority: optional
 Maintainer: Debian Haskell Group <pkg-haskell-maintainers at lists.alioth.debian.org>
 Uploaders: Ilias Tsitsimpis <iliastsi at debian.org>
          , Felix Lechner <felix.lechner at lease-up.com>
+         , Scott Talbert <swt at techie.net>
 Build-Depends: debhelper-compat (= 13)
 Build-Depends-Indep: perl
-Standards-Version: 4.7.0
+Standards-Version: 4.7.2
 Rules-Requires-Root: no
 Vcs-Browser: https://salsa.debian.org/haskell-team/haskell-devscripts
 Vcs-Git: https://salsa.debian.org/haskell-team/haskell-devscripts.git/


=====================================
debian/copyright
=====================================
@@ -31,8 +31,7 @@ License: GPL-2
  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, write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ along with this package; if not, see <https://www.gnu.org/licenses/>.
  .
  On Debian and systems the full text of the GNU General Public
  License version 2 can be found in the file
@@ -49,9 +48,8 @@ License: GPL-2+
  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, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ You should have received a copy of the GNU General Public License
+ along with this package; if not, see <https://www.gnu.org/licenses/>.
  .
  On Debian systems, the complete text of the GNU General Public License
  can be found in `/usr/share/common-licenses/GPL-2` and


=====================================
dh_haskell_blurbs
=====================================
@@ -25,6 +25,9 @@ use utf8;
 use Const::Fast;
 use Path::Tiny;
 
+use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(
+  installable_type
+);
 use Debian::Debhelper::Dh_Lib;
 
 const my $EMPTY => q{};
@@ -37,49 +40,47 @@ init(
         'type=s' => \$dh{TYPE},
     });
 
-my $type = $dh{TYPE} // $EMPTY;
 
-my $short_blurb;
-my $long_blurb;
+for my $installable (@{ $dh{DOPACKAGES} }) {
+    my $type = $dh{TYPE} // installable_type($installable);
+
+    my $short_blurb;
+    my $long_blurb;
 
-if ($type eq 'dev') {
+    if ($type eq 'dev') {
 
-    $short_blurb = $EMPTY;
-    $long_blurb =<< 'QUOTE_END';
+        $short_blurb = $EMPTY;
+        $long_blurb =<< 'QUOTE_END';
 This package provides a library for the Haskell programming language.
 See http://www.haskell.org/ for more information on Haskell.
 QUOTE_END
-}
+    } elsif ($type eq 'prof') {
 
-if ($type eq 'prof') {
-
-    $short_blurb = '; profiling libraries';
-    $long_blurb = << 'QUOTE_END';
+        $short_blurb = '; profiling libraries';
+        $long_blurb = << 'QUOTE_END';
 This package provides a library for the Haskell programming language, compiled
 for profiling.  See http://www.haskell.org/ for more information on Haskell.
 QUOTE_END
-}
+    } elsif ($type eq 'doc') {
 
-if ($type eq 'doc') {
-
-    $short_blurb = '; documentation';
-    $long_blurb = << 'QUOTE_END';
+        $short_blurb = '; documentation';
+        $long_blurb = << 'QUOTE_END';
 This package provides the documentation for a library for the Haskell
 programming language.
 See http://www.haskell.org/ for more information on Haskell.
 QUOTE_END
-}
+    } else {
+        next;
+    }
 
-$short_blurb //= $EMPTY;
-$long_blurb //= $EMPTY;
+    $short_blurb //= $EMPTY;
+    $long_blurb //= $EMPTY;
 
-chomp $short_blurb;
-chomp $long_blurb;
+    chomp $short_blurb;
+    chomp $long_blurb;
 
-# replace newlines with magic marker
-$long_blurb =~ s{ \n }{$MAGIC_MARKER}gx;
-
-for my $installable (@{ $dh{DOPACKAGES} }) {
+    # replace newlines with magic marker
+    $long_blurb =~ s{ \n }{$MAGIC_MARKER}gx;
 
     my $substvars_path = "debian/$installable.substvars";
 


=====================================
dh_haskell_depends_cabal
=====================================
@@ -29,8 +29,10 @@ use Unicode::UTF8 qw(encode_utf8);
 
 use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(
   run
+  init_hs_env
   installable_type
   installable_hc
+  installable_config_shipper
   hc_pkgdir
   ghc_pkg_command
   load_ghc_database
@@ -50,6 +52,7 @@ init(
     options => {
         'config-shipper=s' => \$dh{CONFIG_SHIPPER},
     });
+init_hs_env();
 
 my $haskell_ghc_pkg = ghc_pkg_command();
 
@@ -62,7 +65,8 @@ for my $installable (@{ $dh{DOPACKAGES} }) {
 
     my $pkgdir = hc_pkgdir($haskell_compiler);
 
-    my $config_shipper = $dh{CONFIG_SHIPPER} || $installable;
+    my $config_shipper
+        = $dh{CONFIG_SHIPPER} || installable_config_shipper($installable);
     my $confdir = "debian/$config_shipper/$pkgdir";
 
     my @ghc_configs;


=====================================
dh_haskell_depends_haddock
=====================================
@@ -29,6 +29,7 @@ use Path::Tiny;
 use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(
   run
   installable_hc
+  installable_type
   hc_haddock
 );
 use Debian::Debhelper::Dh_Lib;
@@ -42,6 +43,9 @@ init();
 
 for my $installable (@{ $dh{DOPACKAGES} }) {
 
+    my $type = installable_type($installable);
+    next if ($type ne 'doc');
+
     my $compiler = installable_hc($installable);
     my $haddock_command = hc_haddock($compiler);
 


=====================================
dh_haskell_depends_hugs
=====================================
@@ -36,15 +36,17 @@ const my $NEWLINE => qq{\n};
 
 init();
 
-my $version = run(qw{dpkg-query --showformat=${Version} --show hugs});
-my $upstream_version = $version;
+for my $installable (@{ $dh{DOPACKAGES} }) {
 
-# strip Debian revision
-$upstream_version =~ s{ - [^-]* $}{}x;
+    next if ($installable !~ m{^ libhugs- .* $}x);
 
-my @depends = ("hugs (>= $upstream_version)");
+    my $version = run(qw{dpkg-query --showformat=${Version} --show hugs});
+    my $upstream_version = $version;
 
-for my $installable (@{ $dh{DOPACKAGES} }) {
+    # strip Debian revision
+    $upstream_version =~ s{ - [^-]* $}{}x;
+
+    my @depends = ("hugs (>= $upstream_version)");
 
     my $substvars_path = "debian/$installable.substvars";
 


=====================================
dh_haskell_extra_depends_ghc
=====================================
@@ -29,7 +29,9 @@ use Unicode::UTF8 qw(encode_utf8);
 
 use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(
   run
+  init_hs_env
   installable_hc
+  installable_type
   ghc_pkg_command
   load_ghc_database
   own_cabal_prerequisites
@@ -46,11 +48,10 @@ init(
     options => {
         'type=s' => \$dh{TYPE},
     });
-
-my $type = $dh{TYPE} // $EMPTY;
+init_hs_env();
 
 # this installs the extra-packages file
-if ($type eq 'dev' && length $ENV{DEB_GHC_EXTRA_PACKAGES}) {
+if (length $ENV{DEB_GHC_EXTRA_PACKAGES}) {
 
     die encode_utf8('Need CABAL_PACKAGE for DEB_GHC_EXTRA_PACKAGES')
       unless length $ENV{CABAL_PACKAGE};
@@ -60,6 +61,9 @@ if ($type eq 'dev' && length $ENV{DEB_GHC_EXTRA_PACKAGES}) {
 
     for my $installable (@{ $dh{DOPACKAGES} }) {
 
+        my $type = $dh{TYPE} // installable_type($installable);
+        next if ($type ne 'dev');
+
         my $EP_DIR
           = "debian/$installable/usr/lib/haskell-packages/extra-packages";
         run(qw{mkdir --parents}, $EP_DIR);


=====================================
dh_haskell_install_development_libs
=====================================
@@ -28,6 +28,7 @@ use Unicode::UTF8 qw(encode_utf8);
 use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(
   run
   installable_hc
+  installable_type
   hc_libdir
 );
 use Debian::Debhelper::Dh_Lib;
@@ -42,10 +43,13 @@ init(
 
 for my $installable (@{ $dh{DOPACKAGES} }) {
 
+    my $type = installable_type($installable);
+    next if ($type ne 'dev');
+
     my $compiler = installable_hc($installable) || $ENV{DEB_DEFAULT_COMPILER};
     my $libdir = hc_libdir($compiler);
 
-    my $source = $dh{SOURCE_DIR} || $DOT;
+    my $source = $dh{SOURCE_DIR} || 'debian/tmp';
 
     next
       unless -e "$source/$libdir";


=====================================
dh_haskell_install_ghc_registration
=====================================
@@ -26,18 +26,24 @@ use Unicode::UTF8 qw(encode_utf8);
 
 use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(
   run
+  init_hs_env
   installable_hc
+  installable_type
   hc_pkgdir
 );
 use Debian::Debhelper::Dh_Lib;
 
 init();
+init_hs_env();
 
 die encode_utf8('No Setup.hs executable named.')
   unless length $ENV{DEB_SETUP_BIN_NAME};
 
 for my $installable (@{ $dh{DOPACKAGES} }) {
 
+    my $type = installable_type($installable);
+    next if ($type ne 'dev');
+
     my $compiler = installable_hc($installable) || $ENV{DEB_DEFAULT_COMPILER};
     my $pkgdir = hc_pkgdir($compiler);
 


=====================================
dh_haskell_install_haddock
=====================================
@@ -27,7 +27,9 @@ use Unicode::UTF8 qw(encode_utf8);
 
 use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(
   run
+  init_hs_env
   installable_hc
+  installable_type
   hc_docdir
 );
 use Debian::Debhelper::Dh_Lib;
@@ -38,6 +40,7 @@ init(
     options => {
         'source-dir=s' => \$dh{SOURCE_DIR},
     });
+init_hs_env();
 
 die encode_utf8('Need CABAL_PACKAGE to install HTML documentation.')
   unless length $ENV{CABAL_PACKAGE};
@@ -47,12 +50,15 @@ die encode_utf8('Need CABAL_VERSION to install HTML documentation.')
 
 for my $installable (@{ $dh{DOPACKAGES} }) {
 
+    my $type = installable_type($installable);
+    next if ($type ne 'doc');
+
     my $compiler = installable_hc($installable) || $ENV{DEB_DEFAULT_COMPILER};
 
     my $docdir
       = hc_docdir($compiler, $ENV{CABAL_PACKAGE}, $ENV{CABAL_VERSION});
 
-    my $source = $dh{SOURCE_DIR} || $DOT;
+    my $source = $dh{SOURCE_DIR} || 'debian/tmp';
     my $tmp_docdir = "$source/$docdir";
 
     next


=====================================
dh_haskell_install_htmldocs
=====================================
@@ -27,7 +27,9 @@ use Unicode::UTF8 qw(encode_utf8);
 
 use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(
   run
+  init_hs_env
   installable_hc
+  installable_type
   hc_htmldir
 );
 use Debian::Debhelper::Dh_Lib;
@@ -39,16 +41,20 @@ init(
     options => {
         'source-dir=s' => \$dh{SOURCE_DIR},
     });
+init_hs_env();
 
 die encode_utf8('Need CABAL_PACKAGE to install HTML documentation.')
   unless length $ENV{CABAL_PACKAGE};
 
 for my $installable (@{ $dh{DOPACKAGES} }) {
 
+    my $type = installable_type($installable);
+    next if ($type ne 'doc');
+
     my $compiler = installable_hc($installable) || $ENV{DEB_DEFAULT_COMPILER};
     my $htmldir = hc_htmldir($compiler, $ENV{CABAL_PACKAGE});
 
-    my $source = $dh{SOURCE_DIR} || $DOT;
+    my $source = $dh{SOURCE_DIR} || 'debian/tmp';
 
     next
       unless -e "$source/$htmldir";


=====================================
dh_haskell_install_profiling_libs
=====================================
@@ -28,6 +28,7 @@ use Unicode::UTF8 qw(encode_utf8);
 use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(
   run
   installable_hc
+  installable_type
   hc_libdir
 );
 use Debian::Debhelper::Dh_Lib;
@@ -42,10 +43,13 @@ init(
 
 for my $installable (@{ $dh{DOPACKAGES} }) {
 
+    my $type = installable_type($installable);
+    next if ($type ne 'prof');
+
     my $compiler = installable_hc($installable) || $ENV{DEB_DEFAULT_COMPILER};
     my $libdir = hc_libdir($compiler);
 
-    my $source = $dh{SOURCE_DIR} || $DOT;
+    my $source = $dh{SOURCE_DIR} || 'debian/tmp';
 
     next
       unless -e "$source/$libdir";


=====================================
dh_haskell_provides_ghc
=====================================
@@ -30,8 +30,10 @@ use Unicode::UTF8 qw(encode_utf8);
 
 use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(
   run
+  init_hs_env
   installable_type
   installable_hc
+  installable_config_shipper
   hc_pkgdir
   ghc_pkg_command
   load_ghc_database
@@ -48,13 +50,15 @@ init(
     options => {
         'config-shipper=s' => \$dh{CONFIG_SHIPPER},
     });
+init_hs_env();
 
 for my $installable (@{ $dh{DOPACKAGES} }) {
 
     my $compiler = installable_hc($installable) || $ENV{DEB_DEFAULT_COMPILER};
     my $pkgdir = hc_pkgdir($compiler);
 
-    my $config_shipper = $dh{CONFIG_SHIPPER} || $installable;
+    my $config_shipper
+        = $dh{CONFIG_SHIPPER} || installable_config_shipper($installable);
     my $confdir = "debian/$config_shipper/$pkgdir";
 
     my @configs;


=====================================
dh_haskell_recommends_documentation_references
=====================================
@@ -29,7 +29,10 @@ use Path::Tiny;
 use Unicode::UTF8 qw(encode_utf8);
 use Cwd qw(abs_path);
 
-use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(run_quiet);
+use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(
+  installable_type
+  run_quiet
+);
 use Debian::Debhelper::Dh_Lib;
 
 const my $EMPTY => q{};
@@ -48,6 +51,9 @@ die encode_utf8('grep-dctrl is missing')
 
 for my $installable (@{ $dh{DOPACKAGES} }) {
 
+    my $type = installable_type($installable);
+    next if ($type ne 'doc');
+
     say encode_utf8(
         "Finding all links in the documentation in installable $installable.");
     my @links =split(


=====================================
dh_haskell_shlibdeps
=====================================
@@ -31,7 +31,9 @@ use Unicode::UTF8 qw(encode_utf8 decode_utf8);
 
 use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(
   run
+  init_hs_env
   installable_hc
+  installable_type
   hc_pkgdir
   ghc_pkg_command
   load_ghc_database
@@ -43,11 +45,15 @@ const my $SPACE => q{ };
 const my $NEWLINE => qq{\n};
 
 init();
+init_hs_env();
 
 my $ghc_pkg = ghc_pkg_command();
 
 for my $installable (@{ $dh{DOPACKAGES} }) {
 
+    my $type = installable_type($installable);
+    next if ($type ne 'dev');
+
     my $compiler = installable_hc($installable) || $ENV{DEB_DEFAULT_COMPILER};
     my $pkgdir = hc_pkgdir($compiler);
 


=====================================
dh_haskell_suggests
=====================================
@@ -26,6 +26,7 @@ use Const::Fast;
 use List::SomeUtils qw(uniq);
 use Path::Tiny;
 
+use Debian::Debhelper::Buildsystem::Haskell::Recipes qw(installable_type);
 use Debian::Debhelper::Dh_Lib;
 
 const my $SPACE => q{ };
@@ -37,6 +38,9 @@ init();
 
 for my $installable (@{ $dh{DOPACKAGES} }) {
 
+    my $type = installable_type($installable);
+    next if ($type ne 'doc');
+
     my @suggests;
 
     for my $suffix (qw{prof doc}) {


=====================================
lib/Debian/Debhelper/Buildsystem/Haskell/Recipes.pm
=====================================
@@ -32,6 +32,7 @@ BEGIN {
       run
       installable_hc
       installable_type
+      installable_config_shipper
       source_hc
       hc_libdir
       hc_pkgdir
@@ -44,6 +45,7 @@ BEGIN {
       own_cabal_prerequisites
       hashed_id_to_virtual_installable
       config_to_package_id
+      init_hs_env
       clean_recipe
       make_setup_recipe
       configure_recipe
@@ -185,6 +187,27 @@ sub installable_type {
     return $EMPTY;
 }
 
+=item installable_config_shipper
+
+=cut
+
+sub installable_config_shipper {
+    my ($installable) = @_;
+
+    if ($installable =~ m{^ ( lib .* ) - ( [^-]+) $}x) {
+
+        my $prefix = $1;
+        my $type = $2;
+
+        return $installable
+            if $type eq 'dev';
+
+        return "$prefix-dev";
+    }
+
+    return $EMPTY;
+}
+
 =item source_hc
 
 =cut
@@ -500,6 +523,48 @@ sub config_to_package_id {
     return $package_id;
 }
 
+=item init_hs_env
+
+=cut
+
+sub init_hs_env {
+    $ENV{DEB_DEFAULT_COMPILER} //= 'ghc';
+
+    $ENV{DEB_GHC_DATABASE} = 'debian/tmp-db';
+
+    my @cabal_candidates = glob('*.cabal');
+
+    error('No cabal file found')
+      unless @cabal_candidates;
+
+    error('More than one cabal file')
+      if @cabal_candidates > 1;
+
+    my $cabal_path = $cabal_candidates[0];
+    my $cabal_contents = path($cabal_path)->slurp_utf8;
+
+    error('Cannot get package name from cabal file')
+      unless $cabal_contents =~ /^ name \s* : \s* (\S*) \s* $/imx;
+
+    my $package_name = lc $1;
+
+    $ENV{CABAL_PACKAGE} //= $package_name;
+
+    error('Cannot get package version from cabal file')
+      unless $cabal_contents =~ /^ version \s* : \s* (\S*) \s* $/imx;
+
+    my $package_version = $1;
+
+    $ENV{CABAL_VERSION} = $package_version;
+
+    $ENV{DEB_ENABLE_TESTS} //= 'no';
+    $ENV{DEB_ENABLE_HOOGLE} //= 'yes';
+
+    $ENV{DEB_SETUP_BIN_NAME} //= 'debian/hlibrary.setup';
+
+    return;
+}
+
 =item clean_recipe
 
 =cut



View it on GitLab: https://salsa.debian.org/haskell-team/haskell-devscripts/-/compare/4fd7aecd88ea73c08ee139bc86670c0a328c3768...8e59b6da6f7854a4d130cc2b69f48009615386a9

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/haskell-devscripts/-/compare/4fd7aecd88ea73c08ee139bc86670c0a328c3768...8e59b6da6f7854a4d130cc2b69f48009615386a9
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/20251010/7a77ef4b/attachment-0001.htm>


More information about the Pkg-haskell-commits mailing list