[libodb-sqlite] Using %{base_version} so it only has to be changed in one place

Dave Johansen daveisfera at fedoraproject.org
Thu Feb 12 04:11:42 UTC 2015


commit 6bd0df5fae5484438e9bc0e9720a1fb18f09b17f
Author: Dave Johansen <davejohansen at gmail.com>
Date:   Wed Feb 11 21:11:31 2015 -0700

    Using %{base_version} so it only has to be changed in one place

 libodb-sqlite.spec |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/libodb-sqlite.spec b/libodb-sqlite.spec
index 1f9cfd5..4e6da97 100644
--- a/libodb-sqlite.spec
+++ b/libodb-sqlite.spec
@@ -1,19 +1,22 @@
+# The base of the version (just major and minor without point)
+%global base_version 2.3
+
 Name:           libodb-sqlite
-Version:        2.3.0
+Version:        %{base_version}.0
 Release:        3%{?dist}
 Summary:        SQLite ODB runtime library from Code Synthesis
 
 Group:          System Environment/Libraries
 License:        GPLv2
 URL:            http://www.codesynthesis.com/products/odb/
-Source0:        http://www.codesynthesis.com/download/odb/2.3/%{name}-%{version}.tar.bz2
+Source0:        http://www.codesynthesis.com/download/odb/%{base_version}/%{name}-%{version}.tar.bz2
 
 # Set BuildRoot for compatibility with EPEL <= 5
 # See: http://fedoraproject.org/wiki/EPEL:Packaging#BuildRoot_tag
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 # Uses libodb from Code Synthesis 
-BuildRequires: libodb-devel >= 2.3.0
+BuildRequires: libodb-devel >= %{base_version}
 # Uses SQLite
 BuildRequires: sqlite-devel
 # Uses pkgconfig
@@ -76,7 +79,7 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %doc GPLv2
 %doc LICENSE
-%{_libdir}/libodb-sqlite-2.3.so
+%{_libdir}/libodb-sqlite-%{base_version}.so
 %exclude %{_datadir}/doc/libodb-sqlite/GPLv2
 %exclude %{_datadir}/doc/libodb-sqlite/LICENSE
 %exclude %{_datadir}/doc/libodb-sqlite/NEWS


More information about the scm-commits mailing list