summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-05-12 19:45:45 +0100
committerRichard Hughes <richard@hughsie.com>2015-05-12 19:45:48 +0100
commit8bac1fcbe127db2bb2c3e32403ba1c8fd06cb473 (patch)
treeecf8f74a530ea585fca4250f00dc0b278738981e
parent6a27bb88ead9f9696c6e2964ca523ce55ab1e205 (diff)
downloadappstream-glib-8bac1fcbe127db2bb2c3e32403ba1c8fd06cb473.tar.gz
Version the builder plugin location
This ensures we can run the correct plugins when different builder versions are installed on the same system.
-rw-r--r--configure.ac6
-rw-r--r--contrib/libappstream-glib.spec.in7
-rw-r--r--libappstream-builder/Makefile.am2
-rw-r--r--libappstream-builder/plugins/Makefile.am2
4 files changed, 13 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index f93bbb2..d8f8a68 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,6 +24,12 @@ AC_SUBST(AS_MINOR_VERSION)
AC_SUBST(AS_MICRO_VERSION)
AC_SUBST(AS_VERSION)
+# this refers to the plugin API version
+# this is not in any way related to a package or soname version
+AS_PLUGIN_VERSION=2
+AC_SUBST(AS_PLUGIN_VERSION)
+AC_DEFINE_UNQUOTED([AS_PLUGIN_VERSION], "$AS_PLUGIN_VERSION", [plugin API version])
+
# enable nice build output on automake1.11
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
diff --git a/contrib/libappstream-glib.spec.in b/contrib/libappstream-glib.spec.in
index 94d1196..7247f6f 100644
--- a/contrib/libappstream-glib.spec.in
+++ b/contrib/libappstream-glib.spec.in
@@ -37,6 +37,9 @@ BuildRequires: docbook-style-xsl
Obsoletes: appdata-tools < 0.1.9
Provides: appdata-tools
+# this is not a library version
+%define as_plugin_version 2
+
%description
This library provides GObjects and helper methods to make it easy to read and
write AppStream metadata. It also provides a simple DOM implementation that
@@ -83,7 +86,7 @@ make install DESTDIR=$RPM_BUILD_ROOT
%__rm -f %{buildroot}%{_libdir}/libappstream-glib*.la
%__rm -f %{buildroot}%{_libdir}/libappstream-builder*.la
-%__rm -f %{buildroot}%{_libdir}/asb-plugins/*.la
+%__rm -f %{buildroot}%{_libdir}/asb-plugins-%{as_plugin_version}/*.la
%find_lang appstream-glib
@@ -117,7 +120,7 @@ make install DESTDIR=$RPM_BUILD_ROOT
%doc COPYING
%{_bindir}/appstream-builder
%{_datadir}/bash-completion/completions/appstream-builder
-%{_libdir}/asb-plugins/*.so
+%{_libdir}/asb-plugins-%{as_plugin_version}/*.so
%{_libdir}/libappstream-builder.so.7*
%{_mandir}/man1/appstream-builder.1.gz
diff --git a/libappstream-builder/Makefile.am b/libappstream-builder/Makefile.am
index 82a8b6b..4264820 100644
--- a/libappstream-builder/Makefile.am
+++ b/libappstream-builder/Makefile.am
@@ -24,7 +24,7 @@ AM_CPPFLAGS = \
-DAS_COMPILATION \
-DTESTDIRSRC=\""$(top_srcdir)/data/tests"\" \
-DTESTDIRBUILD=\""$(top_builddir)/data/tests"\" \
- -DASB_PLUGIN_DIR=\"$(libdir)/asb-plugins\" \
+ -DASB_PLUGIN_DIR=\"$(libdir)/asb-plugins-$(AS_PLUGIN_VERSION)\" \
-DG_LOG_DOMAIN=\"Asb\"
AS_GLIB_LIBS = \
diff --git a/libappstream-builder/plugins/Makefile.am b/libappstream-builder/plugins/Makefile.am
index 71bc44b..f697631 100644
--- a/libappstream-builder/plugins/Makefile.am
+++ b/libappstream-builder/plugins/Makefile.am
@@ -13,7 +13,7 @@ AM_CPPFLAGS = \
-I$(top_builddir)/libappstream-builder \
-DG_LOG_DOMAIN=\"Asb\"
-plugindir = $(libdir)/asb-plugins
+plugindir = $(libdir)/asb-plugins-$(AS_PLUGIN_VERSION)
plugin_LTLIBRARIES = \
libasb_plugin_absorb.la \
libasb_plugin_appdata.la \