summaryrefslogtreecommitdiff
path: root/debian/tests/pkg-config-test
diff options
context:
space:
mode:
authorCorentin Noël <corentin.noel@collabora.com>2018-06-03 16:37:44 +0100
committerCorentin Noël <corentin.noel@collabora.com>2019-03-08 19:13:06 +0100
commit7c461f0396d413acb9a950f3df9ea6d062896cd7 (patch)
tree7e6ee54c377af089e9ab788ef963c3a34054aae4 /debian/tests/pkg-config-test
parentf541aec06bce1ccac98dabe61137b56ed563e0e9 (diff)
Add pkg-config files for the apt-pkg and apt-inst libraries
Closes: #439121
Diffstat (limited to 'debian/tests/pkg-config-test')
-rw-r--r--debian/tests/pkg-config-test22
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/tests/pkg-config-test b/debian/tests/pkg-config-test
new file mode 100644
index 000000000..cb8d1ffb0
--- /dev/null
+++ b/debian/tests/pkg-config-test
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+cat <<EOF > pkgconfigtest.c
+#include <apt-pkg/init.h>
+
+int main()
+{
+ printf("Apt Version: %s \n", pkgVersion);
+ return 0;
+}
+EOF
+
+g++ -o pkgconfigtest pkgconfigtest.c `pkg-config --cflags --libs apt-pkg apt-inst`
+echo "build: OK"
+[ -x pkgconfigtest ]
+./pkgconfigtest
+echo "run: OK"