File: build

package info (click to toggle)
ostree 2025.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,996 kB
  • sloc: ansic: 70,831; sh: 15,652; xml: 5,007; yacc: 1,236; javascript: 531; makefile: 243; python: 155
file content (30 lines) | stat: -rwxr-xr-x 529 bytes parent folder | download | duplicates (2)
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

set -e
exec 2>&1
set -x

cd "$AUTOPKGTEST_TMP"

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

cat > trivial.c <<EOF
#include <ostree.h>

int main (void)
{
    g_object_unref (ostree_repo_new_default ());
    return 0;
}
EOF

# Deliberately word-splitting, that's how pkgconf works:
# shellcheck disable=SC2046
"${CROSS_COMPILE}gcc" -o trivial trivial.c $("${CROSS_COMPILE}pkgconf" --cflags --libs ostree-1 gobject-2.0)
test -x trivial
./trivial
echo "OK"