[Debichem-devel] Bug#1058868: gemmi: Please build shared library

Yadd yadd at debian.org
Sun Dec 17 09:31:17 GMT 2023


Source: gemmi
Version: 0.6.3+ds-1
Severity: important
Tags: patch
X-Debbugs-Cc: yadd at debian.org

Hi,

currently src:gemmi builds gemmi and gemmi-dev. This doesn't permit to
build any software using gemmi-dev without static linking.

The proposed patch adds package libgemmi1 which contains the shared
library.

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (900, 'testing'), (100, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.5.0-5-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information
-------------- next part --------------
diff --git a/debian/control b/debian/control
index 9f5e3d6..0490b00 100644
--- a/debian/control
+++ b/debian/control
@@ -28,6 +28,7 @@ Architecture: any
 Depends:
  ${misc:Depends},
  ${shlibs:Depends},
+ libgemmi1 (= ${binary:Version})
 Description: library for structural biology - executable
  Library for macromolecular crystallography and structural bioinformatics. For
  working with coordinate files (mmCIF, PDB, mmJSON), refinement restraints
@@ -38,11 +39,27 @@ Description: library for structural biology - executable
  .
  This package contains main gemmi executable.
 
+Package: libgemmi1
+Architecture: any
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+Description: sharred library for structural biology
+ Library for macromolecular crystallography and structural bioinformatics. For
+ working with coordinate files (mmCIF, PDB, mmJSON), refinement restraints
+ (monomer library), electron density maps (CCP4), and crystallographic
+ reflection data (MTZ, SF-mmCIF). It understands crystallographic symmetries,
+ it knows how to switch between the real and reciprocal space and it can do a
+ few other things.
+ .
+ This package contains main gemmi shared library.
+
 Package: gemmi-dev
 Architecture: any
 Section: libdevel
 Depends:
  ${misc:Depends},
+ libgemmi1 (= ${binary:Version})
 Description: library for structural biology
  Library for macromolecular crystallography and structural bioinformatics. For
  working with coordinate files (mmCIF, PDB, mmJSON), refinement restraints
diff --git a/debian/gemmi-dev.install b/debian/gemmi-dev.install
index 91a7942..7de1c21 100644
--- a/debian/gemmi-dev.install
+++ b/debian/gemmi-dev.install
@@ -1,2 +1,2 @@
 usr/include/gemmi
-usr/lib/${DEB_HOST_MULTIARCH}
+usr/lib/${DEB_HOST_MULTIARCH}/cmake
diff --git a/debian/libgemmi1.install b/debian/libgemmi1.install
new file mode 100644
index 0000000..65440b7
--- /dev/null
+++ b/debian/libgemmi1.install
@@ -0,0 +1 @@
+usr/lib/${DEB_HOST_MULTIARCH}/*.so
diff --git a/debian/libgemmi1.postinst b/debian/libgemmi1.postinst
new file mode 100644
index 0000000..fb2c2d8
--- /dev/null
+++ b/debian/libgemmi1.postinst
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ "$1" = "triggered" ] || [ "$1" = "configure" ]; then
+  ldconfig -r "$DPKG_ROOT/" || ldconfig --verbose -r "$DPKG_ROOT/"
+  exit 0
+fi
+
+exit 0
diff --git a/debian/rules b/debian/rules
index 8228c67..b3e31be 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,7 +11,7 @@ export DEB_CXXFLAGS_MAINT_APPEND = -fexcess-precision=fast # See #1042379
 	dh $@ --buildsystem cmake --with python3
 
 override_dh_auto_configure:
-	dh_auto_configure -- -DUSE_PYTHON=1 -DINSTALL_EGG_INFO=OFF
+	dh_auto_configure -- -DUSE_PYTHON=1 -DINSTALL_EGG_INFO=OFF -DBUILD_SHARED_LIBS=ON
 
 override_dh_auto_test:
 	dh_auto_build -- check


More information about the Debichem-devel mailing list