diff --git a/gflags-0001-Set-VERSION-property-of-library-targets-to-major.patch b/gflags-0001-Set-VERSION-property-of-library-targets-to-major.patch new file mode 100644 index 0000000..a204d8b --- /dev/null +++ b/gflags-0001-Set-VERSION-property-of-library-targets-to-major.patch @@ -0,0 +1,35 @@ +From bf889786c2a3a2dab89610d0722634d2eedfc694 Mon Sep 17 00:00:00 2001 +From: Andreas Schuh +Date: Thu, 1 May 2014 20:16:16 +0100 +Subject: [PATCH] Set VERSION property of library targets to .. + +--- + CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a4d0f07..7f65563 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,6 +22,8 @@ version_numbers ( + PACKAGE_VERSION_PATCH + ) + ++set (PACKAGE_SOVERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}") ++ + # ---------------------------------------------------------------------------- + # options + set (GFLAGS_NAMESPACE "${PACKAGE_NAME}" CACHE STRING "C++ namespace identifier of gflags library.") +@@ -257,6 +259,9 @@ foreach (TYPE IN ITEMS STATIC SHARED) + set_target_properties ( + gflags${opts}-${type} PROPERTIES COMPILE_DEFINITIONS "${defines}" + OUTPUT_NAME "gflags${opts}" ++ # Set VERSION instead of SOVERSION such ++ # that it is also used on Windows ++ VERSION "${PACKAGE_SOVERSION}" + ) + if (HAVE_SHLWAPI_H) + target_link_libraries (gflags${opts}-${type} shlwapi.lib) +-- +1.9.0 + diff --git a/gflags.spec b/gflags.spec index afe807b..f132039 100644 --- a/gflags.spec +++ b/gflags.spec @@ -2,7 +2,7 @@ Name: gflags Version: 2.1.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library for commandline flag processing Group: Development/Tools @@ -10,6 +10,7 @@ License: BSD URL: http://code.google.com/p/%{name} Source0: http://github.com/schuhschuh/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Patch0: gflags-0001-cmake-append-LIB_SUFFIX-to-LIBRARY_INSTALL_DIR.patch +Patch1: gflags-0001-Set-VERSION-property-of-library-targets-to-major.patch BuildRequires: python-setuptools-devel BuildRequires: cmake @@ -32,6 +33,7 @@ This package contains development files for %{name}. %prep %setup -q %patch0 -p1 -b .lib_suffix +%patch1 -p1 -b .lib_version %build %cmake -DBUILD_TESTING:BOOL=ON . @@ -50,17 +52,22 @@ ctest %files %doc ChangeLog.txt README.txt COPYING.txt AUTHORS.txt %{_bindir}/gflags_completions.sh -%{_libdir}/libgflags.so -%{_libdir}/libgflags_nothreads.so +%{_libdir}/libgflags.so.* +%{_libdir}/libgflags_nothreads.so.* %files devel %doc doc/designstyle.css doc/gflags.html %dir %{_includedir}/%{name} %{_includedir}/%{name}/*.h +%{_libdir}/libgflags.so +%{_libdir}/libgflags_nothreads.so %dir %{_libdir}/cmake %{_libdir}/cmake/%{name} %changelog +* Thu May 01 2014 ivaxer@gmail.com - 2.1.1-3 +- Add patch (from upstream) for shared library versining. + * Wed Apr 30 2014 John Khvatov - 2.1.1-2 - Enable test suite - Update SourceURL (upstream moved to github)