File mingw64-googletest.spec of Package mingw64-googletest

#
# spec file for package mingw64-googletest
#
# Copyright (c) 2025, Martin Hauke <mardnh@gmx.de>
#
# 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 http://bugs.opensuse.org/
#

%define realname googletest
Name:           mingw64-%{realname}
Version:        1.16.0
Release:        0
Summary:        Google C++ Testing Framework
License:        BSD-3-Clause
Group:          Development/Libraries/C and C++
URL:            https://github.com/google/googletest
Source0:        https://github.com/google/googletest/archive/refs/tags/v%{version}.tar.gz#/%{realname}-%{version}.tar.gz
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-gcc-c++
%_mingw64_package_header_debug
BuildArch:      noarch

%description
Google's framework for writing C++ tests on a variety of platforms
(Linux, Mac OS X, Windows, Cygwin, Windows CE, and Symbian).
Based on the xUnit architecture. Supports automatic test discovery,
a rich set of assertions, user-defined assertions, death tests,
fatal and non-fatal failures, value- and type-parameterized tests,
various options for running the tests, and XML test report generation.

%package -n     mingw64-gtest
Summary:        Development files for the Google C++ Testing Framework
Group:          Development/Libraries/C and C++
Provides:       %{name}-devel = %{version}

%description -n mingw64-gtest
Google's framework for writing C++ tests on a variety of platforms
(Linux, Mac OS X, Windows, Cygwin, Windows CE, and Symbian).
Based on the xUnit architecture. Supports automatic test discovery,
a rich set of assertions, user-defined assertions, death tests,
fatal and non-fatal failures, value- and type-parameterized tests,
various options for running the tests, and XML test report generation.

This package provides shared libraries and header files for development
with googletest.

%package -n     mingw64-gmock
Summary:        Development files for the Google C++ Mocking Framework
Group:          Development/Libraries/C and C++
Provides:       mingw64-googlemock-devel

%description -n mingw64-gmock
Inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s specifics in
mind, Google C++ Mocking Framework (or Google Mock for short) is a library for
writing and using C++ mock classes.

This package provides shared libraries and header files for development
with googlemock.


%_mingw64_debug_package

%prep
%autosetup -p1 -n %{realname}-%{version}

%build
%{_mingw64_cmake}
%{_mingw64_cmake_build}

%install
%{_mingw64_cmake_install}

%files -n mingw64-gtest
%license LICENSE
%doc README.md
%{_mingw64_includedir}/gtest
%{_mingw64_bindir}/libgtest.dll
%{_mingw64_bindir}/libgtest_main.dll
%{_mingw64_libdir}/libgtest.dll.a
%{_mingw64_libdir}/libgtest_main.dll.a
%{_mingw64_libdir}/pkgconfig/gtest*.pc

%files -n mingw64-gmock
%license LICENSE
%doc README.md
%{_mingw64_includedir}/gmock
%{_mingw64_bindir}/libgmock.dll
%{_mingw64_bindir}/libgmock_main.dll
%{_mingw64_libdir}/libgmock.dll.a
%{_mingw64_libdir}/libgmock_main.dll.a
%{_mingw64_libdir}/pkgconfig/gmock*.pc
%{_mingw64_libdir}/cmake/GTest

%changelog
openSUSE Build Service is sponsored by