gtest-vl.spec 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. Summary: Google C++ testing framework
  2. Summary(ja): Google C++ テスティングフレームワーク
  3. Name: gtest
  4. Version: 1.8.1
  5. Release: 1%{?_dist_release}
  6. License: New BSD
  7. Group: Development/Tools
  8. URL: https://github.com/google/googletest
  9. Vendor: Project Vine
  10. Distribution: Vine Linux
  11. Source0: https://github.com/google/googletest/archive/release-%{version}.tar.gz
  12. # https://github.com/google/googletest/pull/967
  13. Patch0: gtest-1.8.1-null-pointer.patch
  14. # https://github.com/google/googletest/pull/1839
  15. Patch1: gtest-PR1839-Fix-Python3-support.patch
  16. # Fedora-specific patches
  17. ## Set libversion for libraries to version of gtest
  18. Patch100: gtest-1.8.1-libversion.patch
  19. ## Add missing pkgconfig requires information to reflect reality
  20. Patch101: gtest-1.8.1-add-missing-pkgconfig-requires.patch
  21. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  22. BuildRequires: cmake
  23. BuildRequires: python3-devel
  24. BuildRequires: python3-rpm-macros
  25. %description
  26. Google's framework for writing C++ tests on a variety of platforms (GNU/Linux,
  27. Mac OS X, Windows, Windows CE, and Symbian). Based on the xUnit architecture.
  28. Supports automatic test discovery, a rich set of assertions, user-defined
  29. assertions, death tests, fatal and non-fatal failures, various options for
  30. running the tests, and XML test report generation.
  31. %package devel
  32. Summary: Development files for %{name}
  33. Summary(ja): %{name} の開発ファイル
  34. Group: Development/Libraries
  35. Requires: %{name} = %{version}-%{release}
  36. %description devel
  37. This package contains development files for %{name}.
  38. %package -n gmock
  39. Summary: Google C++ Mocking Framework
  40. Group: Development/Tools
  41. Requires: %{name} = %{version}-%{release}
  42. %description -n gmock
  43. Inspired by jMock, EasyMock, and Hamcrest, and designed with C++s
  44. specifics in mind, Google C++ Mocking Framework (or Google Mock for
  45. short) is a library for writing and using C++ mock classes.
  46. Google Mock:
  47. o lets you create mock classes trivially using simple macros,
  48. o supports a rich set of matchers and actions,
  49. o handles unordered, partially ordered, or completely ordered
  50. expectations,
  51. o is extensible by users, and
  52. o works on Linux, Mac OS X, Windows, Windows Mobile, minGW, and
  53. Symbian.
  54. %package -n gmock-devel
  55. Summary: Development files for gmock
  56. Group: Development/Libraries
  57. Requires: gmock = %{version}-%{release}
  58. %description -n gmock-devel
  59. This package contains development files for gmock.
  60. %prep
  61. %autosetup -p1 -n googletest-release-%{version}
  62. # Set the version correctly
  63. sed -e "s/set(GOOGLETEST_VERSION .*)/set(GOOGLETEST_VERSION %{version})/" -i CMakeLists.txt
  64. %build
  65. mkdir build && cd build
  66. %cmake -DBUILD_SHARED_LIBS=ON \
  67. -DPYTHON_EXECUTABLE=%{__python3} \
  68. -Dgtest_build_tests=ON ..
  69. %make_build
  70. %install
  71. cd build
  72. %make_install
  73. %check
  74. cd build
  75. make test
  76. %clean
  77. rm -rf $RPM_BUILD_ROOT
  78. %post -p /sbin/ldconfig
  79. %postun -p /sbin/ldconfig
  80. %post -n gmock -p /sbin/ldconfig
  81. %postun -n gmock -p /sbin/ldconfig
  82. %files
  83. %defattr(-,root,root,-)
  84. %license googletest/LICENSE
  85. %{_libdir}/libgtest.so.%{version}
  86. %{_libdir}/libgtest_main.so.%{version}
  87. %files devel
  88. %defattr(-,root,root,-)
  89. %doc googletest/{CHANGES,CONTRIBUTORS,README.md}
  90. %doc googletest/docs/
  91. %doc googletest/samples
  92. %{_includedir}/gtest/
  93. %{_libdir}/libgtest.so
  94. %{_libdir}/libgtest_main.so
  95. %{_libdir}/cmake/GTest/
  96. %{_libdir}/pkgconfig/gtest.pc
  97. %{_libdir}/pkgconfig/gtest_main.pc
  98. %files -n gmock
  99. %license googlemock/LICENSE
  100. %{_libdir}/libgmock.so.%{version}
  101. %{_libdir}/libgmock_main.so.%{version}
  102. %files -n gmock-devel
  103. %doc googlemock/{CHANGES,CONTRIBUTORS,README.md}
  104. %doc googlemock/docs/
  105. %{_includedir}/gmock/
  106. %{_libdir}/libgmock.so
  107. %{_libdir}/libgmock_main.so
  108. %{_libdir}/pkgconfig/gmock.pc
  109. %{_libdir}/pkgconfig/gmock_main.pc
  110. %changelog
  111. * Wed Sep 11 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.8.1-1
  112. - new upstream release.
  113. - dropped Patch0.
  114. - imported patches from rawhide.
  115. * Sat Jul 2 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.7.0-2
  116. - rebuilt with new toolchain.
  117. * Tue Jul 01 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-1
  118. - new upstream release
  119. * Sun Apr 29 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.6.0-1
  120. - new upstream release
  121. - changed source archive type to xz
  122. - added Patch0 from Mandriva
  123. * Wed Sep 29 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.5.0-2
  124. - rebuilt with rpm-4.8.1 for pkg-config
  125. * Sun May 23 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.5.0-1
  126. - initial build for VineSeed
  127. * Sat Nov 14 2009 Debarshi Ray <rishi@fedoraproject.org> - 1.4.0-1
  128. - Version bump to 1.4.0.
  129. * New feature: the event listener API.
  130. * New feature: test shuffling.
  131. * New feature: the XML report format is closer to junitreport and can
  132. be parsed by Hudson now.
  133. * New feature: elapsed time for the tests is printed by default.
  134. * New feature: comes with a TR1 tuple implementation such that Boost
  135. is no longer needed for Combine().
  136. * New feature: EXPECT_DEATH_IF_SUPPORTED macro and friends.
  137. * New feature: the Xcode project can now produce static gtest libraries in
  138. addition to a framework.
  139. * Compatibility fixes for gcc and minGW.
  140. * Bug fixes and implementation clean-ups.
  141. * Fri Jul 24 2009 Release Engineering <rel-eng@fedoraproject.org> - 1.3.0-2.20090601svn257
  142. - Autorebuild for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  143. * Mon Jun 01 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.3.0-1
  144. - Version bump to 1.3.0.
  145. * New feature: ability to use Google Test assertions in other testing
  146. frameworks.
  147. * New feature: ability to run disabled test via
  148. --gtest_also_run_disabled_tests.
  149. * New feature: the --help flag for printing the usage.
  150. * New feature: access to Google Test flag values in user code.
  151. * New feature: a script that packs Google Test into one .h and one .cc file
  152. for easy deployment.
  153. * New feature: support for distributing test functions to multiple machines
  154. (requires support from the test runner).
  155. * Bug fixes and implementation clean-ups.
  156. * Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
  157. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  158. * Sat Jul 05 2008 Debarshi Ray <rishi@fedoraproject.org> - 1.0.0-1
  159. - Initial build.