[med-svn] [Git][med-team/easel][master] 2 commits: Use d-shlibs for the shared library
Andreas Tille (@tille)
gitlab at salsa.debian.org
Thu Nov 12 06:20:50 GMT 2026
Andreas Tille pushed to branch master at Debian Med / easel
Commits:
e15e1d5e by Andreas Tille at 2026-11-11T21:32:19+01:00
Use d-shlibs for the shared library
d-shlibmove moves the SONAME, the real library, the dev symlink, the
headers and the pkgconfig file into libeasel0 and libeasel-dev, and
d-devlibdeps derives the -dev dependencies (mpi-default-dev, via an
override) instead of hardcoding them. The hand-written manifests are
no longer needed.
- - - - -
c07abfb1 by Andreas Tille at 2026-11-12T07:20:10+01:00
Add autopkgtest
- - - - -
8 changed files:
- debian/control
- + debian/example/readseq.c
- + debian/libeasel-dev.examples
- − debian/libeasel-dev.install
- − debian/libeasel0.install
- debian/rules
- + debian/tests/control
- + debian/tests/run-unit-test
Changes:
=====================================
debian/control
=====================================
@@ -7,6 +7,7 @@ Uploaders:
Section: science
Build-Depends:
debhelper-compat (= 14),
+ d-shlibs,
help2man,
libgsl-dev,
mpi-default-dev,
@@ -41,7 +42,7 @@ Architecture: any
Section: libdevel
Depends:
libeasel0 (= ${binary:Version}),
- mpi-default-dev,
+ ${devlibs:Depends},
${misc:Depends},
Description: library of C functions for biological sequence analysis
Easel is an ANSI C code library for computational analysis of
=====================================
debian/example/readseq.c
=====================================
@@ -0,0 +1,63 @@
+/* Read a sequence file and a Stockholm alignment using the installed
+ * Easel library. Exercises libeasel's public API and the easel.pc
+ * pkg-config file; used by the package autopkgtest.
+ */
+#include "easel.h"
+#include "esl_alphabet.h"
+#include "esl_msa.h"
+#include "esl_msafile.h"
+#include "esl_sq.h"
+#include "esl_sqio.h"
+
+#include <stdio.h>
+
+static void
+read_seqs(const char *path)
+{
+ ESL_SQFILE *sqfp;
+ ESL_SQ *sq = esl_sq_Create();
+ int n = 0;
+ int status;
+
+ status = esl_sqfile_Open(path, eslSQFILE_UNKNOWN, NULL, &sqfp);
+ if (status != eslOK) esl_fatal("failed to open %s", path);
+ while ((status = esl_sqio_Read(sqfp, sq)) == eslOK) n++;
+ if (status != eslEOF) esl_fatal("failed to read %s", path);
+ esl_sq_Destroy(sq);
+ esl_sqfile_Close(sqfp);
+
+ if (n < 1) esl_fatal("no sequences in %s", path);
+ printf("%s: %d sequences\n", path, n);
+}
+
+static void
+read_msa(const char *path)
+{
+ ESL_ALPHABET *abc = NULL;
+ ESL_MSAFILE *afp = NULL;
+ ESL_MSA *msa = NULL;
+ int status;
+
+ status = esl_msafile_Open(&abc, path, NULL, eslMSAFILE_UNKNOWN, NULL, &afp);
+ if (status != eslOK) esl_fatal("failed to open %s", path);
+ status = esl_msafile_Read(afp, &msa);
+ if (status != eslOK) esl_fatal("failed to read %s", path);
+ printf("%s: alignment %s, %d seqs, %" PRIi64 " columns\n",
+ path, msa->name ? msa->name : "(unnamed)", msa->nseq, msa->alen);
+
+ esl_msa_Destroy(msa);
+ esl_msafile_Close(afp);
+ esl_alphabet_Destroy(abc);
+}
+
+int
+main(int argc, char **argv)
+{
+ int i;
+
+ if (argc < 2) { fprintf(stderr, "Usage: %s <seqfile> [<msafile>]\n", argv[0]); return 1; }
+
+ read_seqs(argv[1]);
+ for (i = 2; i < argc; i++) read_msa(argv[i]);
+ return 0;
+}
=====================================
debian/libeasel-dev.examples
=====================================
@@ -0,0 +1,4 @@
+debian/example/*
+formats/fasta
+formats/genbank
+formats/stockholm.1
=====================================
debian/libeasel-dev.install deleted
=====================================
@@ -1,3 +0,0 @@
-usr/lib/*/libeasel.so
-usr/lib/*/pkgconfig/easel.pc
-usr/include/easel
=====================================
debian/libeasel0.install deleted
=====================================
@@ -1 +0,0 @@
-usr/lib/*/libeasel.so.0*
=====================================
debian/rules
=====================================
@@ -43,6 +43,9 @@ override_dh_auto_build:
$(MAKE) -C documentation pdf || { grep -n -A5 '^!' documentation/latex.log; exit 1; }
chmod a-x devkit/cexcerpt
+override_dh_auto_test:
+ $(MAKE) tests
+
override_dh_auto_install:
dh_auto_install
install -d debian/tmp/usr/lib/$(MULTIARCH)/pkgconfig debian/tmp/usr/include/easel
@@ -53,3 +56,10 @@ override_dh_auto_install:
sed -e 's/@VERSION@/$(EASEL_VERSION)/' \
-e 's|@LIBDIR@|/usr/lib/$(MULTIARCH)|' \
debian/easel.pc.in > debian/tmp/usr/lib/$(MULTIARCH)/pkgconfig/easel.pc
+ d-shlibmove --commit --multiarch --devunversioned --exclude-la --exclude-a \
+ --movedev debian/tmp/usr/include/easel usr/include \
+ --movedev debian/tmp/usr/lib/$(MULTIARCH)/pkgconfig/easel.pc usr/lib/$(MULTIARCH)/pkgconfig \
+ --override 's/libmpi40-dev/mpi-default-dev/' \
+ --override 's/libopen_mpi40-dev/mpi-default-dev/' \
+ debian/tmp/usr/lib/$(MULTIARCH)/libeasel.so
+
=====================================
debian/tests/control
=====================================
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, build-essential, pkgconf
+Restrictions: allow-stderr
=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,16 @@
+#!/bin/bash
+set -e
+
+pkg="easel"
+
+if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
+ AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+ # shellcheck disable=SC2064
+ trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a /usr/share/doc/libeasel-dev/examples/* "${AUTOPKGTEST_TMP}"
+
+cd "${AUTOPKGTEST_TMP}"
+
+make check
View it on GitLab: https://salsa.debian.org/med-team/easel/-/compare/f8dd90c414d078659d9a56cdaa198e71a45b5e5c...c07abfb187090c08feb99076c762a3a0507c303c
--
View it on GitLab: https://salsa.debian.org/med-team/easel/-/compare/f8dd90c414d078659d9a56cdaa198e71a45b5e5c...c07abfb187090c08feb99076c762a3a0507c303c
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/20261112/18b8f168/attachment-0001.htm>
More information about the debian-med-commit
mailing list