3 %bcond_without tests # do not perform "make check"
5 Summary: Google C++ testing framework
6 Summary(pl.UTF-8): Szkielet testów w C++ stworzony przez Google
11 Group: Development/Tools
12 #Source0Download: https://github.com/google/googletest/releases
13 Source0: https://github.com/google/googletest/archive/release-%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5: 2e6fbeb6a91310a16efe181886c59596
15 Patch0: %{name}-install.patch
16 Patch1: %{name}-link.patch
17 Patch2: gmock-install.patch
18 Patch3: %{name}-version.patch
19 URL: https://github.com/google/googletest
20 BuildRequires: autoconf >= 2.59
21 BuildRequires: automake >= 1:1.9
22 BuildRequires: libstdc++-devel
23 BuildRequires: libtool >= 2:1.5
24 BuildRequires: python >= 2.3
25 BuildRequires: python-modules >= 2.3
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Google's framework for writing C++ tests on a variety of platforms
30 (GNU/Linux, Mac OS X, Windows, Windows CE, and Symbian). Based on the
31 xUnit architecture. Supports automatic test discovery, a rich set of
32 assertions, user-defined assertions, death tests, fatal and non-fatal
33 failures, various options for running the tests, and XML test report
36 %description -l pl.UTF-8
37 Stworzony przez Google szkielet do pisania testów w C++ na różnych
38 platformach (GNU/Linux, Mac OS X, Windows, Windows CE, Symbian). Jest
39 oparty na architekturze xUnit. Obsługuje automatyczne wykrywanie
40 testów, bogaty zbiór zapewnień, zapewnienia zdefiniowane przez
41 użytkownika, testy śmierci, niepowodzenia krytyczne i niekrytyczne,
42 różne opcje uruchamiania testów oraz tworzenie raportów z testów w
46 Summary: Development files for gtest framework
47 Summary(pl.UTF-8): Pliki programistyczne szkieletu gtest
48 Group: Development/Libraries
49 Requires: %{name} = %{version}-%{release}
50 Requires: libstdc++-devel
53 This package contains development files for gtest framework.
55 %description devel -l pl.UTF-8
56 Ten pakiet zawiera pliki programistyczne szkieletu gtest.
59 Summary: Static gtest libraries
60 Summary(pl.UTF-8): Statyczne biblioteki gtest
61 Group: Development/Libraries
62 Requires: %{name}-devel = %{version}-%{release}
65 Static gtest libraries.
67 %description static -l pl.UTF-8
68 Statyczne biblioteki gtest.
70 %package -n gmock-devel
71 Summary: Google C++ Mocking Framework
72 Summary(pl.UTF-8): Szkielet Google Mock dla C++
73 Group: Development/Libraries
74 Requires: gtest-devel = %{version}-%{release}
75 Requires: libstdc++-devel
76 Provides: gmock = %{version}-%{release}
77 Obsoletes: gmock < 1.6.0-3
79 %description -n gmock-devel
80 Inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s
81 specifics in mind, Google C++ Mocking Framework (or Google Mock for
82 short) is a library for writing and using C++ mock classes.
85 - lets you create mock classes trivially using simple macros,
86 - supports a rich set of matchers and actions,
87 - handles unordered, partially ordered, or completely ordered
89 - is extensible by users, and
90 - works on Linux, Mac OS X, Windows, Windows Mobile, minGW, and
93 %description -n gmock-devel -l pl.UTF-8
94 Google C++ Mocking Framework (w skrócie Google Mock) to zainspirowana
95 przez jMock, EasyMock i Hamcrest, zaprojektowana z myślą o specyfice
96 C++ biblioteka do pisania i wykorzystywania klas "mock" w C++.
99 - pozwala tworzyć klasy "mock" w sposób trywialny przy użyciu makr;
100 - obsługuje bogaty zbiór dopasowań i akcji;
101 - obsługuje oczekiwania nieuporządkowane, częściowo uporządkowane
102 lub w pełni uporządkowane;
103 - jest rozszerzalna dla użytkownika;
104 - działa na Linuksie, Mac OS X, Windows, Windows Mobile, minGW oraz
109 %setup -q -n googletest-release-%{version}
115 # Keep a clean copy of samples.
116 cp -a samples examples
120 grep -rl bin/env scripts | xargs %{__sed} -i -e '1s,^#!.*python,#!%{__python},'
134 %{?with_tests:%{__make} check}
143 GTEST_CONFIG=../googletest/scripts/gtest-config \
144 GTEST_CPPFLAGS="-I$PWD/../googletest/include" \
145 GTEST_LDFLAGS="-L$PWD/../googletest/lib/.libs" \
150 rm -rf $RPM_BUILD_ROOT
153 %{__make} -j1 install \
154 INSTALL="%{__install} -p" \
155 DESTDIR=$RPM_BUILD_ROOT
157 install -Dp scripts/gtest-config $RPM_BUILD_ROOT%{_bindir}/gtest-config
159 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
160 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
161 install -d $RPM_BUILD_ROOT%{_prefix}/src/gtest/src
162 cp -p src/*.{cc,h} $RPM_BUILD_ROOT%{_prefix}/src/gtest/src
163 cp -pr CMakeLists.txt cmake $RPM_BUILD_ROOT%{_prefix}/src/gtest
166 %{__make} -j1 install \
167 INSTALL="%{__install} -p" \
168 DESTDIR=$RPM_BUILD_ROOT
170 %{__rm} $RPM_BUILD_ROOT%{_datadir}/gmock/generator/{README.cppclean,LICENSE,README}
171 # gmock CMakeLists.txt expects gtest or ../googletest accessile
172 ln -snf ../gtest $RPM_BUILD_ROOT%{_prefix}/src/gmock/gtest
175 rm -rf $RPM_BUILD_ROOT
177 %post -p /sbin/ldconfig
178 %postun -p /sbin/ldconfig
181 %defattr(644,root,root,755)
182 %doc googletest/{CHANGES,CONTRIBUTORS,LICENSE,README.md}
183 %attr(755,root,root) %{_libdir}/libgtest.so.*.*.*
184 %attr(755,root,root) %ghost %{_libdir}/libgtest.so.0
185 %attr(755,root,root) %{_libdir}/libgtest_main.so.*.*.*
186 %attr(755,root,root) %ghost %{_libdir}/libgtest_main.so.0
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{_bindir}/gtest-config
191 %attr(755,root,root) %{_libdir}/libgtest.so
192 %attr(755,root,root) %{_libdir}/libgtest_main.so
193 %{_libdir}/libgtest.la
194 %{_libdir}/libgtest_main.la
196 %{_aclocaldir}/gtest.m4
198 %{_examplesdir}/%{name}-%{version}
201 %defattr(644,root,root,755)
202 %{_libdir}/libgtest.a
203 %{_libdir}/libgtest_main.a
205 %files -n gmock-devel
206 %defattr(644,root,root,755)
207 %doc googlemock/{CHANGES,CONTRIBUTORS,LICENSE,README.md}
208 %attr(755,root,root) %{_bindir}/gmock-config
210 %{_npkgconfigdir}/gmock.pc
211 %dir %{_datadir}/gmock
212 %dir %{_datadir}/gmock/generator
213 %attr(755,root,root) %{_datadir}/gmock/generator/gmock_gen.py
214 %dir %{_datadir}/gmock/generator/cpp
215 %attr(755,root,root) %{_datadir}/gmock/generator/cpp/*.py