File: build

package info (click to toggle)
fribidi 1.0.16-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,024 kB
  • sloc: ansic: 8,767; sh: 4,766; makefile: 372; python: 27
file content (33 lines) | stat: -rwxr-xr-x 699 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
31
32
33
#!/bin/sh
# autopkgtest check: Build and run a program against fribidi, to verify that the
# headers and pkg-config file are installed correctly

set -e

if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
    CC="$DEB_HOST_GNU_TYPE-gcc"
    PKGCONFIG="$DEB_HOST_GNU_TYPE-pkg-config"
else
    CC=gcc
    PKGCONFIG=pkg-config
fi

WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
cat <<EOF > fribiditest.c
#include <fribidi.h>
#include <stdio.h>

int main(int argc, char **argv)
{
  printf("%s\n", fribidi_version_info);
  return 0;
}
EOF

"$CC" -o fribiditest fribiditest.c `"$PKGCONFIG" --cflags --libs fribidi`
echo "build: OK"
[ -x fribiditest ]
./fribiditest
echo "run: OK"