86 lines
2.7 KiB
RPMSpec
86 lines
2.7 KiB
RPMSpec
Name: gtest
|
|
Version: 1.8.1
|
|
Release: 4
|
|
Summary: Google C++ testing framework
|
|
License: BSD and ASL 2.0
|
|
URL: https://github.com/google/googletest
|
|
Source0: https://github.com/google/googletest/archive/release-%{version}.tar.gz
|
|
Patch0000: gtest-1.8.1-null-pointer.patch
|
|
Patch0001: gtest-PR1839-Fix-Python3-support.patch
|
|
Patch0002: gtest-1.8.1-libversion.patch
|
|
Patch0003: gtest-1.8.1-add-missing-pkgconfig-requires.patch
|
|
Patch0004: 0001-Googletest-export.patch
|
|
BuildRequires: gcc-c++ cmake python3-devel
|
|
%description
|
|
This package is Google C++ testing framework,It can be compiled for
|
|
a variety of platforms.Google Test is a unit testing library for
|
|
the C++ programming language, based on the xUnit architecture,
|
|
allowing unit-testing of C sources as well as C++ with minimal source modification.
|
|
|
|
%package -n gtest-devel
|
|
Summary: Gtest development files
|
|
Requires: gtest = %{version}-%{release}
|
|
%description -n gtest-devel
|
|
This package is libraries and head files for google testing framework.
|
|
|
|
%package -n gmock
|
|
Summary: Google framework for writing and using C++ mock classes
|
|
Requires: gtest = %{version}-%{release}
|
|
%description -n gmock
|
|
The package is Google's framework for writing and using C++ mock classes.
|
|
It can help you derive better designs of your system and write better tests.
|
|
Gmock is a suite of testing tools developed by Google.
|
|
It is often used in combination with GTest.
|
|
|
|
%package -n gmock-devel
|
|
Summary: Gmock development files
|
|
Requires: gmock = %{version}-%{release}
|
|
%description -n gmock-devel
|
|
The package is libraries and head files for google mocking framework.
|
|
|
|
%prep
|
|
%autosetup -p1 -n googletest-release-%{version}
|
|
sed -e "s/set(GOOGLETEST_VERSION .*)/set(GOOGLETEST_VERSION %{version})/" -i CMakeLists.txt
|
|
|
|
|
|
%build
|
|
mkdir build && cd build
|
|
%cmake -DBUILD_SHARED_LIBS=ON -DPYTHON_EXECUTABLE=%{__python3} -Dgtest_build_tests=ON ..
|
|
%make_build
|
|
|
|
%install
|
|
cd build
|
|
%make_install
|
|
|
|
%check
|
|
cd build
|
|
make test
|
|
|
|
%files
|
|
%license googletest/LICENSE
|
|
%{_libdir}/libgtest*.%{version}
|
|
|
|
%files -n gtest-devel
|
|
%doc googletest/{CHANGES,CONTRIBUTORS,README.md,docs,samples}
|
|
%{_includedir}/gtest/
|
|
%{_libdir}/libgtest*.so
|
|
%{_libdir}/cmake/GTest/
|
|
%{_libdir}/pkgconfig/gtest*
|
|
|
|
%files -n gmock
|
|
%license googlemock/LICENSE
|
|
%{_libdir}/libgmock*.%{version}
|
|
|
|
%files -n gmock-devel
|
|
%doc googlemock/{CHANGES,CONTRIBUTORS,README.md,docs}
|
|
%{_includedir}/gmock/
|
|
%{_libdir}/libgmock*.so
|
|
%{_libdir}/pkgconfig/gmock*
|
|
|
|
%changelog
|
|
* Tue Jan 18 2023 xingxing<xingxing@xfusion.com> - 1.8.1-4
|
|
- Internal Change
|
|
|
|
* Wed Nov 27 2019 zhujunhao <zhujunhao5@huawei.com> - 1.8.1-3
|
|
- Package init
|