File log4c.spec of Package log4c

#
# spec file for package log4c (Version 1.2.1)
#
# Copyright (c) 2010 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/
#

# norootforbuild
# icecream 0


Name:           log4c
BuildRequires:  doxygen gcc-c++ libexpat-devel texlive-latex
# graphiz
%if %{suse_version} < 1030
BuildRequires:  graphviz
%else
BuildRequires:  graphviz-gd
%endif
License:        LGPLv2.1+
Group:          System/Libraries
Version:        1.2.1
Release:        13
Summary:        A library of C for flexible logging to files, syslog and other destinations
Url:            http://log4c.sourceforge.net/
Source0:        http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
Source1:        baselibs.conf
Patch0:         log4c-fix-m4-quoting.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define debug_package_requires liblog4c3 = %{version}-%{release}

%description
Log4c is a library of C for flexible logging to files, syslog and other
destinations. It is modeled after the Log for Java library
(http://jakarta.apache.org/log4j/), staying as close to their API as is
reasonable.

%package -n liblog4c3
License:        LGPLv2.1+
Summary:        A library of C for flexible logging to files, syslog and other destinations
Group:          System/Libraries

%description -n liblog4c3
Log4c is a library of C for flexible logging to files, syslog and other
destinations. It is modeled after the Log for Java library
(http://jakarta.apache.org/log4j/), staying as close to their API as is
reasonable.

%package -n liblog4c-devel
License:        LGPLv2.1+
Summary:        Development files for log4c
Group:          Development/Libraries/C and C++
Requires:       liblog4c3 = %{version}

%description -n liblog4c-devel
The liblog4c-devel package contains the static libraries and header
files needed for development with log4c.

%package -n liblog4c-doc
License:        LGPLv2.1+
Summary:        Documentation for log4c
Group:          Development/Languages/C and C++
Requires:       liblog4c3 = %{version} glibc-devel

%description -n liblog4c-doc
The liblog4c-doc package contains the log4c documentation.

%prep
%setup -q
%patch0 -p1

%build
%configure --disable-static --with-pic                  \
    --enable-test           \
    --enable-doc            \
    --enable-debug
%{__make} -j1 # parallel make is broken

%install
%makeinstall
%__rm %{buildroot}%{_libdir}/liblog4c.la
%__rm -rf %{buildroot}%{_datadir}/doc/log4c-1.2.1/

%post -n liblog4c3 -p /sbin/ldconfig

%postun -n liblog4c3 -p /sbin/ldconfig

%clean
%__rm -rf %{buildroot}

%files -n liblog4c3
%defattr(-,root,root)
%doc ChangeLog COPYING AUTHORS README
%{_sysconfdir}/log4c*
%{_libdir}/liblog4c.so.*

%files -n liblog4c-devel
%defattr(-,root,root)
%{_bindir}/log4c-config
%{_includedir}/log4c.h
%{_includedir}/log4c
%{_libdir}/liblog4c.so
%{_datadir}/aclocal/log4c.m4
%{_mandir}/man?/log4c*

%files -n liblog4c-doc
%defattr(-,root,root)
%doc doc/%{name}.pdf doc/html

%changelog
openSUSE Build Service is sponsored by