File log4cpp.spec of Package log4cpp

# spec file for package log4cpp
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           log4cpp
Version:        1.1.1
Release:        0
License:        LGPL-2.1
Summary:        Log for C++
Group:          Development/Languages/C and C++
Source:         %{name}-%{version}.tar.gz
BuildRequires:  doxygen
BuildRequires:  gcc-c++
BuildRequires:  pkg-config
%if 0%{?suse_version}
BuildRequires:  fdupes
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Log for C++ is a library of classes for flexible logging to files, syslog,
and other destinations. It is modeled after the Log for Java library and
stays as close to its API as is reasonable.

%package -n liblog4cpp5
Summary:        Logging for C++
Group:          Development/Libraries/C and C++

%description -n liblog4cpp5
Logging facilities providing library.

%package devel
Summary:        Development tools for Log for C++
Group:          Development/Libraries/C and C++
Requires:       liblog4cpp5 = %{version}

%description devel
The %{name}-devel package contains the static libraries and header files
needed for development with %{name}.

%package doc
Summary:        HTML formatted API documention for Log for C++
Group:          Development/Libraries/C and C++

%description doc
The %{name}-doc package contains HTML formatted API documention generated by
the popular doxygen documentation generation tool.

%setup -q -n %{name}

%configure --enable-doxygen
%{__make} %{?_smp_mflags}

%makeinstall mandir=%{buildroot}/%{_mandir} docdir=%{buildroot}/%{_docdir}/%{name}
%{__rm} -rf %{buildroot}/%{_libdir}/*.la

%if 0%{?suse_version}
%fdupes -s %{buildroot}/%{_docdir}/%{name}/api


%{__rm} -rf %{buildroot}

%post -n liblog4cpp5 -p /sbin/ldconfig
%postun -n liblog4cpp5 -p /sbin/ldconfig

%files -n liblog4cpp5

%files devel
# WTF?
%dir %{_datadir}/aclocal
%attr(644,root,root) %{_datadir}/aclocal/*.m4

%files doc
%doc %{_docdir}/%{name}