[odb] Adding support for when the gcc plugin directory is used
Dave Johansen
daveisfera at fedoraproject.org
Tue Jan 21 03:14:47 UTC 2014
commit 1a522f18572f36401d36119d72186e2db168c0d3
Author: Dave Johansen <davejohansen at gmail.com>
Date: Mon Jan 20 20:13:29 2014 -0700
Adding support for when the gcc plugin directory is used
odb.spec | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/odb.spec b/odb.spec
index 59a55f5..d294768 100644
--- a/odb.spec
+++ b/odb.spec
@@ -32,6 +32,16 @@ BuildRequires: libcutl-devel >= 1.8.0
BuildRequires: pkgconfig
+# If building on Fedora or RHEL 7
+%if 0%{?rhel}%{?fedora} >= 7
+ #Then odb uses the gcc plugin directory
+ %define ODB_PLUGIN_DIR %(g++ -print-file-name=plugin)
+%else
+ # Otherwise, it just uses the system directory
+ %define ODB_PLUGIN_DIR %{_libexecdir}/odb/
+%endif
+
+
%description
ODB is an object-relational mapping (ORM) system for C++. It provides
tools, APIs, and library support that allow you to persist C++ objects
@@ -92,7 +102,7 @@ rm -rf $RPM_BUILD_ROOT
%doc doc/odb-manual.ps
%doc doc/odb.xhtml
%{_bindir}/odb
-%{_libexecdir}/odb/
+%{ODB_PLUGIN_DIR}
%{_mandir}/man1/odb.1.gz
# Exclude the documentation that doesn't need to be packaged
%exclude %{_datadir}/doc/odb/GPLv3
More information about the scm-commits
mailing list