]>
Commit | Line | Data |
---|---|---|
7c1add51 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # gtest/gmock based tests | |
c1854bdb | 4 | |
58b4ba18 | 5 | Summary: A C++ application logging library |
74c045b0 | 6 | Summary(pl.UTF-8): Biblioteka do logowania dla aplikacji w C++ |
58b4ba18 | 7 | Name: glog |
47930f1c ER |
8 | Version: 0.3.4 |
9 | Release: 1 | |
58b4ba18 ER |
10 | License: BSD |
11 | Group: Libraries | |
47930f1c ER |
12 | Source0: https://github.com/google/glog/archive/v%{version}/%{name}-%{version}.tar.gz |
13 | # Source0-md5: df92e05c9d02504fb96674bc776a41cb | |
7c1add51 | 14 | Patch0: %{name}-gflags.patch |
c1854bdb | 15 | Patch1: avoid-inline-asm.patch |
47930f1c | 16 | URL: https://github.com/google/glog |
74c045b0 JB |
17 | BuildRequires: autoconf >= 2.57 |
18 | BuildRequires: automake | |
19 | BuildRequires: gflags-devel | |
47930f1c ER |
20 | BuildRequires: libstdc++-devel |
21 | BuildRequires: libtool >= 2:1.5 | |
22 | BuildRequires: pkgconfig | |
7c1add51 JB |
23 | %if %{with tests} |
24 | BuildRequires: gmock-devel | |
25 | BuildRequires: gtest-devel | |
26 | %endif | |
c1854bdb | 27 | %ifarch %{ix86} %{x8664} arm hppa ia64 mips ppc ppc64 sh |
74c045b0 | 28 | BuildRequires: libunwind-devel |
c1854bdb | 29 | %endif |
58b4ba18 ER |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
33 | Google glog is a library that implements application-level logging. | |
34 | This library provides logging APIs based on C++-style streams and | |
35 | various helper macros. | |
36 | ||
74c045b0 JB |
37 | %description -l pl.UTF-8 |
38 | Google glog to biblioteka implementująca logowanie na poziomie | |
39 | aplikacji. Zapewnia API do logowania oparte na strumieniach w stylu | |
40 | C++ oraz różne makra pomocnicze | |
41 | ||
58b4ba18 | 42 | %package devel |
74c045b0 JB |
43 | Summary: Development files for glog library |
44 | Summary(pl.UTF-8): Pliki programistyczne biblioteki glog | |
58b4ba18 ER |
45 | Group: Development/Libraries |
46 | Requires: %{name} = %{version}-%{release} | |
74c045b0 JB |
47 | Requires: gflags-devel |
48 | Requires: libstdc++-devel | |
58b4ba18 ER |
49 | |
50 | %description devel | |
74c045b0 JB |
51 | This package contains the header files for developing applications |
52 | that use glog library. | |
53 | ||
54 | %description devel -l pl.UTF-8 | |
55 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
56 | wykorzystujących bibliotekę glog. | |
57 | ||
58 | %package static | |
59 | Summary: Static glog library | |
60 | Summary(pl.UTF-8): Statyczna biblioteka glog | |
61 | Group: Development/Libraries | |
62 | Requires: %{name}-devel = %{version}-%{release} | |
63 | ||
64 | %description static | |
65 | Static glog library. | |
66 | ||
67 | %description static -l pl.UTF-8 | |
68 | Statyczna biblioteka glog. | |
58b4ba18 ER |
69 | |
70 | %prep | |
71 | %setup -q | |
7c1add51 | 72 | %patch0 -p1 |
c1854bdb | 73 | %patch1 -p1 |
58b4ba18 ER |
74 | |
75 | %build | |
7c1add51 JB |
76 | %if %{with tests} |
77 | install -d gmock | |
78 | cd gmock | |
79 | %cmake $(pkg-config --variable=srcdir gmock) \ | |
80 | -DBUILD_SHARED_LIBS=OFF | |
81 | %{__make} | |
82 | cd .. | |
83 | LDFLAGS="%{rpmldflags} -L$(pwd)/gmock" | |
84 | %endif | |
74c045b0 JB |
85 | %{__libtoolize} |
86 | %{__aclocal} -I m4 | |
58b4ba18 | 87 | %{__autoconf} |
74c045b0 JB |
88 | %{__autoheader} |
89 | %{__automake} | |
90 | %configure | |
58b4ba18 ER |
91 | |
92 | %{__make} | |
93 | ||
7c1add51 JB |
94 | %if %{with tests} |
95 | %{__make} check | |
96 | %endif | |
97 | ||
58b4ba18 ER |
98 | %install |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | %{__make} install \ | |
101 | DESTDIR=$RPM_BUILD_ROOT | |
102 | ||
103 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libglog.la | |
104 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
105 | ||
106 | %clean | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
109 | %post -p /sbin/ldconfig | |
110 | %postun -p /sbin/ldconfig | |
111 | ||
112 | %files | |
113 | %defattr(644,root,root,755) | |
74c045b0 | 114 | %doc AUTHORS COPYING ChangeLog README |
58b4ba18 | 115 | %attr(755,root,root) %{_libdir}/libglog.so.*.*.* |
74c045b0 | 116 | %attr(755,root,root) %ghost %{_libdir}/libglog.so.0 |
58b4ba18 ER |
117 | |
118 | %files devel | |
119 | %defattr(644,root,root,755) | |
120 | %doc doc/designstyle.css doc/glog.html | |
74c045b0 JB |
121 | %attr(755,root,root) %{_libdir}/libglog.so |
122 | %{_includedir}/glog | |
58b4ba18 | 123 | %{_pkgconfigdir}/libglog.pc |
74c045b0 JB |
124 | |
125 | %files static | |
126 | %defattr(644,root,root,755) | |
127 | %{_libdir}/libglog.a |