File: build

package info (click to toggle)
gspell 1.14.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,296 kB
  • sloc: ansic: 8,063; xml: 120; sh: 39; makefile: 12
file content (33 lines) | stat: -rwxr-xr-x 736 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
31
32
33
#!/bin/sh
# autopkgtest check: Build and run a program against libsoup, to verify that
# the headers and pkg-config file are installed correctly
# (C) 2012 Canonical Ltd.
# (C) 2018-2019 Simon McVittie
# (C) 2019 Laurent Bigonville
# 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 > gspell.c
#include <gspell/gspell.h>

int main(void)
{
    g_assert_true (gspell_checker_new(NULL));
    return 0;
}
EOF

cflags=-Wno-deprecated-declarations
code=gspell.c
lib=gspell-1

gcc $cflags -o "${lib}-test" "${code}" $(pkg-config --cflags --libs "$lib")
echo "build ($lib): OK"

./${lib}-test
echo "run ($lib): OK"