diff -Nru libgusb-0.4.5/debian/changelog libgusb-0.4.5/debian/changelog --- libgusb-0.4.5/debian/changelog 2023-02-27 03:02:45.000000000 +0100 +++ libgusb-0.4.5/debian/changelog 2023-04-12 06:37:28.000000000 +0200 @@ -1,3 +1,14 @@ +libgusb (0.4.5-1ubuntu1) UNRELEASED; urgency=medium + + [ Simon McVittie ] + * d/control: Add missing dependency libgusb-dev -> libjson-glib-dev + (LP: #2015952) + * Add a superficial autopkgtest for libgusb-dev + This checks whether the -dev package has all the required dependencies + to link a simple program with libgusb. + + -- Marco Trevisan (TreviƱo) Wed, 12 Apr 2023 06:37:28 +0200 + libgusb (0.4.5-1) unstable; urgency=medium * New upstream version (0.4.5) diff -Nru libgusb-0.4.5/debian/control libgusb-0.4.5/debian/control --- libgusb-0.4.5/debian/control 2023-02-27 03:02:45.000000000 +0100 +++ libgusb-0.4.5/debian/control 2023-04-12 06:37:28.000000000 +0200 @@ -1,5 +1,6 @@ Source: libgusb -Maintainer: Debian UEFI Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian UEFI Maintainers Uploaders: Steve McIntyre <93sam@debian.org>, Mario Limonciello Section: libs Priority: optional @@ -26,6 +27,7 @@ ${misc:Depends}, gir1.2-gusb-1.0 (= ${binary:Version}), libglib2.0-dev (>= 2.44.0), + libjson-glib-dev, libusb-1.0-0-dev Description: GLib wrapper around libusb1 - development files GUsb is a GObject wrapper for libusb1 that makes it easy to do diff -Nru libgusb-0.4.5/debian/tests/control libgusb-0.4.5/debian/tests/control --- libgusb-0.4.5/debian/tests/control 1970-01-01 01:00:00.000000000 +0100 +++ libgusb-0.4.5/debian/tests/control 2023-04-12 06:36:56.000000000 +0200 @@ -0,0 +1,5 @@ +Tests: libgusb-dev +Restrictions: allow-stderr, superficial +Depends: + build-essential, + libgusb-dev, diff -Nru libgusb-0.4.5/debian/tests/libgusb-dev libgusb-0.4.5/debian/tests/libgusb-dev --- libgusb-0.4.5/debian/tests/libgusb-dev 1970-01-01 01:00:00.000000000 +0100 +++ libgusb-0.4.5/debian/tests/libgusb-dev 2023-04-12 06:36:56.000000000 +0200 @@ -0,0 +1,46 @@ +#!/bin/sh +# Copyright 2023 Simon McVittie +# SPDX-License-Identifier: LGPL-2.1-or-later + +set -eux + +if [ -n "${AUTOPKGTEST_ARTIFACTS-}" ]; then + WORKDIR="$AUTOPKGTEST_ARTIFACTS" +else + WORKDIR="$(mktemp -d)" + trap 'cd /; rm -fr "$WORKDIR"' 0 INT QUIT ABRT PIPE TERM +fi + +if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then + CROSS_COMPILE="$DEB_HOST_GNU_TYPE-" +else + CROSS_COMPILE= +fi + +cat >> "$WORKDIR"/trivial.c < + +#include +#include + +int main (int argc, char *argv[]) +{ + GError *error = NULL; + GUsbContext *context = NULL; + + context = g_usb_context_new (&error); + + if (context == NULL) + g_error ("%s", error->message); + + g_object_unref (context); + return 0; +} +EOF + +cd "$WORKDIR" + +# Deliberately word-splitting pkg-config's output: +# shellcheck disable=SC2046 +"${CROSS_COMPILE}gcc" -otrivial trivial.c $("${CROSS_COMPILE}pkg-config" --cflags --libs gusb gobject-2.0 glib-2.0) +./trivial