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