log4cxx/log4cxx.spec
2011-07-18 07:17:21 +00:00

140 lines
3.6 KiB
RPMSpec

# norootforbuild
%define soname 10
%define jobs $(( `/usr/bin/getconf _NPROCESSORS_ONLN` + 1 ))
Name: log4cxx
Version: 0.10.0.svn20080724
Release: 1.0
License: Apache License v2.0
Group: Development/Libraries/C++
Url: http://logging.apache.org/log4cxx/index.html
Source: apache-log4cxx-%{version}.tar.bz2
Patch0: %{name}-fix_duplicate_entries.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: doxygen gcc-c++ graphviz libapr1-devel libapr-util1-devel unixODBC-devel
%if 0%{?suse_version} > 1030
BuildRequires: libesmtp-devel
%else
BuildRequires: openldap2-devel
%endif
Summary: Log4j like C++ Logging Library
%description
Log4cxx is a port to C++ of the log4j logging library.
The goal is have the same functionalities and interfaces of log4j.
It is built with the following features enabled:
- unicode
- thread: pthread
- XML: libxml2
- ODBC: unixODBC
And for the documentation it is built with:
- doxygen
- dot
- html-docs
- latex-docs
It's a flexible and highly configurable logging framework
Main features :
- Configurable logging destinations (appenders)
- Configurable logging format (layouts)
- Categorized logging statements through a hierarchy (loggers)
- Advanced filtering (filters)
- Thread safe library
- UTF-16 Unicode support
* Appenders:
AsyncAppender, ConsoleAppender, DailyRollingFileAppender,
FileAppender, NTEventLogAppender, ODBCAppender, RollingFileAppender,
SMTPAppender, SocketAppender,
SocketHubAappender, SyslogAppender, TelnetAppender, XMLSocketAppender
* Layouts:
HTMLLayout, PatternLayout, SimpleLayout, TTCCLayout, XMLLayout
* Filters:
DenyAllFilter, LevelMatchFilter, LevelRangeFilter, StringMatchFilter
* Configurators:
BasicConfigurator, DOMConfigurator, PropertyConfigurator
* Java like objects with dynamic cast and instanciation. Custom objects can
be configured through the DOMConfigurator and PropertyConfigurator classes
Supported OS:
* Linux (tested on Linux Mandrake 10.0, Debian GNU/Linux 3.1)
* FreeBSD
* Windows (MSVC 6.0, MSVC 7.1 or Cygwin)
* Other POSIX OS should be supported but were not tested
%package -n liblog4cxx%{soname}
Group: System/Libraries
PreReq: glibc
Summary: Log4j like C++ Logging Library
%description -n liblog4cxx%{soname}
Log4cxx is a port to C++ of the log4j logging library.
%package -n liblog4cxx-devel
Group: Development/Libraries/C++
Requires: liblog4cxx%{soname} = %{version}
Summary: Log4j like C++ Logging Library
%description -n liblog4cxx-devel
Log4cxx is a port to C++ of the log4j logging library.
%prep
%setup -qn apache-log4cxx-%{version}
%patch0 -p1
%build
./autogen.sh
# --enable-latex-docs apparently doesn't do anything
%configure --disable-static \
--with-ODBC=unixODBC \
--with-charset=utf-8 \
--with-logchar=utf-8 \
--enable-wchar_t \
--enable-html-docs \
--enable-dot \
%if 0%{?suse_version} > 1030
--with-SMTP=libesmtp \
%endif
--enable-doxygen
%__make %{?jobs:-j%jobs}
%install
%makeinstall
find %{buildroot}%{_libdir} -name *.la -exec rm {} \;
%__mkdir_p %{buildroot}%{_docdir}/liblog4cxx
%__mv %{buildroot}%{_datadir}/log4cxx %{buildroot}%{_docdir}/liblog4cxx
%post -n liblog4cxx%{soname} -p /sbin/ldconfig
%postun -n liblog4cxx%{soname} -p /sbin/ldconfig
%clean
test "%{buildroot}" != "/" && %__rm -rf %{buildroot}
%files -n liblog4cxx%{soname}
%defattr(-,root,root)
%{_libdir}/liblog4cxx.so.*
%files -n liblog4cxx-devel
%defattr(-,root,root)
%{_libdir}/liblog4cxx.so
%{_libdir}/pkgconfig/liblog4cxx.pc
%{_includedir}/log4cxx
%{_docdir}/liblog4cxx
%changelog
* Wed Apr 22 2009 bitshuffler #suse@irc.freenode.org
- Fixed broken builds