3 %bcond_without libunwind # libunwind support
4 %bcond_without static_libs # static library
5 %bcond_without tests # gtest/gmock based tests [recheck: signalhandler_unittest broken on x32 as of 0.4.0]
7 %ifarch %{ix86} %{x8664} x32 %{arm} hppa ia64 mips ppc ppc64 sh
8 %undefine with_libunwind
10 Summary: A C++ application logging library
11 Summary(pl.UTF-8): Biblioteka do logowania dla aplikacji w C++
17 #Source0Download: https://github.com/google/glog/releases
18 Source0: https://github.com/google/glog/archive/v%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5: c98a6068bc9b8ad9cebaca625ca73aa2
20 Patch0: avoid-inline-asm.patch
21 URL: https://github.com/google/glog
22 BuildRequires: cmake >= 3.16
23 BuildRequires: gflags-devel >= 2.2.2
24 BuildRequires: libstdc++-devel
26 BuildRequires: libunwind-devel
28 BuildRequires: pkgconfig
30 BuildRequires: gmock-devel >= 1.10.0
31 BuildRequires: gtest-devel
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 Google glog is a library that implements application-level logging.
37 This library provides logging APIs based on C++-style streams and
38 various helper macros.
40 %description -l pl.UTF-8
41 Google glog to biblioteka implementująca logowanie na poziomie
42 aplikacji. Zapewnia API do logowania oparte na strumieniach w stylu
43 C++ oraz różne makra pomocnicze
46 Summary: Development files for glog library
47 Summary(pl.UTF-8): Pliki programistyczne biblioteki glog
48 Group: Development/Libraries
49 Requires: %{name} = %{version}-%{release}
50 Requires: gflags-devel >= 2.2.2
51 Requires: libstdc++-devel
54 This package contains the header files for developing applications
55 that use glog library.
57 %description devel -l pl.UTF-8
58 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
59 wykorzystujących bibliotekę glog.
62 Summary: Static glog library
63 Summary(pl.UTF-8): Statyczna biblioteka glog
64 Group: Development/Libraries
65 Requires: %{name}-devel = %{version}-%{release}
70 %description static -l pl.UTF-8
71 Statyczna biblioteka glog.
78 %if %{with static_libs}
79 %cmake -B build-static \
80 -DBUILD_SHARED_LIBS=OFF \
81 %{!?with_tests:-DWITH_GTEST=OFF} \
82 %{!?with_libunwind:-DWITH_UNWIND=OFF}
84 %{__make} -C build-static
88 %{!?with_tests:-DWITH_GTEST=OFF} \
89 %{!?with_libunwind:-DWITH_UNWIND=OFF}
94 %{__make} -C build test
98 rm -rf $RPM_BUILD_ROOT
100 %if %{with static_libs}
101 %{__make} -C build-static install \
102 DESTDIR=$RPM_BUILD_ROOT
105 %{__make} -C build install \
106 DESTDIR=$RPM_BUILD_ROOT
109 rm -rf $RPM_BUILD_ROOT
111 %post -p /sbin/ldconfig
112 %postun -p /sbin/ldconfig
115 %defattr(644,root,root,755)
116 %doc AUTHORS COPYING ChangeLog README.rst
117 %attr(755,root,root) %{_libdir}/libglog.so.*.*.*
118 %attr(755,root,root) %ghost %{_libdir}/libglog.so.1
121 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_libdir}/libglog.so
124 %{_pkgconfigdir}/libglog.pc
125 %{_libdir}/cmake/glog
127 %if %{with static_libs}
129 %defattr(644,root,root,755)