[evolution-kolab/ek-wip-porting: 3/3] build system: fixed installation paths of libs and supplemental files



commit ab730a720b41a33bf6ca158df9e7bfeb9336f3f8
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Fri Feb 3 22:17:31 2012 +0100

    build system: fixed installation paths of libs and supplemental files
    
    * install calendar backend into new (3.x) installation path
    * install book backend into new (3.x) installation path
    * renamed *.eplug file to *.eplug.xml, but continue to install
      it as *.eplug (infrastructure bits taken from evo-mapi)

 configure.ac                                       |   26 +++++++++++++++++--
 eplugin-rule.mk                                    |   11 ++++++++
 src/addressbook/Makefile.am                        |    2 +-
 src/calendar/Makefile.am                           |    2 +-
 src/eplugin/Makefile.am                            |   21 +++++++++-------
 ...gnome-kolab.eplug => org-gnome-kolab.eplug.xml} |    0
 6 files changed, 48 insertions(+), 14 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index de4f9e4..04dd95b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,6 +12,23 @@ m4_define([api_version], [1.2])
 AC_SUBST([API_VERSION],[api_version])
 AC_DEFINE_UNQUOTED(API_VERSION, ["$API_VERSION"], [API version (Major.Minor)])
 
+PKG_PROG_PKG_CONFIG
+
+dnl *******************
+dnl Special directories
+dnl *******************
+plugindir=`$PKG_CONFIG --variable=plugindir evolution-plugin-3.0`
+AC_SUBST(plugindir)
+
+ebook_backenddir=`$PKG_CONFIG --variable=backenddir libedata-book-1.2`
+AC_SUBST(ebook_backenddir)
+
+ecal_backenddir=`$PKG_CONFIG --variable=backenddir libedata-cal-1.2`
+AC_SUBST(ecal_backenddir)
+
+camel_providerdir=`$PKG_CONFIG --variable=camel_providerdir camel-1.2`
+AC_SUBST(camel_providerdir) 
+
 dnl ------------ /upstream -----------
 
 KOLAB_LIB_EKOLABUTIL="\$(top_builddir)/src/libekolabutil/libekolabutil.la"
@@ -26,9 +43,6 @@ AC_SUBST(KOLAB_LIB_EPLUGIN)
 KOLAB_LIB_CAMEL_IMAPX="\$(top_builddir)/src/camel/providers/imapx/libcamelimapx.la"
 AC_SUBST(KOLAB_LIB_CAMEL_IMAPX)
 
-camel_providerdir='${libdir}'/evolution-data-server/camel-providers
-AC_SUBST(camel_providerdir)
-
 KOLAB_LIB_EKOLABCONVEVOLUTION="\$(top_builddir)/src/libekolabconv/main/src/evolution/libekolabconvevolution.la"
 AC_SUBST(KOLAB_LIB_EKOLABCONVEVOLUTION)
 
@@ -140,6 +154,12 @@ fi
 
 AM_CONDITIONAL(ENABLE_LARGEFILE, [test "x$enable_largefile" = "xyes"])
 
+dnl *******************************
+dnl Add evolution plugin rules here
+dnl *******************************
+EVO_PLUGIN_RULE=$srcdir/eplugin-rule.mk
+AC_SUBST_FILE(EVO_PLUGIN_RULE)
+
 dnl ------------ /upstream -----------
 
 
diff --git a/eplugin-rule.mk b/eplugin-rule.mk
new file mode 100644
index 0000000..a98aaf6
--- /dev/null
+++ b/eplugin-rule.mk
@@ -0,0 +1,11 @@
+%.eplug: %.eplug.in
+	sed -e 's|\ PLUGINDIR\@|$(plugindir)|'		\
+	-e 's|\ SOEXT\@|$(SOEXT)|'			\
+	-e 's|\ GETTEXT_PACKAGE\@|$(GETTEXT_PACKAGE)|'	\
+	-e 's|\ LOCALEDIR\@|$(localedir)|' $< > $@
+
+%.eplug.in: %.eplug.xml
+	LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@
+
+%.error: %.error.xml
+	LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@
diff --git a/src/addressbook/Makefile.am b/src/addressbook/Makefile.am
index b70c709..85d951e 100644
--- a/src/addressbook/Makefile.am
+++ b/src/addressbook/Makefile.am
@@ -1,5 +1,5 @@
 
-lib_LTLIBRARIES = \
+ebook_backend_LTLIBRARIES = \
 	libebookbackendkolab.la
 
 libebookbackendkolab_la_SOURCES = \
diff --git a/src/calendar/Makefile.am b/src/calendar/Makefile.am
index 099f07e..defbce1 100644
--- a/src/calendar/Makefile.am
+++ b/src/calendar/Makefile.am
@@ -1,5 +1,5 @@
 
-lib_LTLIBRARIES = \
+ecal_backend_LTLIBRARIES = \
 	libecalbackendkolab.la
 
 libecalbackendkolab_la_SOURCES = \
diff --git a/src/eplugin/Makefile.am b/src/eplugin/Makefile.am
index 37abc9b..8bc38e2 100644
--- a/src/eplugin/Makefile.am
+++ b/src/eplugin/Makefile.am
@@ -1,14 +1,8 @@
+ EVO_PLUGIN_RULE@
 
-eplugin_DATA = \
+plugin_DATA = \
 	org-gnome-kolab.eplug
 
-eplugindir = \
-	$(pkgdatadir)
-
-EXTRA_DIST = \
-	$(eplugin_DATA)\
-	$(noinst_HEADERS)
-
 lib_LTLIBRARIES = \
 	liborg-gnome-kolab.la
 
@@ -54,5 +48,14 @@ noinst_HEADERS = \
 noinstdir = \
 	$(pkgincludedir)
 
-## File created by the gnome-build tools
+EXTRA_DIST = \
+	org-gnome-kolab.eplug.xml \
+	$(noinst_HEADERS)
+
+BUILT_SOURCES = org-gnome-kolab.eplug	
+
+CLEANFILES = $(BUILT_SOURCES)
 
+-include $(top_srcdir)/git.mk
+
+## File created by the gnome-build tools
diff --git a/src/eplugin/org-gnome-kolab.eplug b/src/eplugin/org-gnome-kolab.eplug.xml
similarity index 100%
rename from src/eplugin/org-gnome-kolab.eplug
rename to src/eplugin/org-gnome-kolab.eplug.xml



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]