File liblog4cpp4.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 http://bugs.opensuse.org/
#

%define origname log4cpp

Name:           liblog4cpp4
Version:        1.0
Release:        0
License:        LGPL
Summary:        Log for C++
Url:            http://log4cpp.sourceforge.net/
Group:          Development/Languages/C and C++
Source:         %{origname}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM log4cpp_inclusion_fixes.patch
Patch0:         log4cpp_inclusion_fixes.patch
BuildRequires:  doxygen
BuildRequires:  gcc-c++
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
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     log4cpp-devel
Summary:        Development tools for Log for C++
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

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

%package -n     log4cpp-doc
Summary:        HTML formatted API documention for Log for C++
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

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

%prep
%setup -q -n %{origname}-%{version}
%patch0 -p1

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

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

%clean
%{__rm} -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,755)
%doc AUTHORS COPYING INSTALL NEWS README THANKS ChangeLog
%attr(755,root,root) %{_libdir}/lib*.so.*

%files -n log4cpp-devel
%defattr(-,root,root,755)
%{_includedir}/*
%{_mandir}/man*/*
%attr(755,root,root) %{_bindir}/log4cpp-config
%attr(755,root,root) %{_libdir}/lib*.so
%attr(644,root,root) %{_libdir}/*.*a
%attr(644,root,root) %{_libdir}/pkgconfig/log4cpp.pc
%attr(644,root,root) %{_datadir}/aclocal/*.m4

%files -n log4cpp-doc
%defattr(-,root,root)
%doc %{_docdir}/%{name}

%changelog
openSUSE Build Service is sponsored by