From 3c25678387209684f614a827a2a923828357136a Mon Sep 17 00:00:00 2001
From: Christophe Dumez <christophe.dumez@intel.com>
Date: Tue, 14 Jun 2011 20:30:37 +0300
Subject: [PATCH] Add libekcal.pc pkgconfig file

Application developers can simply add the following lines to their
project file:

 CONFIG += link_pkgconfig
 PKGCONFIG += libekcal

Then include the libekcal header as follows:

 #include <ekcal/ekcal-storage.h>
---
 Makefile.am    |    4 ++++
 configure.ac   |    2 +-
 libekcal.pc.in |   10 ++++++++++
 3 files changed, 15 insertions(+), 1 deletions(-)
 create mode 100644 libekcal.pc.in

diff --git a/Makefile.am b/Makefile.am
index 64e3ab8..e4a1a7c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,9 @@
 SUBDIRS = src test
 ACLOCAL_AMFLAGS = -I m4 -I m4-repo
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libekcal.pc
+
 # DOXYGEN SUPPORT
 include $(top_srcdir)/aminclude.am
 # ensure the distribution of the doxygen configuration file
@@ -10,3 +13,4 @@ dist_html_DATA = doc/html/*
 doc/html/*: doxygen-doc
 
 MOSTLYCLEANFILES = $(DX_CLEANFILES)
+
diff --git a/configure.ac b/configure.ac
index 49f13e2..abee511 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,5 +36,5 @@ AT_WITH_QT([-gui],
            []) # extra vars, for example: MOBILITY += contacts versit"
 
 AC_CONFIG_HEADERS(config.h)
-AC_CONFIG_FILES(Makefile src/Makefile test/Makefile)
+AC_CONFIG_FILES(Makefile libekcal.pc src/Makefile test/Makefile)
 AC_OUTPUT
diff --git a/libekcal.pc.in b/libekcal.pc.in
new file mode 100644
index 0000000..1babedd
--- /dev/null
+++ b/libekcal.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libekcal
+Description: EDS calendar storage for KCalCore
+Version: @VERSION@
+Requires: QtCore QtGui uuid libkcalcoren libecal-1.2 >= 2.30 libedataserver-1.2 >= 2.30 libical >= 0.44 glib-2.0
+Libs: -L${libdir} -lekcal
-- 
1.7.4.4

