Control: tags -1 + patch

On 2022-06-04 09:52 +0200, Sven Joachim wrote:

> Package: dialog
> Version: 1.3-20211214-1
> Severity: normal
> User: multiarch-de...@lists.alioth.debian.org
> Usertags: multiarch
>
> The dialog package is marked Multi-Arch: foreign, but contains the
> static library /usr/lib/<triplet>/libdialog.a.  This is flagged as an
> error by lintian.
>
> ,----
> | $ lintian-explain-tags multiarch-foreign-static-library
> | N:
> | E: multiarch-foreign-static-library
> | N:
> | N:   The package is architecture-dependent, ships a static library in a 
> public, architecture-dependent library search path
> | N:   and is marked Multi-Arch: foreign. A compiler will be unable to find 
> this file, unless it is installed for a matching
> | N:   architecture, but the foreign marking says that the architecture 
> should not matter.
> | N:
> | N:   Please remove the Multi-Arch: foreign stanza.
> `----
>
> The lintian diagnosis looks correct to me, but I do not think the
> suggested remedy is what we want here.  Rather, the correct fix should
> be to split out libdialog.a and the header files into a separate
> libdialog-dev package (which probably could be marked Multi-Arch: same).

See the attached patch which is build-time tested.  The package
description for libdialog-dev might have to be tweaked, and if
1.3-20211214-2 is not the version that first applies the patch, the
Breaks/Replaces relationships need to be adjusted.

I also noticed that dialog.h #includes curses.h, so added a dependency
on libncurses-dev to libdialog-dev.

Cheers,
       Sven

diff --git a/debian/control b/debian/control
index 14ddb48..a38a59b 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,6 @@ Homepage: https://invisible-island.net/dialog/dialog.html
 Package: dialog
 Architecture: any
 Depends: ${shlibs:Depends}, debianutils (>= 1.6)
-Provides: libdialog-dev
 Multi-Arch: foreign
 Description: Displays user-friendly dialog boxes from shell scripts
  This application provides a method of displaying several different types
@@ -29,3 +28,17 @@ Description: Displays user-friendly dialog boxes from shell scripts
   tail             Allows viewing the end of files (tail) that auto updates
   background tail  Similar to tail but runs in the background.
   editbox          Allows editing an existing file
+
+Package: libdialog-dev
+Architecture: any
+Section: libdevel
+Depends: ${misc:Depends}, libncurses-dev
+Multi-Arch: same
+Replaces: dialog (<< 1.3-20211214-2~)
+Breaks: dialog (<< 1.3-20211214-2~)
+Description: Displays user-friendly dialog boxes -- development files
+ The dialog application provides a method of displaying several different
+ types of dialog boxes from shell scripts.  This allows a developer of a
+ script to interact with the user in a much friendlier manner.
+ .
+ This package contains the header files and the static library.
diff --git a/debian/dialog.install b/debian/dialog.install
index 891ffa2..7186321 100644
--- a/debian/dialog.install
+++ b/debian/dialog.install
@@ -1 +1,4 @@
 dialog.pl usr/share/perl5
+usr/bin
+usr/share/locale
+usr/share/man/man1
diff --git a/debian/libdialog-dev.install b/debian/libdialog-dev.install
new file mode 100644
index 0000000..95c4b91
--- /dev/null
+++ b/debian/libdialog-dev.install
@@ -0,0 +1,3 @@
+usr/include
+usr/lib
+usr/share/man/man3

Reply via email to