Browse code

Add gmock, gtest packages.

Change-Id: I6513ff977203c39910d4eb8bce34cae6cae11d19
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2369
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>

Vinay Kulkarni authored on 2017/04/12 02:32:56
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,66 @@
0
+Summary:	Google's C++ gmock framework
1
+Name:		gmock
2
+Version:	1.8.0
3
+Release:	1%{?dist}
4
+License:	ASL 2.0
5
+URL:		https://github.com/google/googletest
6
+Source0:	https://github.com/google/googletest/archive/googletest-%{version}.tar.gz
7
+%define sha1 googletest=e7e646a6204638fe8e87e165292b8dd9cd4c36ed
8
+Group:		Development/Tools
9
+Vendor:		VMware, Inc.
10
+Distribution: 	Photon
11
+BuildRequires:  autoconf
12
+BuildRequires:  automake
13
+BuildRequires:  cmake
14
+BuildRequires:  make
15
+BuildRequires:  gcc
16
+
17
+%description
18
+Google's C++ test framework that combines the GoogleTest and GoogleMock projects. This package provides gmock shared libraries.
19
+
20
+%package devel
21
+Summary:        libgmock headers
22
+Group:          Development/Tools
23
+%description devel
24
+This contains libgmock header files.
25
+
26
+%package static
27
+Summary:        libgmock static lib
28
+Group:          Development/Tools
29
+%description static
30
+This contains libgmock static library.
31
+
32
+%prep
33
+%setup -n googletest-release-%{version}
34
+
35
+%build
36
+cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DBUILD_SHARED_LIBS=OFF .
37
+make
38
+cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DBUILD_SHARED_LIBS=ON .
39
+make
40
+
41
+%install
42
+make DESTDIR=%{buildroot} install
43
+rm -rf %{buildroot}/%{_includedir}/gtest
44
+rm -f %{buildroot}/%{_libdir}/libgtest*
45
+install -p -m 644 -t %{buildroot}/usr/lib googlemock/libgmock.a
46
+install -p -m 644 -t %{buildroot}/usr/lib googlemock/libgmock_main.a
47
+find %{buildroot} -name '*.la' -delete
48
+
49
+%files
50
+%defattr(-,root,root)
51
+%{_libdir}/libgmock.so
52
+%{_libdir}/libgmock_main.so
53
+
54
+%files devel
55
+%defattr(-,root,root)
56
+%{_includedir}/gmock/*
57
+
58
+%files static
59
+%defattr(-,root,root)
60
+%{_libdir}/libgmock.a
61
+%{_libdir}/libgmock_main.a
62
+
63
+%changelog
64
+*    Mon Apr 10 2017 Vinay Kulkarni <kulkarniv@vmware.com> 1.8.0-1
65
+-    Initial version of libgmock package for Photon.
0 66
new file mode 100644
... ...
@@ -0,0 +1,66 @@
0
+Summary:	Google's C++ gtest framework
1
+Name:		gtest
2
+Version:	1.8.0
3
+Release:	1%{?dist}
4
+License:	ASL 2.0
5
+URL:		https://github.com/google/googletest
6
+Source0:	https://github.com/google/googletest/archive/googletest-%{version}.tar.gz
7
+%define sha1 googletest=e7e646a6204638fe8e87e165292b8dd9cd4c36ed
8
+Group:		Development/Tools
9
+Vendor:		VMware, Inc.
10
+Distribution: 	Photon
11
+BuildRequires:  autoconf
12
+BuildRequires:  automake
13
+BuildRequires:  cmake
14
+BuildRequires:  make
15
+BuildRequires:  gcc
16
+
17
+%description
18
+Google's C++ test framework that combines the GoogleTest and GoogleMock projects. This package provides gtest shared libraries.
19
+
20
+%package devel
21
+Summary:        libgtest headers
22
+Group:          Development/Tools
23
+%description devel
24
+This contains libgtest header files.
25
+
26
+%package static
27
+Summary:        libgtest static lib
28
+Group:          Development/Tools
29
+%description static
30
+This contains libgtest static library.
31
+
32
+%prep
33
+%setup -n googletest-release-%{version}
34
+
35
+%build
36
+cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DBUILD_SHARED_LIBS=OFF .
37
+make
38
+cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DBUILD_SHARED_LIBS=ON .
39
+make
40
+
41
+%install
42
+make DESTDIR=%{buildroot} install
43
+rm -rf %{buildroot}/%{_includedir}/gmock
44
+rm -f %{buildroot}/%{_libdir}/libgmock*
45
+install -p -m 644 -t %{buildroot}/usr/lib googlemock/gtest/libgtest.a
46
+install -p -m 644 -t %{buildroot}/usr/lib googlemock/gtest/libgtest_main.a
47
+find %{buildroot} -name '*.la' -delete
48
+
49
+%files
50
+%defattr(-,root,root)
51
+%{_libdir}/libgtest.so
52
+%{_libdir}/libgtest_main.so
53
+
54
+%files devel
55
+%defattr(-,root,root)
56
+%{_includedir}/gtest/*
57
+
58
+%files static
59
+%defattr(-,root,root)
60
+%{_libdir}/libgtest.a
61
+%{_libdir}/libgtest_main.a
62
+
63
+%changelog
64
+*    Mon Apr 10 2017 Vinay Kulkarni <kulkarniv@vmware.com> 1.8.0-1
65
+-    Initial version of libgtest package for Photon.