From c980894723ec1534603c684ad679909ccd18ac8a224ce04dfe67221d140b3da1 Mon Sep 17 00:00:00 2001
From: Martin Pluskal <mpluskal@suse.com>
Date: Fri, 31 Jul 2015 08:05:09 +0000
Subject: [PATCH] Accepting request 319712 from
 home:cbosdonnat:branches:devel:tools

- Fix version in criu.pc file.
  4c5b23e5-criu.pc.diff

OBS-URL: https://build.opensuse.org/request/show/319712
OBS-URL: https://build.opensuse.org/package/show/devel:tools/criu?expand=0&rev=27
---
 4c5b23e5-criu.pc.diff | 34 ++++++++++++++++++++++++++++++++++
 criu.changes          |  6 ++++++
 criu.spec             |  4 +++-
 3 files changed, 43 insertions(+), 1 deletion(-)
 create mode 100644 4c5b23e5-criu.pc.diff

diff --git a/4c5b23e5-criu.pc.diff b/4c5b23e5-criu.pc.diff
new file mode 100644
index 0000000..22887d4
--- /dev/null
+++ b/4c5b23e5-criu.pc.diff
@@ -0,0 +1,34 @@
+From 4c5b23e52c1dc4e3fbbc7472b92e7b1ce9d22f02 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com>
+Date: Thu, 30 Jul 2015 18:44:00 +0300
+Subject: [PATCH] Fix criu.pc version
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Use CRTOOLSVERSION instead of GITID to write criu.pc version. With
+GITID, criu.pc had version '0' when built from tarballs.
+
+Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
+Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
+Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 6ed4c90..7f5c890 100644
+--- a/Makefile
++++ b/Makefile
+@@ -339,7 +339,7 @@ install-criu: $(PROGRAM) $(CRIU-LIB) install-crit
+ 	$(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,@version@,$(GITID),' \
++	$(Q) sed -e 's,@version@,$(CRTOOLSVERSION),' \
+ 		-e 's,@libdir@,$(LIBDIR),' \
+ 		-e 's,@includedir@,$(dir $(INCLUDEDIR)),' \
+ 		lib/criu.pc.in > criu.pc
+-- 
+2.1.4
+
diff --git a/criu.changes b/criu.changes
index 73dce0c..5e18abf 100644
--- a/criu.changes
+++ b/criu.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Fri Jul 31 07:47:22 UTC 2015 - cbosdonnat@suse.com
+
+- Fix version in criu.pc file.
+  4c5b23e5-criu.pc.diff
+
 -------------------------------------------------------------------
 Mon Jun  1 15:26:56 CEST 2015 - tiwai@suse.de
 
diff --git a/criu.spec b/criu.spec
index 89c8f12..5194db2 100644
--- a/criu.spec
+++ b/criu.spec
@@ -1,7 +1,7 @@
 #
 # spec file for package criu
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -27,6 +27,7 @@ Url:            http://criu.org/
 Source0:        http://download.openvz.org/criu/criu-%{package_version}.tar.bz2
 Patch1:         crit-install-prefix.diff
 Patch2:         lsm-prototype-fix.diff
+Patch3:         4c5b23e5-criu.pc.diff
 BuildRequires:  asciidoc
 BuildRequires:  pkg-config
 BuildRequires:  protobuf-c
@@ -68,6 +69,7 @@ to develop applications with CRIU library.
 %setup -q -n %{name}-%{package_version}
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 # fix up the broken protobuf descriptor.proto (comment-in-comment)
 rm -f protobuf/google/protobuf/descriptor.proto
 sed -e's@/\*@@g' -e's@\*/@@g' /usr/include/google/protobuf/descriptor.proto > protobuf/google/protobuf/descriptor.proto