Package: dh-haskell Version: 0.1 Severity: important Tags: patch I'm packaging a utility written in Haskell that doesn't provide any libraries, just executables. The build fails with:
> debian/haskellbuild.setup register --builddir=dist-ghc --gen-pkg-config > Package contains no library to register: blah-1.0.0.0... > dh_auto_install: More than one pkg-config file: although the problem is actually that there are *no* pkg-config files. I was able to work around it with: override_dh_auto_install: touch foo.conf dh_auto_install $(DH_INTERNAL_OPTIONS) This is ugly, of course, and I'd prefer not to have to do it. I've looked at the code in install_pkg_config(), and it seems that if there are no .conf files, the rest of the function should be skipped. However, at the call site in install(), a conf file name has to be provided, but providing "/dev/null" seems to work OK. I've tested this change and it seems to work OK, so I've attached a patch. -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (700, 'testing'), (600, 'unstable'), (500, 'testing-updates'), (500, 'testing-proposed-updates'), (500, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.3.0-1-amd64 (SMP w/8 CPU cores) Locale: LANG=en_CA.utf8, LC_CTYPE=en_CA.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages dh-haskell depends on: ii debhelper 9.20160313 ii dh-buildinfo 0.11 ii hscolour 1.23-3 ii libcarp-assert-perl 0.21-1 ii libfile-chdir-perl 0.1008-1 ii libhtml-linkextractor-perl 0.130-6 ii liblist-moreutils-perl 0.413-1+b1 ii libparse-debcontrol-perl 2.005-4 ii libparse-debianchangelog-perl 1.2.0-8 ii libreadonly-perl 2.000-2 dh-haskell recommends no packages. dh-haskell suggests no packages. -- no debconf information
>From 28c5f7778a95a25f2151a13501495eed9ec82c79 Mon Sep 17 00:00:00 2001 From: Neil Mayhew <neil_may...@users.sourceforge.net> Date: Thu, 7 Apr 2016 17:35:15 -0600 Subject: [PATCH] Handle packages that don't contain libraries --- lib/Debian/Debhelper/Buildsystem/haskell.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Debian/Debhelper/Buildsystem/haskell.pm b/lib/Debian/Debhelper/Buildsystem/haskell.pm index aabed89..7fb28af 100644 --- a/lib/Debian/Debhelper/Buildsystem/haskell.pm +++ b/lib/Debian/Debhelper/Buildsystem/haskell.pm @@ -578,6 +578,8 @@ sub install_pkg_config { run_setup( 'register', '--gen-pkg-config' ); my @candidates = <*.conf>; + + return "/dev/null" if ( @candidates == 0 ); error("More than one pkg-config file: @candidates") if ( @candidates != 1 ); my $pkg_config = $candidates[0]; -- 2.8.0.rc3