Files: debian/*
Copyright: 2007, Étienne Bersac <bersace03@laposte.net>
2012, Matteo F. Vescovi <mfv@debian.org>
-License: LGPL-3+
+ 2020 Collabora Ltd.
+ 2020 Simon McVittie
+License: LGPL-3+ and Expat
License: Expat
SPDX-License-Identifier: MIT
--- /dev/null
+Tests: libbabl-dev
+Depends: build-essential, pkg-config, libbabl-dev
+Restrictions: allow-stderr, superficial
+
+Tests: gir1.2-babl-0.1
+Depends: gir1.2-babl-0.1, python3-gi
+Restrictions: allow-stderr, superficial
--- /dev/null
+#!/usr/bin/python3
+# Copyright 2020 Simon McVittie
+# SPDX-License-Identifier: MIT
+
+import os
+
+import gi
+gi.require_version('Babl', '0.1')
+
+from gi.repository import Babl
+
+if __name__ == '__main__':
+ triple = Babl.get_version()
+ assert tuple(triple) >= (0, 1)
--- /dev/null
+#!/bin/sh
+# Copyright 2020 Collabora Ltd.
+# SPDX-License-Identifier: MIT
+
+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 <babl/babl.h>
+
+#undef NDEBUG
+#include <assert.h>
+
+int main(void)
+{
+ int x, y, z;
+
+ babl_get_version(&x, &y, &z);
+ assert(x >= 0);
+ assert(y >= 0);
+ assert(z >= 0);
+ assert((x * 1000) + y >= 1);
+ 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 babl)
+./trivial