]> git.pld-linux.org Git - packages/glog.git/blob - glog.spec
- release 2
[packages/glog.git] / glog.spec
1 #
2 # Conditional build:
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]
6
7 %ifarch %{ix86} %{x8664} x32 %{arm} hppa ia64 mips ppc ppc64 sh
8 %undefine       with_libunwind
9 %endif
10 Summary:        A C++ application logging library
11 Summary(pl.UTF-8):      Biblioteka do logowania dla aplikacji w C++
12 Name:           glog
13 Version:        0.6.0
14 Release:        2
15 License:        BSD
16 Group:          Libraries
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
25 %if %{with libunwind}
26 BuildRequires:  libunwind-devel
27 %endif
28 BuildRequires:  pkgconfig
29 %if %{with tests}
30 BuildRequires:  gmock-devel >= 1.10.0
31 BuildRequires:  gtest-devel
32 %endif
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
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.
39
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
44
45 %package devel
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
52
53 %description devel
54 This package contains the header files for developing applications
55 that use glog library.
56
57 %description devel -l pl.UTF-8
58 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
59 wykorzystujących bibliotekę glog.
60
61 %package static
62 Summary:        Static glog library
63 Summary(pl.UTF-8):      Statyczna biblioteka glog
64 Group:          Development/Libraries
65 Requires:       %{name}-devel = %{version}-%{release}
66
67 %description static
68 Static glog library.
69
70 %description static -l pl.UTF-8
71 Statyczna biblioteka glog.
72
73 %prep
74 %setup -q
75 %patch0 -p1
76
77 %build
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}
83
84 %{__make} -C build-static
85 %endif
86
87 %cmake -B build \
88         %{!?with_tests:-DWITH_GTEST=OFF} \
89         %{!?with_libunwind:-DWITH_UNWIND=OFF}
90
91 %{__make} -C build
92
93 %if %{with tests}
94 %{__make} -C build test
95 %endif
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99
100 %if %{with static_libs}
101 %{__make} -C build-static install \
102         DESTDIR=$RPM_BUILD_ROOT
103 %endif
104
105 %{__make} -C build install \
106         DESTDIR=$RPM_BUILD_ROOT
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %post   -p /sbin/ldconfig
112 %postun -p /sbin/ldconfig
113
114 %files
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
119
120 %files devel
121 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_libdir}/libglog.so
123 %{_includedir}/glog
124 %{_pkgconfigdir}/libglog.pc
125 %{_libdir}/cmake/glog
126
127 %if %{with static_libs}
128 %files static
129 %defattr(644,root,root,755)
130 %{_libdir}/libglog.a
131 %endif
This page took 0.130977 seconds and 4 git commands to generate.