[med-svn] [Git][med-team/gfaz][master] Build shared and static gfaz libraries to enable building vg against these

Andreas Tille (@tille) gitlab at salsa.debian.org
Thu Nov 5 07:16:38 GMT 2026



Andreas Tille pushed to branch master at Debian Med / gfaz


Commits:
d788a742 by Andreas Tille at 2026-11-05T08:02:56+01:00
Build shared and static gfaz libraries to enable building vg against these

- - - - -


10 changed files:

- debian/changelog
- debian/control
- + debian/gfaz.install
- + debian/libgfaz-dev.install
- + debian/libgfaz0.install
- + debian/libgfaz0.lintian-overrides
- + debian/patches/0002-Add-shared-libraries-and-install-rules.patch
- debian/patches/series
- + debian/python3-gfaz.install
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+gfaz (0.0~git20260915.f1c1b7f-2) UNRELEASED; urgency=medium
+
+  * Build shared and static gfaz libraries to enable building vg against
+    these
+
+ -- Andreas Tille <tille at debian.org>  Thu, 05 Nov 2026 15:00:00 +0100
+
 gfaz (0.0~git20260915.f1c1b7f-1) unstable; urgency=medium
 
   * Initial release. (Closes: #1151944)


=====================================
debian/control
=====================================
@@ -44,3 +44,33 @@ Description: Python bindings for the GFAz GFA compressor
  segments and encoding paths with a learned grammar on top of Zstandard.
  .
  This package contains the gfa_compression Python module.
+
+Package: libgfaz0
+Section: libs
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+Description: GFA compression tool based on 2-mer reordering - shared libraries
+ GFAz compresses Graphical Fragment Assembly (GFA) files by reordering
+ segments and encoding paths with a learned grammar on top of Zstandard.
+ .
+ This package contains the shared libraries used by the gfaz command line
+ tool and the Python bindings.
+
+Package: libgfaz-dev
+Section: libdevel
+Architecture: any
+Multi-Arch: same
+Depends:
+ libgfaz0 (= ${binary:Version}),
+ libzstd-dev,
+ ${misc:Depends},
+Description: GFA compression tool based on 2-mer reordering - development files
+ GFAz compresses Graphical Fragment Assembly (GFA) files by reordering
+ segments and encoding paths with a learned grammar on top of Zstandard.
+ .
+ This package contains the header files, the unversioned shared library
+ links and the static libraries needed to build applications against GFAz.


=====================================
debian/gfaz.install
=====================================
@@ -0,0 +1 @@
+usr/bin/gfaz


=====================================
debian/libgfaz-dev.install
=====================================
@@ -0,0 +1,7 @@
+usr/include/gfaz
+usr/lib/*/libgfaz_core.a
+usr/lib/*/libgfaz_compress.a
+usr/lib/*/libgfaz_compute.a
+usr/lib/*/libgfaz_core.so
+usr/lib/*/libgfaz_compress.so
+usr/lib/*/libgfaz_compute.so


=====================================
debian/libgfaz0.install
=====================================
@@ -0,0 +1,3 @@
+usr/lib/*/libgfaz_core.so.*
+usr/lib/*/libgfaz_compress.so.*
+usr/lib/*/libgfaz_compute.so.*


=====================================
debian/libgfaz0.lintian-overrides
=====================================
@@ -0,0 +1,4 @@
+# The three libgfaz_* shared objects form one tightly coupled internal set
+# that is always released and versioned together, so they intentionally share
+# a single runtime package instead of one package per SONAME.
+libgfaz0 binary: package-name-doesnt-match-sonames libgfaz-compress0 libgfaz-compute0 libgfaz-core0


=====================================
debian/patches/0002-Add-shared-libraries-and-install-rules.patch
=====================================
@@ -0,0 +1,106 @@
+Description: Build shared libraries and add install rules
+ Add shared libgfaz_core/gfaz_compress/gfaz_compute libraries alongside the
+ existing static archives, and let the CLI and Python module link the shared
+ variants.  Also add install rules so the Debian packaging can split the
+ installed files with dh_install instead of copying build artifacts by hand.
+Origin: Debian
+Forwarded: not-needed
+Last-Update: 2026-11-05
+Assisted-By: DeepSeek V4.1 Flash Free
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index df28d36..74702cd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -4,6 +4,11 @@ set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_INCLUDES OFF)
+ project(GfaCompression LANGUAGES C CXX)
+ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+ 
++# Shared library ABI version. Keep this in sync with the SONAME of the
++# libgfaz* binary packages.
++set(GFAZ_LIBRARY_VERSION "0.0.0")
++set(GFAZ_LIBRARY_SOVERSION "0")
++
+ # Language standards
+ set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+@@ -255,12 +260,46 @@ set_target_properties(gfaz_compute PROPERTIES POSITION_INDEPENDENT_CODE ON)
+ configure_gfa_target(gfaz_compute)
+ target_link_libraries(gfaz_compute PUBLIC gfaz_core)
+ 
++# Shared libraries — one per module, using the same sources as the static
++# archives. The CLI and Python module link these so that each package carries
++# only one copy of the module code. compress and compute depend on the shared
++# core library, which is why the core objects are not embedded twice.
++add_library(gfaz_core_shared SHARED ${GFAZ_CORE_SOURCES})
++set_target_properties(gfaz_core_shared PROPERTIES
++  OUTPUT_NAME gfaz_core
++  VERSION ${GFAZ_LIBRARY_VERSION}
++  SOVERSION ${GFAZ_LIBRARY_SOVERSION}
++  POSITION_INDEPENDENT_CODE ON)
++configure_gfa_target(gfaz_core_shared)
++target_include_directories(gfaz_core_shared PUBLIC include)
++
++add_library(gfaz_compress_shared SHARED ${GFAZ_COMPRESS_SOURCES})
++set_target_properties(gfaz_compress_shared PROPERTIES
++  OUTPUT_NAME gfaz_compress
++  VERSION ${GFAZ_LIBRARY_VERSION}
++  SOVERSION ${GFAZ_LIBRARY_SOVERSION}
++  POSITION_INDEPENDENT_CODE ON)
++if(ENABLE_CUDA)
++  target_sources(gfaz_compress_shared PRIVATE ${GFAZ_COMPRESS_CUDA_SOURCES})
++endif()
++configure_gfa_target(gfaz_compress_shared)
++target_link_libraries(gfaz_compress_shared PUBLIC gfaz_core_shared)
++
++add_library(gfaz_compute_shared SHARED ${GFAZ_COMPUTE_SOURCES})
++set_target_properties(gfaz_compute_shared PROPERTIES
++  OUTPUT_NAME gfaz_compute
++  VERSION ${GFAZ_LIBRARY_VERSION}
++  SOVERSION ${GFAZ_LIBRARY_SOVERSION}
++  POSITION_INDEPENDENT_CODE ON)
++configure_gfa_target(gfaz_compute_shared)
++target_link_libraries(gfaz_compute_shared PUBLIC gfaz_core_shared)
++
+ if(BUILD_PYTHON_BINDINGS)
+   # Python extension module (import name `gfa_compression`).
+   add_library(gfa_compression MODULE src/python/bindings.cpp)
+   set_target_properties(gfa_compression PROPERTIES PREFIX "")
+   target_link_libraries(gfa_compression PRIVATE pybind11::module
+-    gfaz_compress gfaz_compute gfaz_core)
++    gfaz_compress_shared gfaz_compute_shared gfaz_core_shared)
+   configure_gfa_target(gfa_compression)
+ endif()
+ 
+@@ -284,7 +323,7 @@ if(BUILD_CLI)
+   set_target_properties(gfaz PROPERTIES
+     RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/build/bin"
+   )
+-  target_link_libraries(gfaz PRIVATE gfaz_compress gfaz_compute gfaz_core)
++  target_link_libraries(gfaz PRIVATE gfaz_compress_shared gfaz_compute_shared gfaz_core_shared)
+   configure_gfa_target(gfaz)
+ 
+   # Profiling support for CLI only
+@@ -330,3 +369,22 @@ if(BUILD_CLI)
+     )
+   endif()
+ endif()
++
++# Installation layout. The Debian packaging splits these paths into the
++# libgfaz0 (shared objects), libgfaz-dev (headers, .so links and .a archives)
++# and gfaz (CLI) binary packages. The Python extension module is installed
++# separately by debian/rules.
++include(GNUInstallDirs)
++
++install(TARGETS gfaz_core gfaz_compress gfaz_compute
++  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(TARGETS gfaz_core_shared gfaz_compress_shared gfaz_compute_shared
++  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(DIRECTORY include/core include/compress include/compute
++  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gfaz)
++install(FILES extern/robin_hood/robin_hood.h
++  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gfaz)
++
++if(BUILD_CLI)
++  install(TARGETS gfaz RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
++endif()


=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
 0001-Use-system-pybind11.patch
+0002-Add-shared-libraries-and-install-rules.patch


=====================================
debian/python3-gfaz.install
=====================================
@@ -0,0 +1 @@
+usr/lib/python3/dist-packages/gfa_compression*.so


=====================================
debian/rules
=====================================
@@ -11,7 +11,7 @@ override_dh_auto_configure:
 		-DPython3_EXECUTABLE=/usr/bin/python3
 
 override_dh_auto_install:
-	install -Dm755 build/bin/gfaz debian/gfaz/usr/bin/gfaz
-	install -d debian/python3-gfaz/usr/lib/python3/dist-packages
+	dh_auto_install
+	install -d debian/tmp/usr/lib/python3/dist-packages
 	install -m755 build/gfa_compression*.so \
-		debian/python3-gfaz/usr/lib/python3/dist-packages/
+		debian/tmp/usr/lib/python3/dist-packages/



View it on GitLab: https://salsa.debian.org/med-team/gfaz/-/commit/d788a74257ccb37aee6d41d7a6a662ba96442189

-- 
View it on GitLab: https://salsa.debian.org/med-team/gfaz/-/commit/d788a74257ccb37aee6d41d7a6a662ba96442189
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20261105/28311da9/attachment-0001.htm>


More information about the debian-med-commit mailing list