]> git.pld-linux.org Git - packages/gtest.git/blame - gtest.spec
- added version patch: clean up versioning mess; release 2
[packages/gtest.git] / gtest.spec
CommitLineData
39d078eb
ER
1#
2# Conditional build:
266e8274
JB
3%bcond_without tests # do not perform "make check"
4#
39d078eb 5Summary: Google C++ testing framework
266e8274 6Summary(pl.UTF-8): Szkielet testów w C++ stworzony przez Google
39d078eb 7Name: gtest
d85ab484 8Version: 1.8.1
b0f58fc8 9Release: 2
39d078eb
ER
10License: BSD
11Group: Development/Tools
8154102e 12#Source0Download: https://github.com/google/googletest/releases
a7744370 13Source0: https://github.com/google/googletest/archive/release-%{version}/%{name}-%{version}.tar.gz
d85ab484 14# Source0-md5: 2e6fbeb6a91310a16efe181886c59596
266e8274
JB
15Patch0: %{name}-install.patch
16Patch1: %{name}-link.patch
a7744370 17Patch2: gmock-install.patch
b0f58fc8 18Patch3: %{name}-version.patch
8154102e 19URL: https://github.com/google/googletest
266e8274
JB
20BuildRequires: autoconf >= 2.59
21BuildRequires: automake >= 1:1.9
53098946 22BuildRequires: libstdc++-devel
266e8274
JB
23BuildRequires: libtool >= 2:1.5
24BuildRequires: python >= 2.3
25BuildRequires: python-modules >= 2.3
39d078eb
ER
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28%description
29Google'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
31xUnit architecture. Supports automatic test discovery, a rich set of
32assertions, user-defined assertions, death tests, fatal and non-fatal
33failures, various options for running the tests, and XML test report
34generation.
35
266e8274
JB
36%description -l pl.UTF-8
37Stworzony przez Google szkielet do pisania testów w C++ na różnych
38platformach (GNU/Linux, Mac OS X, Windows, Windows CE, Symbian). Jest
39oparty na architekturze xUnit. Obsługuje automatyczne wykrywanie
40testów, bogaty zbiór zapewnień, zapewnienia zdefiniowane przez
41użytkownika, testy śmierci, niepowodzenia krytyczne i niekrytyczne,
42różne opcje uruchamiania testów oraz tworzenie raportów z testów w
43XML-u.
44
39d078eb 45%package devel
266e8274
JB
46Summary: Development files for gtest framework
47Summary(pl.UTF-8): Pliki programistyczne szkieletu gtest
39d078eb
ER
48Group: Development/Libraries
49Requires: %{name} = %{version}-%{release}
266e8274 50Requires: libstdc++-devel
39d078eb
ER
51
52%description devel
266e8274
JB
53This package contains development files for gtest framework.
54
55%description devel -l pl.UTF-8
56Ten pakiet zawiera pliki programistyczne szkieletu gtest.
57
58%package static
59Summary: Static gtest libraries
60Summary(pl.UTF-8): Statyczne biblioteki gtest
61Group: Development/Libraries
62Requires: %{name}-devel = %{version}-%{release}
63
64%description static
65Static gtest libraries.
66
67%description static -l pl.UTF-8
68Statyczne biblioteki gtest.
39d078eb 69
a7744370
JB
70%package -n gmock-devel
71Summary: Google C++ Mocking Framework
72Summary(pl.UTF-8): Szkielet Google Mock dla C++
73Group: Development/Libraries
74Requires: gtest-devel = %{version}-%{release}
75Requires: libstdc++-devel
76Provides: gmock = %{version}-%{release}
77Obsoletes: gmock < 1.6.0-3
78
79%description -n gmock-devel
80Inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s
81specifics in mind, Google C++ Mocking Framework (or Google Mock for
82short) is a library for writing and using C++ mock classes.
83
84Google Mock:
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
88 expectations,
89- is extensible by users, and
90- works on Linux, Mac OS X, Windows, Windows Mobile, minGW, and
91 Symbian.
92
93%description -n gmock-devel -l pl.UTF-8
94Google C++ Mocking Framework (w skrócie Google Mock) to zainspirowana
95przez jMock, EasyMock i Hamcrest, zaprojektowana z myślą o specyfice
96C++ biblioteka do pisania i wykorzystywania klas "mock" w C++.
97
98Google Mock:
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
105 Symbianie.
106
107
39d078eb 108%prep
a7744370 109%setup -q -n googletest-release-%{version}
b0f58fc8 110%patch3 -p1
a7744370
JB
111
112cd googletest
266e8274
JB
113%patch0 -p1
114%patch1 -p1
39d078eb 115# Keep a clean copy of samples.
33791c58 116cp -a samples examples
39d078eb 117
a7744370
JB
118cd ../googlemock
119%patch2 -p1
120grep -rl bin/env scripts | xargs %{__sed} -i -e '1s,^#!.*python,#!%{__python},'
121
122
39d078eb 123%build
a7744370 124cd googletest
266e8274 125%{__libtoolize}
06fcb16a
ER
126%{__aclocal}
127%{__autoconf}
266e8274 128%{__autoheader}
06fcb16a 129%{__automake}
266e8274 130%configure
39d078eb 131
39d078eb
ER
132%{__make}
133
266e8274 134%{?with_tests:%{__make} check}
39d078eb 135
a7744370
JB
136cd ../googlemock
137%{__libtoolize}
138%{__aclocal}
139%{__autoconf}
140%{__autoheader}
141%{__automake}
142%configure \
143 GTEST_CONFIG=../googletest/scripts/gtest-config \
144 GTEST_CPPFLAGS="-I$PWD/../googletest/include" \
145 GTEST_LDFLAGS="-L$PWD/../googletest/lib/.libs" \
146
147%{__make}
148
39d078eb
ER
149%install
150rm -rf $RPM_BUILD_ROOT
266e8274 151
a7744370
JB
152cd googletest
153%{__make} -j1 install \
39d078eb
ER
154 INSTALL="%{__install} -p" \
155 DESTDIR=$RPM_BUILD_ROOT
156
266e8274 157install -Dp scripts/gtest-config $RPM_BUILD_ROOT%{_bindir}/gtest-config
39d078eb 158
33791c58
ER
159install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
160cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
41c99f3d 161install -d $RPM_BUILD_ROOT%{_prefix}/src/gtest/src
a9213e07 162cp -p src/*.{cc,h} $RPM_BUILD_ROOT%{_prefix}/src/gtest/src
cfcbf919 163cp -pr CMakeLists.txt cmake $RPM_BUILD_ROOT%{_prefix}/src/gtest
39d078eb 164
a7744370
JB
165cd ../googlemock
166%{__make} -j1 install \
167 INSTALL="%{__install} -p" \
168 DESTDIR=$RPM_BUILD_ROOT
169
170%{__rm} $RPM_BUILD_ROOT%{_datadir}/gmock/generator/{README.cppclean,LICENSE,README}
a8131d92
JB
171# gmock CMakeLists.txt expects gtest or ../googletest accessile
172ln -snf ../gtest $RPM_BUILD_ROOT%{_prefix}/src/gmock/gtest
a7744370 173
39d078eb
ER
174%clean
175rm -rf $RPM_BUILD_ROOT
176
177%post -p /sbin/ldconfig
178%postun -p /sbin/ldconfig
179
180%files
181%defattr(644,root,root,755)
a7744370 182%doc googletest/{CHANGES,CONTRIBUTORS,LICENSE,README.md}
39d078eb
ER
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
187
188%files devel
189%defattr(644,root,root,755)
266e8274
JB
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
195%{_includedir}/gtest
196%{_aclocaldir}/gtest.m4
41c99f3d 197%{_prefix}/src/gtest
33791c58 198%{_examplesdir}/%{name}-%{version}
266e8274
JB
199
200%files static
201%defattr(644,root,root,755)
202%{_libdir}/libgtest.a
203%{_libdir}/libgtest_main.a
a7744370
JB
204
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
209%{_includedir}/gmock
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
216%{_prefix}/src/gmock
This page took 0.095675 seconds and 4 git commands to generate.