Package: ell
Version: 0.50-1
It would be nicer if the package had autopkgtests testing. The attached
patch is adding a trivial build test on the model of the ones used for
most GNOME libraries, it ensure that a simple case builds and that the
dev isn't missing any depends
Thanks for considering
diff -Nru ell-0.50/debian/changelog ell-0.50/debian/changelog
--- ell-0.50/debian/changelog 2022-04-22 12:05:21.000000000 +0200
+++ ell-0.50/debian/changelog 2022-05-06 15:06:10.000000000 +0200
@@ -1,3 +1,9 @@
+ell (0.50-2) unstable; urgency=medium
+
+ * debian/tests: add a trivial build autopkgtest
+
+ -- Sebastien Bacher <seb...@ubuntu.com> Fri, 06 May 2022 15:06:10 +0200
+
ell (0.50-1) unstable; urgency=medium
[ upstream ]
diff -Nru ell-0.50/debian/tests/build ell-0.50/debian/tests/build
--- ell-0.50/debian/tests/build 1970-01-01 01:00:00.000000000 +0100
+++ ell-0.50/debian/tests/build 2022-05-06 14:43:27.000000000 +0200
@@ -0,0 +1,35 @@
+#!/bin/sh
+# Copyright 2020 Collabora Ltd.
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+set -eux
+
+if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
+ CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
+else
+ CROSS_COMPILE=
+fi
+
+cd "$AUTOPKGTEST_TMP"
+
+cat > trivial.c <<EOF
+#include <ell/ell.h>
+
+int main(void)
+{
+ l_log_set_stderr();
+
+ if (!l_main_init())
+ return -1;
+
+ l_info("Trivial");
+ return 0;
+}
+EOF
+
+# Deliberately word-splitting pkg-config's output:
+# shellcheck disable=SC2046
+"${CROSS_COMPILE}gcc" -otrivial trivial.c $("${CROSS_COMPILE}pkg-config" --cflags --libs ell glib-2.0)
+echo "build: OK"
+./trivial
+echo "run: OK"
diff -Nru ell-0.50/debian/tests/control ell-0.50/debian/tests/control
--- ell-0.50/debian/tests/control 1970-01-01 01:00:00.000000000 +0100
+++ ell-0.50/debian/tests/control 2022-05-06 14:20:35.000000000 +0200
@@ -0,0 +1,3 @@
+Tests: build
+Depends: libglib2.0-dev, build-essential
+Restrictions: allow-stderr, superficial