[CRIU] [PATCH 3/6] lib: Generate pkgconfig file

Tycho Andersen tycho.andersen at canonical.com
Tue Jul 29 10:06:44 PDT 2014


Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 .gitignore     | 1 +
 Makefile       | 6 ++++++
 lib/criu.pc.in | 8 ++++++++
 3 files changed, 15 insertions(+)
 create mode 100644 lib/criu.pc.in

diff --git a/.gitignore b/.gitignore
index 3cb97c4..48ccf81 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,4 @@ arch/x86/syscalls.S
 pie/pie.lds.S
 include/config.h
 protobuf-desc-gen.h
+criu.pc
diff --git a/Makefile b/Makefile
index a422614..2c6fc42 100644
--- a/Makefile
+++ b/Makefile
@@ -266,6 +266,12 @@ install: $(PROGRAM) install-man
 	$(Q) install -m 644 scripts/sd/criu.service $(DESTDIR)$(SYSTEMDUNITDIR)
 	$(Q) mkdir -p $(DESTDIR)$(LOGROTATEDIR)
 	$(Q) install -m 644 scripts/logrotate.d/criu-service $(DESTDIR)$(LOGROTATEDIR)
+	$(Q) sed -e 's, at version@,$(GITID),' \
+		-e 's, at libdir@,$(DESTDIR)$(LIBDIR),' \
+		-e 's, at includedir@,$(DESTDIR)$(dir $(INCLUDEDIR)),' \
+		lib/criu.pc.in > criu.pc
+	$(Q) mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
+	$(Q) install -m 644 criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
 
 install-man:
 	$(Q) $(MAKE) -C Documentation install
diff --git a/lib/criu.pc.in b/lib/criu.pc.in
new file mode 100644
index 0000000..33986d1
--- /dev/null
+++ b/lib/criu.pc.in
@@ -0,0 +1,8 @@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: CRIU
+Description: RPC library for userspace checkpoint and restore
+Version: @version@
+Libs: -L${libdir} -lcriu
+Cflags: -I${includedir}
-- 
1.9.1



More information about the CRIU mailing list