summaryrefslogtreecommitdiffstats
path: root/rules/grpc.make
diff options
context:
space:
mode:
authorClemens Gruber <clemens.gruber@pqgruber.com>2018-12-10 14:56:51 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2018-12-15 19:54:05 +0100
commit966b193a3e4f7ccd0c0c1c42df5e9eee4c0b75d6 (patch)
tree2124297fe922a72d3eebfe276afaaaefa6fc899c /rules/grpc.make
parent2537429397c46f4c027e105a8af3150c8525462b (diff)
downloadptxdist-966b193a3e4f7ccd0c0c1c42df5e9eee4c0b75d6.tar.gz
ptxdist-966b193a3e4f7ccd0c0c1c42df5e9eee4c0b75d6.tar.xz
grpc: add pkg-config files
The grpc cmake build process does not produce .pc files. To ease reuse of grpc from other packages, patch them in. The pkg-config files are based on those created by the grpc Makefile build. (gpr.pc merged into grpc.pc to avoid adding a third .pc file) The library version numbers are extracted from the Makefile. Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com> [mol: simplify version parsing] Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/grpc.make')
-rw-r--r--rules/grpc.make18
1 files changed, 18 insertions, 0 deletions
diff --git a/rules/grpc.make b/rules/grpc.make
index b75389a87..b8db64e7b 100644
--- a/rules/grpc.make
+++ b/rules/grpc.make
@@ -50,6 +50,24 @@ GRPC_CONF_OPT := \
-DPROTOBUF_PROTOC_EXECUTABLE=$(PTXDIST_SYSROOT_HOST)/bin/protoc
# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/grpc.install:
+ @$(call targetinfo)
+ @$(call world/install, GRPC)
+
+ @install -d $(GRPC_PKGDIR)/usr/lib/pkgconfig/
+ VERSION=$$(sed -n '/CORE_VERSION =/s/.*=\s*\(.*\)/\1/p' $(GRPC_DIR)/Makefile) \
+ ptxd_replace_magic $(GRPC_DIR)/grpc.pc.in > \
+ $(GRPC_PKGDIR)/usr/lib/pkgconfig/grpc.pc
+ VERSION=$$(sed -n '/CPP_VERSION =/s/.*=\s*\(.*\)/\1/p' $(GRPC_DIR)/Makefile) \
+ ptxd_replace_magic $(GRPC_DIR)/grpc++.pc.in > \
+ $(GRPC_PKGDIR)/usr/lib/pkgconfig/grpc++.pc
+
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------