File log4c.spec of Package log4c

#
# spec file for package log4c
#
# Copyright (c) 2012 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/
#
# icecream 0


Name:           log4c
BuildRequires:  doxygen
BuildRequires:  gcc-c++
BuildRequires:  libexpat-devel
BuildRequires:  texlive-latex
%if %suse_version > 1220
BuildRequires:  texlive-courier
BuildRequires:  texlive-dvips
BuildRequires:  texlive-ec
BuildRequires:  texlive-helvetic
BuildRequires:  texlive-makeindex
BuildRequires:  texlive-times
BuildRequires:  tex(amssymb.sty)
BuildRequires:  tex(colortbl.sty)
BuildRequires:  tex(fancyhdr.sty)
BuildRequires:  tex(float.sty)
BuildRequires:  tex(mathptmx.sty)
BuildRequires:  tex(multirow.sty)
BuildRequires:  tex(natbib.sty)
BuildRequires:  tex(sectsty.sty)
BuildRequires:  tex(tocloft.sty)
BuildRequires:  tex(xtab.sty)
%endif
# graphiz
%if %{suse_version} < 1030
BuildRequires:  graphviz
%else
BuildRequires:  graphviz-gd
%endif
Version:        1.2.1
Release:        0
Summary:        A library of C for flexible logging to files, syslog and other destinations
License:        LGPL-2.1+
Group:          System/Libraries
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

%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
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
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
Summary:        Documentation for log4c
Group:          Development/Languages/C and C++
Requires:       glibc-devel
Requires:       liblog4c3 = %{version}

%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

%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
%{_mandir}/man?/log4c*

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

%changelog
openSUSE Build Service is sponsored by