summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWook Song <wook16.song@samsung.com>2019-12-24 14:41:19 +0900
committerWook Song <wook16.song@samsung.com>2020-01-03 16:36:27 +0900
commite56dc290eb158f2fff713a123b3bccc8e5f7ef91 (patch)
tree0611062a46f009f9777209e7d338624fb9dde7df
parentcc83f37dc8c2ed5b2ee84dc5fa155fbcf2925c10 (diff)
downloaddldt-e56dc290eb158f2fff713a123b3bccc8e5f7ef91.tar.gz
dldt-e56dc290eb158f2fff713a123b3bccc8e5f7ef91.tar.bz2
dldt-e56dc290eb158f2fff713a123b3bccc8e5f7ef91.zip
[Dist/Debian] Add a .pc file to the development package
This patch adds libinference-engine.pc to the development package in order to make this package provide the information required to build binaries using the OpenVino headers and libraries. Change-Id: Ideaa6a4bf3cc7cb8dd29edc225657dfca076dbdd Signed-off-by: Wook Song <wook16.song@samsung.com>
-rw-r--r--debian/libinference-engine-dev.install1
-rwxr-xr-xdebian/rules9
-rw-r--r--packaging/libinference-engine.pc.in10
3 files changed, 20 insertions, 0 deletions
diff --git a/debian/libinference-engine-dev.install b/debian/libinference-engine-dev.install
index 4bf50dc59..d9f03d174 100644
--- a/debian/libinference-engine-dev.install
+++ b/debian/libinference-engine-dev.install
@@ -4,3 +4,4 @@
/usr/lib/*/libinference_engine_s.a
/usr/lib/*/libngraph.a
/usr/lib/*/libpugixml.a
+/usr/lib/*/pkgconfig/*.pc
diff --git a/debian/rules b/debian/rules
index 99da19d0b..e92137e78 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,6 +14,8 @@ LIBDIR := lib/${DEB_HOST_MULTIARCH}
INCDIR := include
SYSCONFDIR := /etc
DATADIR := $(PREFIX)/share
+DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
+VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[~-].*//')
%:
dh $@ --with quilt --parallel
@@ -58,10 +60,17 @@ override_dh_auto_build:
override_dh_auto_install:
mkdir -p $(SRC_ROOT)/debian/tmp$(PREFIX)/$(LIBDIR)
mkdir -p $(SRC_ROOT)/debian/tmp$(PREFIX)/$(INCDIR)
+ mkdir -p debian/tmp$(PREFIX)/$(LIBDIR)/pkgconfig
find $(SRC_ROOT)/inference-engine/bin -name "*.so" -exec install -m 644 {} $(SRC_ROOT)/debian/tmp$(PREFIX)/$(LIBDIR) \;
find $(SRC_ROOT)/inference-engine/bin -name "plugins.xml" -exec install -m 644 {} $(SRC_ROOT)/debian/tmp$(PREFIX)/$(LIBDIR) \;
cp -r $(SRC_ROOT)/inference-engine/include/* $(SRC_ROOT)/debian/tmp$(PREFIX)/$(INCDIR)
find $(SRC_ROOT)/inference-engine/bin -name "*.a" -exec install -m 644 {} $(SRC_ROOT)/debian/tmp$(PREFIX)/$(LIBDIR) \;
+ cp -f $(SRC_ROOT)/packaging/libinference-engine.pc.in debian/tmp$(PREFIX)/$(LIBDIR)/pkgconfig
+ sed -i 's|@VERSION@|$(VERSION)|g' debian/tmp$(PREFIX)/$(LIBDIR)/pkgconfig/libinference-engine.pc.in
+ sed -i 's|@PREFIX@|$(PREFIX)|g' debian/tmp$(PREFIX)/$(LIBDIR)/pkgconfig/libinference-engine.pc.in
+ sed -i 's|@LIB_INSTALL_DIR@|$(PREFIX)/$(LIBDIR)|g' debian/tmp$(PREFIX)/$(LIBDIR)/pkgconfig/libinference-engine.pc.in
+ sed -i 's|@INCLUDE_INSTALL_DIR@|$(PREFIX)/$(INCDIR)|g' debian/tmp$(PREFIX)/$(LIBDIR)/pkgconfig/libinference-engine.pc.in
+ mv debian/tmp$(PREFIX)/$(LIBDIR)/pkgconfig/libinference-engine.pc.in debian/tmp$(PREFIX)/$(LIBDIR)/pkgconfig/libinference-engine.pc
override_dh_auto_clean:
dh_auto_clean --builddirectory=$(SRC_ROOT)/inference-engine/build --
diff --git a/packaging/libinference-engine.pc.in b/packaging/libinference-engine.pc.in
new file mode 100644
index 000000000..8a4b71d27
--- /dev/null
+++ b/packaging/libinference-engine.pc.in
@@ -0,0 +1,10 @@
+prefix=@PREFIX@
+libdir=@LIB_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@
+
+Name: libinference-engine
+Description: OpenVINO™ Toolkit Development package
+Version: @VERSION@
+Requires:
+Libs: -L${libdir} -linference_engine
+Cflags: -I${includedir}