[med-svn] [Git][med-team/libkff][master] 3 commits: Complete Debian packaging
Andreas Tille (@tille)
gitlab at salsa.debian.org
Sun Oct 25 10:46:24 GMT 2026
Andreas Tille pushed to branch master at Debian Med / libkff
Commits:
73b45532 by Andreas Tille at 2026-10-25T11:32:45+01:00
Complete Debian packaging
Add install rules upstream via a patch (library plus the generated
header, versioned soname), a shared library package, a development
package, a real copyright file and an autopkgtest that round-trips a
small kff file through the low and high level reader APIs.
- - - - -
131e21bd by Andreas Tille at 2026-10-25T11:45:03+01:00
New upstream version 0.0~git20250321.cf4d866
- - - - -
ac6b3e56 by Andreas Tille at 2026-10-25T11:45:03+01:00
Update upstream source from tag 'upstream/0.0_git20250321.cf4d866'
Update to upstream version '0.0~git20250321.cf4d866'
with Debian dir 07917361b69daf3315c33d3da8054b6a906b2939
- - - - -
10 changed files:
- debian/changelog
- debian/control
- debian/copyright
- + debian/libkff-dev.install
- + debian/libkff1.install
- + debian/patches/add-install-rules.patch
- + debian/patches/series
- debian/rules
- + debian/tests/control
- + debian/tests/roundtrip
Changes:
=====================================
debian/changelog
=====================================
@@ -1,4 +1,4 @@
-kff-cpp-api (0.0~git20250321.cf4d866-1) UNRELEASED; urgency=medium
+libkff (0.0~git20250321.cf4d866-1) UNRELEASED; urgency=medium
* Initial release (Closes: #<bug>)
=====================================
debian/control
=====================================
@@ -2,14 +2,45 @@ Source: libkff
Section: science
Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
Uploaders: Andreas Tille <tille at debian.org>
-Build-Depends: debhelper-compat (= 14),
+Build-Depends:
+ debhelper-compat (= 14),
+ cmake,
Standards-Version: 4.7.4
Vcs-Browser: https://salsa.debian.org/med-team/libkff
Vcs-Git: https://salsa.debian.org/med-team/libkff.git
Homepage: https://github.com/Kmer-File-Format/kff-cpp-api
-Package: libkff-dev
+Package: libkff1
Architecture: any
+Section: libs
+Multi-Arch: same
Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: <short_description>
- <long_description>
+Description: C++ library to read and write kff k-mer files
+ The Kmer File Format (kff) is a binary container for sets of kmers and
+ their associated data, organised in typed sections: global values,
+ raw or minimizer sequences, indexes and a footer.
+ .
+ This library provides a low level API to read and write every kff
+ section type and a high level API that enumerates kmers hiding the
+ section structure.
+ .
+ This package contains the shared library.
+
+Package: libkff-dev
+Architecture: any
+Section: libdevel
+Multi-Arch: same
+Depends:
+ libkff1 (= ${binary:Version}),
+ ${misc:Depends},
+Description: C++ library to read and write kff k-mer files - development files
+ The Kmer File Format (kff) is a binary container for sets of kmers and
+ their associated data, organised in typed sections: global values,
+ raw or minimizer sequences, indexes and a footer.
+ .
+ This library provides a low level API to read and write every kff
+ section type and a high level API that enumerates kmers hiding the
+ section structure.
+ .
+ This package contains the header and the linker symlink needed to
+ build against libkff.
=====================================
debian/copyright
=====================================
@@ -1,11 +1,37 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: kff-cpp-api
+Upstream-Contact: Yoann Dufresne <yoann.dufresne0 at gmail.com>
Source: https://github.com/Kmer-File-Format/kff-cpp-api
Files: *
-Copyright: 20xx-20yy <upstream>
-License: <license>
+Copyright: 2020-2025 Yoann Dufresne <yoann.dufresne0 at gmail.com>
+ 2020 Pierre Marijon <pierre.marijon at hhu.de>
+ 2021 Rayan Chikhi <rchikhi at users.noreply.github.com>
+ 2021 Teo Lemane <teo.lemane at gmail.com>
+ 2021 Marek Kokot <marek.koki at gmail.com>
+ 2023 Jouni Siren <jouni.siren at iki.fi>
+ 2024 Pierre Peterlongo <pierre.peterlongo at inria.fr>
+ 2024 Glenn Hickey <glenn.hickey at gmail.com>
+ 2025 Antoine Limasset <antoine.limasset at gmail.com>
+License: AGPL-3.0+
Files: debian/*
Copyright: 2026 Andreas Tille <tille at debian.org>
-License: <license>
+License: AGPL-3.0+
+
+License: AGPL-3.0+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or (at your
+ option) any later version.
+ .
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ License for more details.
+ .
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU Affero General Public
+ License version 3 can be found in "/usr/share/common-licenses/AGPL-3".
=====================================
debian/libkff-dev.install
=====================================
@@ -0,0 +1,2 @@
+usr/include/kff_io.hpp
+usr/lib/*/libkff.so
=====================================
debian/libkff1.install
=====================================
@@ -0,0 +1 @@
+usr/lib/*/libkff.so.*
=====================================
debian/patches/add-install-rules.patch
=====================================
@@ -0,0 +1,47 @@
+Description: Add install rules for the library and the generated header
+ Upstream ships no install() rules, so neither the library nor the
+ header generated from kff_io.hpp.in by configure_file() would be
+ installed. Also give the library a versioned soname and use
+ GNUInstallDirs for the destination directories.
+Author: Andreas Tille <tille at debian.org>
+Last-Update: 2026-10-25
+---
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 50a9a3f..4a72737 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,5 +1,7 @@
+ cmake_minimum_required(VERSION 3.16)
+
++include(GNUInstallDirs)
++
+ # set the project name
+ project(KFF)
+ project(KFF VERSION 1.0)
+@@ -23,6 +25,10 @@ endif()
+ add_subdirectory("benchmarks")
+
+ add_library(kff kff_io.cpp)
++set_target_properties(kff PROPERTIES
++ VERSION ${PROJECT_VERSION}
++ SOVERSION ${PROJECT_VERSION_MAJOR}
++)
+
+ target_include_directories(kff
+ PUBLIC
+@@ -31,6 +37,15 @@ target_include_directories(kff
+ $<INSTALL_INTERFACE:include>
+ )
+
++install(TARGETS kff
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++)
++
++install(FILES ${CMAKE_BINARY_DIR}/kff_io.hpp
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
++)
++
+
+
+ # add the executable
=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+add-install-rules.patch
=====================================
debian/rules
=====================================
@@ -1,6 +1,13 @@
#!/usr/bin/make -f
-# DH_VERBOSE := 1
+# cmake.pm does not pass LDFLAGS on to cmake, so do it explicitly to keep
+# the linker hardening flags.
+LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
%:
dh $@
+
+override_dh_auto_configure:
+ dh_auto_configure -- \
+ -DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_SHARED_LINKER_FLAGS="$(LDFLAGS)"
=====================================
debian/tests/control
=====================================
@@ -0,0 +1,3 @@
+Tests: roundtrip
+Depends: @, build-essential
+Restrictions: allow-stderr
=====================================
debian/tests/roundtrip
=====================================
@@ -0,0 +1,74 @@
+#!/bin/sh
+set -e
+
+WORKDIR=$(mktemp -d)
+trap 'rm -rf "$WORKDIR"' 0 INT QUIT ABRT PIPE TERM
+cd "$WORKDIR"
+
+cat > roundtrip.cpp <<'EOF'
+#include <kff_io.hpp>
+#include <cstdint>
+#include <cstring>
+#include <iostream>
+
+static void encode(const char *seq, uint8_t *packed)
+{
+ for (size_t i = 0; seq[i]; ++i) {
+ uint8_t c = seq[i] == 'A' ? 0 : seq[i] == 'C' ? 1 : seq[i] == 'G' ? 3 : 2;
+ packed[i / 4] |= c << (6 - 2 * (i % 4));
+ }
+}
+
+int main()
+{
+ const char *path = "roundtrip.kff";
+ uint8_t packed[2] = {0, 0};
+ uint8_t data[5] = {1, 2, 3, 4, 5};
+ encode("ACGTACGT", packed);
+
+ {
+ Kff_file file(path, "w");
+ file.write_encoding(0, 1, 3, 2);
+ const char *meta = "autopkgtest";
+ file.write_metadata(strlen(meta), (const uint8_t *)meta);
+ Section_GV gv(&file);
+ gv.write_var("k", 4);
+ gv.write_var("max", 8);
+ gv.write_var("data_size", 1);
+ gv.close();
+ Section_Raw sr(&file);
+ sr.write_compacted_sequence(packed, 8, data);
+ sr.close();
+ file.close();
+ }
+
+ {
+ Kff_file file(path, "r");
+ Section_GV gv(&file);
+ if (file.global_vars["k"] != 4) return 1;
+ uint8_t seq[2] = {0, 0}, got[5] = {0};
+ Section_Raw sr(&file);
+ if (sr.read_compacted_sequence(seq, got) != 5) return 2;
+ if (memcmp(seq, packed, 2) != 0) return 3;
+ if (memcmp(got, data, 5) != 0) return 4;
+ file.close();
+ }
+
+ {
+ Kff_reader reader(path);
+ int n = 0;
+ while (reader.has_next()) {
+ uint8_t *kmer, *dat;
+ reader.next_kmer(kmer, dat);
+ ++n;
+ }
+ if (n != 5) return 5;
+ }
+
+ std::cout << "OK" << std::endl;
+ return 0;
+}
+EOF
+
+g++ -std=c++14 -Wall -o roundtrip roundtrip.cpp -lkff
+./roundtrip | grep -qx OK
View it on GitLab: https://salsa.debian.org/med-team/libkff/-/compare/261ccee081597a42e2ecd691931c158feff19066...ac6b3e56f1485ce93cc1d3cc92d4b0551440738f
--
View it on GitLab: https://salsa.debian.org/med-team/libkff/-/compare/261ccee081597a42e2ecd691931c158feff19066...ac6b3e56f1485ce93cc1d3cc92d4b0551440738f
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/20261025/44e6d6bc/attachment-0001.htm>
More information about the debian-med-commit
mailing list