Bump to 1.12.1
[platform/upstream/gtest.git] / packaging / gtest.spec
1 Name:       gtest
2 Summary:    Google C++ Testing Framework
3 Version:    1.12.1
4 Release:    0
5
6 # ==========================================================
7 License:    BSD-3-Clause
8 # ==========================================================
9
10 Group:      Definition/Libraries/C and C++
11 Source0:    %{name}-%{version}.tar.gz
12 Source1:    Fix-build-error-at-cmake.patch
13 Source1001: %{name}.manifest
14
15 # ==========================================================
16 # BuildRequires
17 # specifies build-time dependencies for the package
18 # ==========================================================
19 BuildRequires:  cmake
20 Provides:   libgtest_main.so.0 libgtest.so.0
21 Provides:   libgmock_main.so.0 libgmock.so.0
22
23 %description
24 Google's framework for writing C++ tests on a variety of platforms (Linux, Mac
25 OS X, Windows, Cygwin, Windows CE, and Symbian). Based on the xUnit
26 architecture. Supports automatic test discovery, a rich set of assertions,
27 user-defined assertions, death tests, fatal and non-fatal failures, value- and
28 type-parameterized tests, various options for running the tests, and XML test
29 report generation.
30
31
32 %package devel
33 Summary:    Google C++ Testing Framework
34 Requires:   %{name} = %{version}
35
36 %description devel
37 Google C++ Testing Framework
38
39
40 %prep
41 %setup -q
42 cp %{SOURCE1001} .
43 %{__patch} -p1 < %{SOURCE1}
44
45 # ==========================================================
46 # build section
47 # how to actually build the software we are packaging
48 # ==========================================================
49 %build
50 mkdir -p build
51 pushd build
52 %{cmake} ..
53 %{__make} %{?_smp_mflags}
54 popd
55
56
57 # ==========================================================
58 # install section
59 # how to actually build the software we are packaging
60 # ==========================================================
61 %install
62 pushd build
63 %{make_install}
64 popd
65
66 rm -f %{buildroot}/%{_includedir}/gmock/internal/custom/README.md
67 rm -f %{buildroot}/%{_includedir}/gtest/internal/custom/README.md
68
69 %clean
70
71 %post -p /sbin/ldconfig
72
73 %postun -p /sbin/ldconfig
74
75 # ==========================================================
76 # files section
77 # The list of files that will be installed in the end
78 # user’s system.
79 # ==========================================================
80 %files
81 %manifest %{name}.manifest
82 %license LICENSE
83 %{_libdir}/*.so.*
84 %{_libdir}/*.so
85
86 %files devel
87 %manifest %{name}.manifest
88 %license LICENSE
89 %{_libdir}/pkgconfig/gtest_main.pc
90 %{_libdir}/pkgconfig/gtest.pc
91 %{_libdir}/pkgconfig/gmock_main.pc
92 %{_libdir}/pkgconfig/gmock.pc
93 %{_includedir}/gmock/*.h
94 %{_includedir}/gmock/internal/*.h
95 %{_includedir}/gmock/internal/custom/*.h
96 %{_includedir}/gtest/*.h
97 %{_includedir}/gtest/internal/*.h
98 %{_includedir}/gtest/internal/custom/*.h
99 %{_libdir}/cmake/GTest/*.cmake