From 7c461f0396d413acb9a950f3df9ea6d062896cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Sun, 3 Jun 2018 16:37:44 +0100 Subject: Add pkg-config files for the apt-pkg and apt-inst libraries Closes: #439121 --- debian/libapt-pkg-dev.install | 1 + debian/tests/control | 5 +++-- debian/tests/pkg-config-test | 22 ++++++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 debian/tests/pkg-config-test (limited to 'debian') diff --git a/debian/libapt-pkg-dev.install b/debian/libapt-pkg-dev.install index 42e7c34d5..563e99909 100644 --- a/debian/libapt-pkg-dev.install +++ b/debian/libapt-pkg-dev.install @@ -1,3 +1,4 @@ usr/include/apt-pkg/ usr/lib/*/libapt-inst*.so usr/lib/*/libapt-pkg*.so +usr/lib/*/pkgconfig/apt-*.pc 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 < pkgconfigtest.c +#include + +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" -- cgit v1.2.3