On 2024-03-30 12:38 +0100, Santiago Vila wrote:
> El 30/3/24 a las 9:43, Sven Joachim escribió:
>> I think it would make sense for Debian to follow what Arch and Fedora
>> are doing, introduce a libdialog15 package with the shared library and a
>> libdialog-dev package with the .so symlink but without libdialog.a,
>> because that requires (if I understood you correctly) configuring and
>> building dialog twice, greatly complicating packaging.
>> Santiago, do you think this is a good plan?
>
> Yes. If we can avoid the static library to keep it simple, that would be
> better.
>
> Simple question: Is that really allowed these days? I wanted to be sure
> by reading Policy but did not find any statement saying they are required
> or not.
I could only find the following two sentences in §8.3:
,----
| The static library ("libraryname.a") is usually provided in addition
| to the shared version. It is placed into the development package (see
| below).
`----
So shipping static libraries is recommended but not required, and there
are certainly quite a few packages where upstream does not support them.
But see below.
>> I can work on an updated patch.
>
> That would definitely help.
This afternoon I got my hands dirty. The first attempt to simply pass
--with-shared to configure failed to give me a libdialog.a, and it also
produced the following odd collection of *.so* files:
libdialog.so -> libdialog.so.15.0.0
libdialog.so.1.3
libdialog.so.15.0.0 -> libdialog.so.1.3
Not what you would expect, and it does not match the files shipped in
the Fedora and Arch packages. A closer look revealed that they both
configure dialog --with-libtool, and that worked great because it gave
me not only the expected layout of *.so* files, but also a static
libdialog.a library. :-)
Patch attached, I have tested that it builds on amd64 and i386. looked
at the generated Dependencies and verified that lintian does not go
crazy, but that's it. Note that I had to add libtool-bin rather than
just libtool to Build-Depends to prevent configure from complaining, and
also pacify dh_missing considering the not installed .la file.
There are certainly a few improvements possible (e.g. adding a symbols
file, testing R³ support), I leave this up to you.
Cheers,
Sven
diff -Nru dialog-1.3-20240101/debian/changelog dialog-1.3-20240101/debian/changelog
--- dialog-1.3-20240101/debian/changelog 2024-01-23 18:05:00.000000000 +0100
+++ dialog-1.3-20240101/debian/changelog 2024-03-30 19:21:27.000000000 +0100
@@ -1,3 +1,11 @@
+dialog (1.3-20240101-2) UNRELEASED; urgency=medium
+
+ * Split out libdialog-dev into its own package. Closes: #1012325.
+ * Build a shared library.
+ * Add libtool-bin to Build-Depends.
+
+ -- Sven Joachim <[email protected]> Sat, 30 Mar 2024 19:21:27 +0100
+
dialog (1.3-20240101-1) unstable; urgency=medium
* New upstream release.
diff -Nru dialog-1.3-20240101/debian/control dialog-1.3-20240101/debian/control
--- dialog-1.3-20240101/debian/control 2024-01-23 17:00:00.000000000 +0100
+++ dialog-1.3-20240101/debian/control 2024-03-30 19:21:27.000000000 +0100
@@ -3,13 +3,12 @@
Priority: optional
Maintainer: Santiago Vila <[email protected]>
Standards-Version: 4.6.2
-Build-Depends: debhelper-compat (= 13), gettext, libncurses-dev (>= 5.3)
+Build-Depends: debhelper-compat (= 13), gettext, libncurses-dev (>= 5.3), libtool-bin
Homepage: https://invisible-island.net/dialog/dialog.html
Package: dialog
Architecture: any
Depends: debianutils (>= 1.6), ${misc:Depends}, ${shlibs:Depends}
-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,29 @@
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: libdialog15
+Architecture: any
+Section: libs
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Multi-Arch: same
+Description: Displays user-friendly dialog boxes -- shared library
+ 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 shared library.
+
+Package: libdialog-dev
+Architecture: any
+Section: libdevel
+Depends: ${misc:Depends}, libdialog15 (= ${binary:Version}), libncurses-dev
+Multi-Arch: same
+Replaces: dialog (<< 1.3-20240101-2~)
+Breaks: dialog (<< 1.3-20240101-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 development files and the API documentation.
diff -Nru dialog-1.3-20240101/debian/dialog.install dialog-1.3-20240101/debian/dialog.install
--- dialog-1.3-20240101/debian/dialog.install 2024-01-23 17:00:00.000000000 +0100
+++ dialog-1.3-20240101/debian/dialog.install 2024-03-30 17:15:33.000000000 +0100
@@ -1 +1,4 @@
dialog.pl usr/share/perl5
+usr/bin
+usr/share/locale
+usr/share/man/man1
diff -Nru dialog-1.3-20240101/debian/libdialog-dev.install dialog-1.3-20240101/debian/libdialog-dev.install
--- dialog-1.3-20240101/debian/libdialog-dev.install 1970-01-01 01:00:00.000000000 +0100
+++ dialog-1.3-20240101/debian/libdialog-dev.install 2024-03-30 17:57:12.000000000 +0100
@@ -0,0 +1,4 @@
+usr/include
+usr/lib/*/libdialog.so
+usr/lib/*/libdialog.a
+usr/share/man/man3
diff -Nru dialog-1.3-20240101/debian/libdialog15.install dialog-1.3-20240101/debian/libdialog15.install
--- dialog-1.3-20240101/debian/libdialog15.install 1970-01-01 01:00:00.000000000 +0100
+++ dialog-1.3-20240101/debian/libdialog15.install 2024-03-30 17:34:20.000000000 +0100
@@ -0,0 +1 @@
+usr/lib/*/libdialog.so.15*
diff -Nru dialog-1.3-20240101/debian/not-installed dialog-1.3-20240101/debian/not-installed
--- dialog-1.3-20240101/debian/not-installed 1970-01-01 01:00:00.000000000 +0100
+++ dialog-1.3-20240101/debian/not-installed 2024-03-30 18:16:06.000000000 +0100
@@ -0,0 +1 @@
+usr/lib/*/libdialog.la
diff -Nru dialog-1.3-20240101/debian/rules dialog-1.3-20240101/debian/rules
--- dialog-1.3-20240101/debian/rules 2024-01-23 17:00:00.000000000 +0100
+++ dialog-1.3-20240101/debian/rules 2024-03-30 17:35:35.000000000 +0100
@@ -5,7 +5,8 @@
override_dh_autoreconf:
override_dh_auto_configure:
- dh_auto_configure -- --prefix=/usr --enable-nls --with-ncursesw --disable-rpath-hack
+ dh_auto_configure -- --prefix=/usr --enable-nls --with-ncursesw \
+ --with-shared --with-libtool --disable-rpath-hack
override_dh_auto_install:
dh_auto_install -- install install-lib