Package list libsdl2-mixer / f8aa4e1 debian / tests / libsdl2-mixer-dev
f8aa4e1

Tree @f8aa4e1 (Download .tar.gz)

libsdl2-mixer-dev @f8aa4e1raw · history · blame

#!/bin/sh
# Copyright 2019 Collabora Ltd.
# SPDX-License-Identifier: Zlib
# (see "zlib/libpng" in debian/copyright)

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

export SDL_AUDIODRIVER=dummy

cp playmus.c "$WORKDIR"
cp playwave.c "$WORKDIR"

cd "$WORKDIR"

# Deliberately word-splitting pkg-config's output:
# shellcheck disable=SC2046
gcc -oplaymus playmus.c $(pkg-config --cflags --libs SDL2_mixer)
# shellcheck disable=SC2046
gcc -oplaywave playwave.c $(pkg-config --cflags --libs SDL2_mixer)

set -- xvfb-run -a

# This audio file is shipped in the alsa-utils package
"$@" ./playmus /usr/share/sounds/alsa/Front_Center.wav
"$@" ./playwave /usr/share/sounds/alsa/Front_Center.wav