]> git.pld-linux.org Git - packages/gtest.git/blob - gtest.spec
f7a41084aba82ced0f5faefb1a8e4de0e304873e
[packages/gtest.git] / gtest.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make check"
4 #
5 Summary:        Google C++ testing framework
6 Summary(pl.UTF-8):      Szkielet testów w C++ stworzony przez Google
7 Name:           gtest
8 Version:        1.8.1
9 Release:        1
10 License:        BSD
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 URL:            https://github.com/google/googletest
19 BuildRequires:  autoconf >= 2.59
20 BuildRequires:  automake >= 1:1.9
21 BuildRequires:  libstdc++-devel
22 BuildRequires:  libtool >= 2:1.5
23 BuildRequires:  python >= 2.3
24 BuildRequires:  python-modules >= 2.3
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 Google's framework for writing C++ tests on a variety of platforms
29 (GNU/Linux, Mac OS X, Windows, Windows CE, and Symbian). Based on the
30 xUnit architecture. Supports automatic test discovery, a rich set of
31 assertions, user-defined assertions, death tests, fatal and non-fatal
32 failures, various options for running the tests, and XML test report
33 generation.
34
35 %description -l pl.UTF-8
36 Stworzony przez Google szkielet do pisania testów w C++ na różnych
37 platformach (GNU/Linux, Mac OS X, Windows, Windows CE, Symbian). Jest
38 oparty na architekturze xUnit. Obsługuje automatyczne wykrywanie
39 testów, bogaty zbiór zapewnień, zapewnienia zdefiniowane przez
40 użytkownika, testy śmierci, niepowodzenia krytyczne i niekrytyczne,
41 różne opcje uruchamiania testów oraz tworzenie raportów z testów w
42 XML-u.
43
44 %package devel
45 Summary:        Development files for gtest framework
46 Summary(pl.UTF-8):      Pliki programistyczne szkieletu gtest
47 Group:          Development/Libraries
48 Requires:       %{name} = %{version}-%{release}
49 Requires:       libstdc++-devel
50
51 %description devel
52 This package contains development files for gtest framework.
53
54 %description devel -l pl.UTF-8
55 Ten pakiet zawiera pliki programistyczne szkieletu gtest.
56
57 %package static
58 Summary:        Static gtest libraries
59 Summary(pl.UTF-8):      Statyczne biblioteki gtest
60 Group:          Development/Libraries
61 Requires:       %{name}-devel = %{version}-%{release}
62
63 %description static
64 Static gtest libraries.
65
66 %description static -l pl.UTF-8
67 Statyczne biblioteki gtest.
68
69 %package -n gmock-devel
70 Summary:        Google C++ Mocking Framework
71 Summary(pl.UTF-8):      Szkielet Google Mock dla C++
72 Group:          Development/Libraries
73 Requires:       gtest-devel = %{version}-%{release}
74 Requires:       libstdc++-devel
75 Provides:       gmock = %{version}-%{release}
76 Obsoletes:      gmock < 1.6.0-3
77
78 %description -n gmock-devel
79 Inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s
80 specifics in mind, Google C++ Mocking Framework (or Google Mock for
81 short) is a library for writing and using C++ mock classes.
82
83 Google Mock:
84 - lets you create mock classes trivially using simple macros,
85 - supports a rich set of matchers and actions,
86 - handles unordered, partially ordered, or completely ordered
87   expectations,
88 - is extensible by users, and
89 - works on Linux, Mac OS X, Windows, Windows Mobile, minGW, and
90   Symbian.
91
92 %description -n gmock-devel -l pl.UTF-8
93 Google C++ Mocking Framework (w skrócie Google Mock) to zainspirowana
94 przez jMock, EasyMock i Hamcrest, zaprojektowana z myślą o specyfice
95 C++ biblioteka do pisania i wykorzystywania klas "mock" w C++.
96
97 Google Mock:
98 - pozwala tworzyć klasy "mock" w sposób trywialny przy użyciu makr;
99 - obsługuje bogaty zbiór dopasowań i akcji;
100 - obsługuje oczekiwania nieuporządkowane, częściowo uporządkowane
101   lub w pełni uporządkowane;
102 - jest rozszerzalna dla użytkownika;
103 - działa na Linuksie, Mac OS X, Windows, Windows Mobile, minGW oraz
104   Symbianie.
105
106
107 %prep
108 %setup -q -n googletest-release-%{version}
109
110 cd googletest
111 %patch0 -p1
112 %patch1 -p1
113 # Keep a clean copy of samples.
114 cp -a samples examples
115
116 cd ../googlemock
117 %patch2 -p1
118 grep -rl bin/env scripts | xargs %{__sed} -i -e '1s,^#!.*python,#!%{__python},'
119
120
121 %build
122 cd googletest
123 %{__libtoolize}
124 %{__aclocal}
125 %{__autoconf}
126 %{__autoheader}
127 %{__automake}
128 %configure
129
130 %{__make}
131
132 %{?with_tests:%{__make} check}
133
134 cd ../googlemock
135 %{__libtoolize}
136 %{__aclocal}
137 %{__autoconf}
138 %{__autoheader}
139 %{__automake}
140 %configure \
141         GTEST_CONFIG=../googletest/scripts/gtest-config \
142         GTEST_CPPFLAGS="-I$PWD/../googletest/include" \
143         GTEST_LDFLAGS="-L$PWD/../googletest/lib/.libs" \
144
145 %{__make}
146
147 %install
148 rm -rf $RPM_BUILD_ROOT
149
150 cd googletest
151 %{__make} -j1 install \
152         INSTALL="%{__install} -p" \
153         DESTDIR=$RPM_BUILD_ROOT
154
155 install -Dp scripts/gtest-config $RPM_BUILD_ROOT%{_bindir}/gtest-config
156
157 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
158 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
159 install -d $RPM_BUILD_ROOT%{_prefix}/src/gtest/src
160 cp -p src/*.{cc,h} $RPM_BUILD_ROOT%{_prefix}/src/gtest/src
161 cp -pr CMakeLists.txt cmake $RPM_BUILD_ROOT%{_prefix}/src/gtest
162
163 cd ../googlemock
164 %{__make} -j1 install \
165         INSTALL="%{__install} -p" \
166         DESTDIR=$RPM_BUILD_ROOT
167
168 %{__rm} $RPM_BUILD_ROOT%{_datadir}/gmock/generator/{README.cppclean,LICENSE,README}
169 # gmock CMakeLists.txt expects gtest or ../googletest accessile
170 ln -snf ../gtest $RPM_BUILD_ROOT%{_prefix}/src/gmock/gtest
171
172 %clean
173 rm -rf $RPM_BUILD_ROOT
174
175 %post   -p /sbin/ldconfig
176 %postun -p /sbin/ldconfig
177
178 %files
179 %defattr(644,root,root,755)
180 %doc googletest/{CHANGES,CONTRIBUTORS,LICENSE,README.md}
181 %attr(755,root,root) %{_libdir}/libgtest.so.*.*.*
182 %attr(755,root,root) %ghost %{_libdir}/libgtest.so.0
183 %attr(755,root,root) %{_libdir}/libgtest_main.so.*.*.*
184 %attr(755,root,root) %ghost %{_libdir}/libgtest_main.so.0
185
186 %files devel
187 %defattr(644,root,root,755)
188 %attr(755,root,root) %{_bindir}/gtest-config
189 %attr(755,root,root) %{_libdir}/libgtest.so
190 %attr(755,root,root) %{_libdir}/libgtest_main.so
191 %{_libdir}/libgtest.la
192 %{_libdir}/libgtest_main.la
193 %{_includedir}/gtest
194 %{_aclocaldir}/gtest.m4
195 %{_prefix}/src/gtest
196 %{_examplesdir}/%{name}-%{version}
197
198 %files static
199 %defattr(644,root,root,755)
200 %{_libdir}/libgtest.a
201 %{_libdir}/libgtest_main.a
202
203 %files -n gmock-devel
204 %defattr(644,root,root,755)
205 %doc googlemock/{CHANGES,CONTRIBUTORS,LICENSE,README.md}
206 %attr(755,root,root) %{_bindir}/gmock-config
207 %{_includedir}/gmock
208 %{_npkgconfigdir}/gmock.pc
209 %dir %{_datadir}/gmock
210 %dir %{_datadir}/gmock/generator
211 %attr(755,root,root) %{_datadir}/gmock/generator/gmock_gen.py
212 %dir %{_datadir}/gmock/generator/cpp
213 %attr(755,root,root) %{_datadir}/gmock/generator/cpp/*.py
214 %{_prefix}/src/gmock
This page took 0.077696 seconds and 2 git commands to generate.