150 lines
4.1 KiB
RPMSpec
150 lines
4.1 KiB
RPMSpec
# norootforbuild
|
|
BuildRequires: libesmtp-devel gcc-c++ doxygen graphviz
|
|
BuildRequires: libapr1-devel libapr-util1-devel unixODBC-devel libxml2-devel
|
|
%if 0%{?suse_version} >= 1030
|
|
BuildRequires: texlive-bin-latex cppunit-devel unixODBC-devel libxml2-devel freefont
|
|
BuildRequires: openldap2-devel
|
|
%else
|
|
BuildRequires: te_latex cppunit-devel unixODBC-devel libxml2-devel freefont
|
|
%endif
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
|
Group: Development/Libraries/C++
|
|
License: http://www.apache.org/licenses/LICENSE-2.0.txt
|
|
Name: apache-log4cxx
|
|
Packager: marc@waeckerlin.org
|
|
Prefix: /usr
|
|
Release: 1
|
|
Source0: %{name}-%{version}.tar.bz2
|
|
Summary: log4j like C++ logging library
|
|
Version: 0.10.0.svn20080724
|
|
|
|
%description
|
|
Log4cxx is a port to C++ of the log4j.
|
|
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
|
|
|
|
%prep
|
|
%setup -q
|
|
./autogen.sh
|
|
CPPFLAGS="-DSQL_WCHART_CONVERT" \
|
|
./configure --prefix=/usr \
|
|
%if 0%{?suse_version} >= 1020
|
|
--docdir=/usr/share/doc/packages/log4cxx \
|
|
%else
|
|
%if 0%{?fedora_version}
|
|
--docdir=/usr/share/doc/packages/log4cxx \
|
|
%endif
|
|
%endif
|
|
%ifarch x86_64
|
|
--libdir=/usr/lib64 \
|
|
%else
|
|
--libdir=/usr/lib \
|
|
%endif
|
|
%if 0%{?suse_version} < 1100
|
|
%else
|
|
--with-SMTP=libesmtp \
|
|
%endif
|
|
--with-ODBC=unixODBC --with-charset=utf-8 \
|
|
--with-logchar=utf-8 --enable-wchar_t \
|
|
--enable-latex-docs --enable-html-docs --enable-dot \
|
|
--enable-doxygen
|
|
|
|
%build
|
|
make all
|
|
|
|
%install
|
|
DESTDIR=$RPM_BUILD_ROOT make install
|
|
if test -d $RPM_BUILD_ROOT/usr/share/log4cxx; then
|
|
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages
|
|
mv $RPM_BUILD_ROOT/usr/share/log4cxx $RPM_BUILD_ROOT/usr/share/doc/packages/
|
|
fi
|
|
|
|
%clean
|
|
rm -rf "$RPM_BUILD_ROOT"
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%ifarch x86_64
|
|
/usr/lib64/liblog4cxx.so.10.0.0
|
|
/usr/lib64/liblog4cxx.so.10
|
|
/usr/lib64/liblog4cxx.so
|
|
%else
|
|
/usr/lib/liblog4cxx.so.10.0.0
|
|
/usr/lib/liblog4cxx.so.10
|
|
/usr/lib/liblog4cxx.so
|
|
%endif
|
|
|
|
%package devel
|
|
Summary: log4j like C++ logging library - development files and documentation
|
|
Group: Development/Libraries/C++
|
|
Requires: %{name} = %{version}
|
|
Requires: libapr1-devel libapr-util1-devel unixODBC-devel libxml2-devel
|
|
Requires: libesmtp-devel
|
|
|
|
%description devel
|
|
Log4cxx is a port to C++ of the log4j.
|
|
The goal is have the same functionalities and interfaces of log4j.
|
|
|
|
This package contains only the development files:
|
|
- headers
|
|
- static library and libtool-la-file
|
|
- documentation
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
/usr/include/log4cxx
|
|
%ifarch x86_64
|
|
/usr/lib64/liblog4cxx.a
|
|
/usr/lib64/liblog4cxx.la
|
|
/usr/lib64/pkgconfig/liblog4cxx.pc
|
|
%else
|
|
/usr/lib/liblog4cxx.a
|
|
/usr/lib/liblog4cxx.la
|
|
/usr/lib/pkgconfig/liblog4cxx.pc
|
|
%endif
|
|
/usr/share/doc/packages/log4cxx
|