File: build

package info (click to toggle)
wireplumber 0.5.13-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,316 kB
  • sloc: ansic: 41,436; python: 391; sh: 86; makefile: 57; xml: 23
file content (30 lines) | stat: -rw-r--r-- 676 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
# autopkgtest check: Build and run a program against libwireplumber, to verify that
# the headers and pkg-config file are installed correctly

set -e

if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
    CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
else
    CROSS_COMPILE=
fi

cat <<EOF > libwireplumber_test.c
#include <wp/wp.h>

int main(void)
{
  wp_init (WP_INIT_ALL);
  return 0;
}
EOF

# deliberately word-splitting pkg-config output:
# shellcheck disable=SC2046
"${CROSS_COMPILE}gcc" -o libwireplumber_test libwireplumber_test.c \
$("${CROSS_COMPILE}pkg-config" --cflags --libs wireplumber-0.5)
echo "build: OK"
[ -x libwireplumber_test ]
./libwireplumber_test
echo "run: OK"