Merge pull request #152 from sergiud/cmake-project-name
[platform/upstream/glog.git] / packages / rpm / rpm.spec
1 %define RELEASE 1
2 %define rel     %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
3 %define prefix  /usr
4
5 Name: %NAME
6 Summary: A C++ application logging library
7 Version: %VERSION
8 Release: %rel
9 Group: Development/Libraries
10 URL: http://github.com/google/glog
11 License: BSD
12 Vendor: Google
13 Packager: Google Inc. <opensource@google.com>
14 Source: https://github.com/google/glog/archive/v%{VERSION}.tar.gz
15 Distribution: Redhat 7 and above.
16 Buildroot: %{_tmppath}/%{name}-root
17 Prefix: %prefix
18
19 %description
20 The %name package contains a library that implements application-level
21 logging.  This library provides logging APIs based on C++-style
22 streams and various helper macros.
23
24 %package devel
25 Summary: A C++ application logging library
26 Group: Development/Libraries
27 Requires: %{NAME} = %{VERSION}
28
29 %description devel
30 The %name-devel package contains static and debug libraries and header
31 files for developing applications that use the %name package.
32
33 %changelog
34     * Wed Mar 26 2008 <opensource@google.com>
35     - First draft
36
37 %prep
38 %setup
39
40 %build
41 ./configure
42 make prefix=%prefix
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 make prefix=$RPM_BUILD_ROOT%{prefix} install
47
48 %clean
49 rm -rf $RPM_BUILD_ROOT
50
51 %files
52 %defattr(-,root,root)
53
54 ## Mark all installed files within /usr/share/doc/{package name} as
55 ## documentation.  This depends on the following two lines appearing in
56 ## Makefile.am:
57 ##     docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
58 ##     dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README
59 %docdir %{prefix}/share/doc/%{NAME}-%{VERSION}
60 %{prefix}/share/doc/%{NAME}-%{VERSION}/*
61
62 %{prefix}/lib/libglog.so.0
63 %{prefix}/lib/libglog.so.0.0.0
64
65 %files devel
66 %defattr(-,root,root)
67
68 %{prefix}/include/glog
69 %{prefix}/lib/libglog.a
70 %{prefix}/lib/libglog.la
71 %{prefix}/lib/libglog.so
72 %{prefix}/lib/pkgconfig/libglog.pc