diff options
author | Julian Andres Klode <jak@debian.org> | 2019-04-04 14:17:37 +0000 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2019-04-04 14:17:37 +0000 |
commit | 0ea7c474182f81e2b7d728569a2fd7b8fa915f3f (patch) | |
tree | c917703926593b89f0be93eb4caaf6ee42eadc53 /debian/tests | |
parent | aea842e1faf5aceebdc046d3d6957a12ae10142d (diff) | |
parent | 7c461f0396d413acb9a950f3df9ea6d062896cd7 (diff) |
Merge branch 'pkgconfig' into 'master'
Add PkgConfig on the apt-pkg and apt-inst libraries
See merge request apt-team/apt!20
Diffstat (limited to 'debian/tests')
-rw-r--r-- | debian/tests/control | 5 | ||||
-rw-r--r-- | debian/tests/pkg-config-test | 22 |
2 files changed, 25 insertions, 2 deletions
diff --git a/debian/tests/control b/debian/tests/control index 540b727bb..a12ae6f99 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,8 +1,9 @@ -Tests: run-tests +Tests: run-tests, pkg-config-test Restrictions: allow-stderr Depends: @, @builddeps@, dpkg, fakeroot, wget, stunnel4, lsof, db-util, gnupg (>= 2) | gnupg2, gnupg1 | gnupg (<< 2), gpgv (>= 2) | gpgv2, gpgv1 | gpgv (<< 2), - libfile-fcntllock-perl, python3-apt, aptitude + libfile-fcntllock-perl, python3-apt, aptitude, + pkg-config 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" |