gflags/gflags.spec

114 lines
3.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package gflags
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: gflags
Accepting request 825199 from home:elimat:branches:devel:libraries:c_c++ - Update to version 2.2.2 * Fixed 267: Support build with GCC option "-fvisibility=hidden". * Fixed 262: Declare FALGS_no##name variables as static to avoid "previous extern" warning. * Fixed 261: Declare FlagRegisterer c’tor explicit template instanations as extern in header * Fixed 257: Build with _UNICODE support on Windows. * Fixed 233/234/235: Move CMake defines that are unused by Bazel to separate header; makes config.h private again * Fixed 228: Build with recent MinGW versions that define setenv. * Fixed 226: Remove obsolete and unused CleanFileName code * Merged 266: Various PVS Studio and GCC warnings. * Merged 258: Fix build with some Clang variants that define "restrict" macro. * Merged 252: Update documentation on how to use Bazel. * Merged 249: Use "_debug" postfix for debug libraries. * Merged 247: CMake "project" VERSION; no enable_testing(); "gflags::" import target prefix. * Merged 246: Add Bazel-on-Windows support. * Merged 239: Use GFLAGS_NAMESPACE instead of "gflags" in test executable. * Merged 237: Removed unused functions; fixes compilation with -Werror compiler option. * Merged 232: Fix typo in Bazel's BUILD definition * Merged 230: Remove using ::fLS::clstring. * Merged 221: Add convenience 'uninstall' target - Run spec-cleaner * Remove package groups * Use make macros OBS-URL: https://build.opensuse.org/request/show/825199 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gflags?expand=0&rev=7
2020-08-19 10:58:23 +02:00
Version: 2.2.2
Release: 0
Summary: Library for commandline flag processing
License: BSD-3-Clause
URL: https://github.com/gflags/gflags
Source0: https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig
Requires: libgflags2_2 = %{version}
%description
The gflags package contains a library that implements commandline
flags processing. As such, it is a replacement for getopt(). It has
increased flexibility, including built-in support for C++ types like
string, and the ability to define flags in the source file in which
they're used.
%package -n libgflags2_2
Summary: Library for commandline flag processing
Conflicts: libgflags2
%description -n libgflags2_2
The gflags package contains a library that implements commandline
flags processing. As such, it is a replacement for getopt(). It has
increased flexibility, including built-in support for C++ types like
string, and the ability to define flags in the source file in which
they're used.
%package devel
Summary: Development files for gflags library
Requires: libgflags2_2 = %{version}
%description devel
This package contains headers and build system meta files.
%package devel-static
Summary: Statically linked development libraries for gflags
Requires: %{name}-devel = %{version}
%description devel-static
This package contains the static libraries for gflags.
%prep
%autosetup
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
CFLAGS="%{optflags} -pthread"
CXXFLAGS="%{optflags} -pthread"
export CFLAGS CXXFLAGS
%cmake \
-DBUILD_STATIC_LIBS:BOOL=ON \
-DBUILD_TESTING:BOOL=ON \
-DCMAKE_BUILD_TYPE=Release
Accepting request 825199 from home:elimat:branches:devel:libraries:c_c++ - Update to version 2.2.2 * Fixed 267: Support build with GCC option "-fvisibility=hidden". * Fixed 262: Declare FALGS_no##name variables as static to avoid "previous extern" warning. * Fixed 261: Declare FlagRegisterer c’tor explicit template instanations as extern in header * Fixed 257: Build with _UNICODE support on Windows. * Fixed 233/234/235: Move CMake defines that are unused by Bazel to separate header; makes config.h private again * Fixed 228: Build with recent MinGW versions that define setenv. * Fixed 226: Remove obsolete and unused CleanFileName code * Merged 266: Various PVS Studio and GCC warnings. * Merged 258: Fix build with some Clang variants that define "restrict" macro. * Merged 252: Update documentation on how to use Bazel. * Merged 249: Use "_debug" postfix for debug libraries. * Merged 247: CMake "project" VERSION; no enable_testing(); "gflags::" import target prefix. * Merged 246: Add Bazel-on-Windows support. * Merged 239: Use GFLAGS_NAMESPACE instead of "gflags" in test executable. * Merged 237: Removed unused functions; fixes compilation with -Werror compiler option. * Merged 232: Fix typo in Bazel's BUILD definition * Merged 230: Remove using ::fLS::clstring. * Merged 221: Add convenience 'uninstall' target - Run spec-cleaner * Remove package groups * Use make macros OBS-URL: https://build.opensuse.org/request/show/825199 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gflags?expand=0&rev=7
2020-08-19 10:58:23 +02:00
%make_build
%install
%cmake_install
# Installs a file on $HOME, remove it
rm -rf %{buildroot}/home/
%check
export LD_LIBRARY_PATH=`pwd`/build/lib
%ctest
%post -n libgflags2_2 -p /sbin/ldconfig
%postun -n libgflags2_2 -p /sbin/ldconfig
%files
%license COPYING.txt
%doc AUTHORS.txt ChangeLog.txt README.md
%{_bindir}/%{name}_completions.sh
%files -n libgflags2_2
%license COPYING.txt
%{_libdir}/libgflags.so.*
%{_libdir}/libgflags_nothreads.so.*
%files devel
%{_includedir}/%{name}/
%{_libdir}/libgflags.so
%{_libdir}/libgflags_nothreads.so
%{_libdir}/cmake/%{name}/
%{_libdir}/pkgconfig/%{name}.pc
%files devel-static
%{_libdir}/libgflags.a
%{_libdir}/libgflags_nothreads.a
%changelog