packages java-monolog.spec
      Pages: < 1 >  DOWNLOAD      
Name:          java-monolog
Version:       2.0
Release:       2mamba
Summary:       API for monitoring and logging
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://monolog.ow2.org/
# cvs -d:pserver:anonymous@...:/cvsroot/monolog login
# cvs -z3 -d:pserver:anonymous@...:/cvsroot/monolog export -r MONOLOG_1_9_2 monolog
Source0:       monolog-2.0-src-cvs.tar.gz
Source1:       http://repo1.maven.org/maven2/org/objectweb/monolog/monolog/2.1.12/monolog-2.1.12.pom
Patch0:        java-monolog-2.0-build_xml.patch
License:       LGPL
BuildRequires: apache-ant
BuildRequires: apache-log4j
BuildRequires: java-junit3
BuildRequires: java-mx4j
BuildRequires: java-velocity
BuildRequires: jpackage-utils
BuildRequires: objectweb-anttask
#BuildRequires: p6spy TODO
Requires:      jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
The goal of Monolog is to define and maintain the
ObjectWeb API for the logging.

%package javadoc
Group:         Documentation
Summary:       Javadoc for %{name}

%description javadoc
ObjectWeb API for the logging.

This package contains javadoc for %{name}.

%prep

%setup -q -n monolog
%patch0 -p1

for j in $(find . -name "*.jar"); do
	mv $j $j.no
done

pushd externals
	ln -sf $(build-classpath ant) ant.jar
	ln -sf $(build-classpath velocity-dep) velocity-dep-1.4.jar
	ln -sf $(build-classpath velocity) velocity-1.4.jar
	ln -sf $(build-classpath log4j) log4j.jar
	ln -sf $(build-classpath junit-3.8.2) junit3_7.jar
	ln -sf $(build-classpath xalan-j2) xalan.jar
	ln -sf $(build-classpath mx4j/mx4j) jmxri.jar
	ln -sf $(build-classpath objectweb-anttask) ow_util_ant_tasks.jar
# todo
        mv p6spy.jar.no p6spy.jar
popd

mv shared.old/src/io src/org/objectweb/util
mv shared.old/archive/ow_util_io.xml archive

%build
# p6spy
export CLASSPATH=$(build-classpath junit-3.8.2 log4j mx4j/mx4j objectweb-anttask velocity xalan-j2)
ant jar jdoc

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}/monolog
mkdir -p %{buildroot}%{_datadir}/maven2/poms

#rm -f output/dist/lib/ow_util_ant_tasks.jar
for jar in output/dist/lib/*.jar; do
	install -m 644 ${jar} %{buildroot}%{_javadir}/monolog/`basename ${jar} .jar`-%{version}.jar
done

install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/maven2/poms/JPP.monolog-ow_monolog.pom
%add_to_maven_depmap org.objectweb.monolog monolog %{version} JPP/monolog ow_monolog

(
	cd %{buildroot}%{_javadir}/monolog
	for jar in *-%{version}*; do
		ln -sf ${jar} ${jar/-%{version}/}
	done
)

mkdir -p %{buildroot}%{_javadocdir}/monolog-%{version}
cp -pr output/dist/jdoc/* %{buildroot}%{_javadocdir}/monolog-%{version}
ln -sf monolog-%{version} %{buildroot}%{_javadocdir}/monolog

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%dir %{_javadir}/monolog
%{_javadir}/monolog/ow_monolog-%{version}.jar
%{_javadir}/monolog/ow_monolog.jar
%{_javadir}/monolog/ow_util_all-%{version}.jar
%{_javadir}/monolog/ow_util_all.jar
%{_javadir}/monolog/ow_util_io-%{version}.jar
%{_javadir}/monolog/ow_util_io.jar
%{_javadir}/monolog/ow_util_log_api-%{version}.jar
%{_javadir}/monolog/ow_util_log_api.jar
%{_javadir}/monolog/ow_util_log_file-%{version}.jar
%{_javadir}/monolog/ow_util_log_file.jar
%{_javadir}/monolog/ow_util_log_helper-%{version}.jar
%{_javadir}/monolog/ow_util_log_helper.jar
%{_javadir}/monolog/ow_util_log_remote-%{version}.jar
%{_javadir}/monolog/ow_util_log_remote.jar
%{_javadir}/monolog/ow_util_log_test-%{version}.jar
%{_javadir}/monolog/ow_util_log_test.jar
%{_javadir}/monolog/ow_util_log_wrp_common-%{version}.jar
%{_javadir}/monolog/ow_util_log_wrp_common.jar
%{_javadir}/monolog/ow_util_log_wrp_javalog-%{version}.jar
%{_javadir}/monolog/ow_util_log_wrp_javalog.jar
%{_javadir}/monolog/ow_util_log_wrp_log4j-%{version}.jar
%{_javadir}/monolog/ow_util_log_wrp_log4j.jar
%{_javadir}/monolog/ow_util_log_wrp_log4j_only-%{version}.jar
%{_javadir}/monolog/ow_util_log_wrp_log4j_only.jar
%{_javadir}/monolog/ow_util_log_wrp_p6spy-%{version}.jar
%{_javadir}/monolog/ow_util_log_wrp_p6spy.jar
%{_javadir}/monolog/ow_util_log_wrp_pw-%{version}.jar
%{_javadir}/monolog/ow_util_log_wrp_pw.jar
%{_javadir}/monolog/ow_util_log_wrp_pw_only-%{version}.jar
%{_javadir}/monolog/ow_util_log_wrp_pw_only.jar
%{_javadir}/monolog/ow_util_log_wrp_velo-%{version}.jar
%{_javadir}/monolog/ow_util_log_wrp_velo.jar
%{_javadir}/monolog/ow_util_ant_tasks-%{version}.jar
%{_javadir}/monolog/ow_util_ant_tasks.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/monolog-%{version}
%{_javadocdir}/monolog

%changelog
* Thu Nov 25 2010 gil <puntogil@...> 2.0-2mamba
- rebuilt devel

* Fri Oct 09 2009 gil <puntogil@...> 2.1.1-1mamba
- package created by autospec