diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 09:59:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 09:59:38 +0000 |
commit | ff83fcf9b9090b4ce27b3566f74a12a78bf07a10 (patch) | |
tree | 810db5b9e99a40e5cb043761770f2b8960109f83 /debian/tests/pkg-config-test | |
parent | Adding upstream version 2.7.12. (diff) | |
download | apt-ff83fcf9b9090b4ce27b3566f74a12a78bf07a10.tar.xz apt-ff83fcf9b9090b4ce27b3566f74a12a78bf07a10.zip |
Adding debian version 2.7.12.debian/2.7.12
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | debian/tests/pkg-config-test | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/tests/pkg-config-test b/debian/tests/pkg-config-test new file mode 100644 index 0000000..e074b16 --- /dev/null +++ b/debian/tests/pkg-config-test @@ -0,0 +1,32 @@ +#!/bin/sh +set -e + +if [ -z "$AUTOPKGTEST_TMP" ]; then + WORKDIR='' + cleanup() { + if [ -n "$WORKDIR" ]; then cd /; rm -rf -- "$WORKDIR"; fi + WORKDIR='' + } + trap 'cleanup' 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM + WORKDIR="$(mktemp -d)" + cd "$WORKDIR" +else + cd "$AUTOPKGTEST_TMP" +fi + +cat >pkgconfigtest.cc <<EOF +#include <apt-pkg/init.h> +#include <cstdio> + +int main() +{ + printf("APT Version: %s\n", pkgVersion); + return 0; +} +EOF + +g++ -Wall -Wextra -o pkgconfigtest pkgconfigtest.cc `pkg-config --cflags --libs apt-pkg` +echo 'build: OK' +test -x pkgconfigtest +./pkgconfigtest +echo 'run: OK' |