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