File: libgcab-dev

package info (click to toggle)
gcab 1.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 868 kB
  • sloc: ansic: 3,821; makefile: 62; sh: 23
file content (30 lines) | stat: -rwxr-xr-x 715 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 gcab, to verify that the
# headers and pkg-config file are installed correctly
# (C) 2012 Canonical Ltd.
# (C) 2018-2019 Simon McVittie
# Authors: Martin Pitt, Simon McVittie

set -eux

WORKDIR="$(mktemp -d)"
export XDG_RUNTIME_DIR="$WORKDIR"
trap 'rm -rf "$WORKDIR"' 0 INT QUIT ABRT PIPE TERM
cd "$WORKDIR"
cat <<EOF > test.c
#include <libgcab.h>

int main(void)
{
    g_assert_cmpuint (GCAB_TYPE_FILE, !=, G_TYPE_INVALID);
    return 0;
}
EOF

# Deliberately word-splitting pkg-config's output:
# shellcheck disable=SC2046
gcc -o gcab-test test.c $(pkg-config --cflags --libs libgcab-1.0)
echo "build: OK"
[ -x gcab-test ]
./gcab-test
echo "run: OK"