[igraph] [PATCH] Two important packaging improvements for igraph

Aymeric Agon-Rambosson <[email protected]>
Newsgroups gmane.linux.debian.devel.medical
Message-ID <87msdyytvl.fsf@EBx360>
Hello everyone, and sorry for the duplicated receptions,

There are a couple of issues in the debian packaging of igraph.

First, in the package libigraph-dev, some of header files (4 of 
them, to be specific, the ones that are generated by 
preprocessing), are put in the directory 
/usr/include/x86_64-linux-gnu/igraph, instead of 
/usr/include/igraph/.

This is a problem, since they expect to be in the same directory 
(igraph.h includes igraph_version.h with the following statement 
#include "igraph_version.h"). This makes the library basically 
unusable for development (trying to compile any C source file that 
includes igraph.h fails immediately).

Patching d/libigraph-dev.install solves the issue.

The second issue is about the info file. The rename from 
igraph-docs to igraph breaks the references inside the info file 
itself. For instance, in the current state in unstable, the dir 
file in /usr/share/info carries the wrong file name (igraph-docs).

I had proposed some time ago a sed command to make the 
replacement, it turns out it was not wide enough. I have a patch 
to d/rules that widens the sed command accordingly, and solves the 
issue.

Here are the relevant patches, feel free to adapt.

Best,

Aymeric
0001-Update-file-references-inside-info-file-to-match-ren.patch (text/x-diff, 1.3 KB)
>From 3c371a7bb117a1bf489709eaa5f1c942b91f53b1 Mon Sep 17 00:00:00 2001
From: Aymeric Agon-Rambosson <[email protected]>
Date: Thu, 6 Mar 2025 17:16:58 +0100
Subject: [PATCH] Update file references inside info file to match rename

---
 debian/changelog | 6 ++++++
 debian/rules     | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index fdc2ed5..1695986 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+igraph (0.10.15+ds-3) UNRELEASED; urgency=medium
+
+  * Update file references inside info file to match rename.
+
+ -- Aymeric Agon-Rambosson <[email protected]>  Thu, 06 Mar 2025 15:06:51 +0100
+
 igraph (0.10.15+ds-2) unstable; urgency=medium
 
   * Debianization:
diff --git a/debian/rules b/debian/rules
index 23af3bb..0f3164d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -42,7 +42,7 @@ override_dh_auto_build-indep:
 	make -C $(BUILDIR_SHARED)/doc pdf
 	make -C $(BUILDIR_SHARED)/doc html
 	mv -v $(BUILDIR_SHARED)/doc/igraph-docs.info $(BUILDIR_SHARED)/doc/igraph.info
-	sed -i 's/File: igraph-docs.info/File: igraph.info/g' $(BUILDIR_SHARED)/doc/igraph.info
+	sed -i 's/igraph-docs/igraph/g' $(BUILDIR_SHARED)/doc/igraph.info
 	mv -v $(BUILDIR_SHARED)/doc/igraph-docs.pdf $(BUILDIR_SHARED)/doc/igraph.pdf
 	make -C $(BUILDIR_SHARED)/doc clean
 
-- 
2.39.5
0002-Correct-destination-of-preprocessed-header-files.patch (text/x-diff, 1.1 KB)
>From 5d2f7033a11acd795a9ae22034eef0c088675944 Mon Sep 17 00:00:00 2001
From: Aymeric Agon-Rambosson <[email protected]>
Date: Thu, 6 Mar 2025 17:17:47 +0100
Subject: [PATCH] Correct destination of preprocessed header files

---
 debian/changelog             | 1 +
 debian/libigraph-dev.install | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 1695986..1861927 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 igraph (0.10.15+ds-3) UNRELEASED; urgency=medium
 
   * Update file references inside info file to match rename.
+  * Correct destination of preprocessed header files.
 
  -- Aymeric Agon-Rambosson <[email protected]>  Thu, 06 Mar 2025 15:06:51 +0100
 
diff --git a/debian/libigraph-dev.install b/debian/libigraph-dev.install
index 13647cd..338c728 100644
--- a/debian/libigraph-dev.install
+++ b/debian/libigraph-dev.install
@@ -2,5 +2,5 @@ usr/lib/*/libigraph.so
 usr/lib/*/libigraph.a
 usr/lib/*/pkgconfig/*.pc
 usr/lib/*/cmake/igraph
-usr/include/*/igraph/*.h
+usr/include/*/igraph/*.h usr/include/igraph/
 usr/include/igraph/*.h
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.