diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:03:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:03:19 +0000 |
commit | 9e3a6355172d4502a56db0ad3410b916980e6a76 (patch) | |
tree | 756fd792d3087d62e1dfe774385bac916585593e /debian/tests/build | |
parent | Adding upstream version 14.2. (diff) | |
download | pulseaudio-9e3a6355172d4502a56db0ad3410b916980e6a76.tar.xz pulseaudio-9e3a6355172d4502a56db0ad3410b916980e6a76.zip |
Adding debian version 14.2-2.debian/14.2-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/build')
-rwxr-xr-x | debian/tests/build | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/debian/tests/build b/debian/tests/build new file mode 100755 index 0000000..cd9819d --- /dev/null +++ b/debian/tests/build @@ -0,0 +1,37 @@ +#!/bin/sh +# autopkgtest check: Build and run a program against pulseaudio, to verify that the +# headers and pkg-config file are installed correctly +# (C) 2013 Canonical Ltd. +# Author: Martin Pitt <martin.pitt@ubuntu.com> +# Author: David Henningsson <david.henningsson@canonical.com> + +set -e + +WORKDIR=$(mktemp -d) +trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM +cd $WORKDIR + +if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then + CROSS_COMPILE="$DEB_HOST_GNU_TYPE-" +else + CROSS_COMPILE= +fi + +cat <<EOF > buildtest.c +#include <pulse/pulseaudio.h> +#include <assert.h> + +int main() +{ + pa_mainloop * ml = pa_mainloop_new(); + assert(ml); + pa_mainloop_free(ml); + return 0; +} +EOF + +${CROSS_COMPILE}gcc -o buildtest buildtest.c $(${CROSS_COMPILE}pkg-config --cflags --libs libpulse) +echo "build: OK" +[ -x buildtest ] +./buildtest +echo "run: OK" |