diff --git a/.cvsignore b/.cvsignore index 6069549..b5359c0 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1 @@ -jakarta-log4j-1.2.8-RHCLEAN.tar.bz2 -jakarta-log4j-1.2.8 -noarch -*.src.rpm +logging-log4j-1.2.13-RHCLEAN.tar.gz diff --git a/log4j-javadoc-xlink.patch b/log4j-javadoc-xlink.patch index df2621f..6c73564 100644 --- a/log4j-javadoc-xlink.patch +++ b/log4j-javadoc-xlink.patch @@ -1,14 +1,12 @@ ---- build.xml~ 2003-02-20 03:07:31.000000000 +0200 -+++ build.xml 2003-08-31 03:41:21.000000000 +0300 -@@ -383,8 +383,11 @@ - header="<b>Log4j ${version}</b>" - bottom="Copyright 2000-2002 Apache Software Foundation."> - -+ -+ - - - +--- build.xml.sav 2006-04-03 19:34:39.000000000 +0200 ++++ build.xml 2006-04-03 19:35:22.000000000 +0200 +@@ -434,8 +434,7 @@ + header="<b>Log4j ${version}</b>" + bottom="Copyright 2000-2005 Apache Software Foundation."> + +- +- ++ + + + diff --git a/log4j-logfactor5-userdir.patch b/log4j-logfactor5-userdir.patch index d98aaa6..c095e51 100644 --- a/log4j-logfactor5-userdir.patch +++ b/log4j-logfactor5-userdir.patch @@ -1,53 +1,46 @@ -diff -Naru jakarta-log4j-1.2.8.orig/docs/lf5/configuration.html jakarta-log4j-1.2.8/docs/lf5/configuration.html ---- jakarta-log4j-1.2.8.orig/docs/lf5/configuration.html 2003-02-20 03:07:31.000000000 +0200 -+++ jakarta-log4j-1.2.8/docs/lf5/configuration.html 2003-08-31 03:22:21.000000000 +0300 -@@ -120,7 +120,7 @@ - Configure->Save menu option saves your current GUI - configuration to a file called - lf5_configuration.xml. This configuration file is a -- saved to the location <USER_HOME>/lf5 on your local -+ saved to the location <USER_HOME>/.logfactor5 on your local - drive. -

-

The information saved in the configuration file is as -diff -Naru jakarta-log4j-1.2.8.orig/src/java/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java jakarta-log4j-1.2.8/src/java/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java ---- jakarta-log4j-1.2.8.orig/src/java/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java 2003-02-20 03:07:41.000000000 +0200 -+++ jakarta-log4j-1.2.8/src/java/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java 2003-08-31 03:21:27.000000000 +0300 -@@ -332,7 +332,7 @@ - String home = System.getProperty("user.home"); - String sep = System.getProperty("file.separator"); - -- return home + sep + "lf5" + sep + CONFIG_FILE_NAME; -+ return home + sep + ".logfactor5" + sep + CONFIG_FILE_NAME; - } - - //-------------------------------------------------------------------------- -diff -Naru jakarta-log4j-1.2.8.orig/src/java/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java jakarta-log4j-1.2.8/src/java/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java ---- jakarta-log4j-1.2.8.orig/src/java/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java 2003-02-20 03:07:38.000000000 +0200 -+++ jakarta-log4j-1.2.8/src/java/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java 2003-08-31 03:22:23.000000000 +0300 -@@ -158,14 +158,14 @@ - - /** - * Creates the directory where the MRU file list will be written. -- * The "lf5" directory is created in the Documents and Settings -+ * The ".logfactor5" directory is created in the Documents and Settings - * directory on Windows 2000 machines and where ever the user.home - * variable points on all other platforms. - */ - public static void createConfigurationDirectory() { - String home = System.getProperty("user.home"); - String sep = System.getProperty("file.separator"); -- File f = new File(home + sep + "lf5"); -+ File f = new File(home + sep + ".logfactor5"); - if (!f.exists()) { - try { - f.mkdir(); -@@ -251,7 +251,7 @@ - String home = System.getProperty("user.home"); - String sep = System.getProperty("file.separator"); - -- return home + sep + "lf5" + sep + CONFIG_FILE_NAME; -+ return home + sep + ".logfactor5" + sep + CONFIG_FILE_NAME; - } - - /** +--- src/java/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java.sav 2006-04-03 19:30:42.000000000 +0200 ++++ src/java/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java 2006-04-03 19:31:35.000000000 +0200 +@@ -340,7 +340,7 @@ + String home = System.getProperty("user.home"); + String sep = System.getProperty("file.separator"); + +- return home + sep + "lf5" + sep + CONFIG_FILE_NAME; ++ return home + sep + ".logfactor5" + sep + CONFIG_FILE_NAME; + } + + //-------------------------------------------------------------------------- +--- src/java/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java.sav 2006-04-03 19:32:18.000000000 +0200 ++++ src/java/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java 2006-04-03 19:32:40.000000000 +0200 +@@ -166,14 +166,14 @@ + + /** + * Creates the directory where the MRU file list will be written. +- * The "lf5" directory is created in the Documents and Settings ++ * The ".logfactor5" directory is created in the Documents and Settings + * directory on Windows 2000 machines and where ever the user.home + * variable points on all other platforms. + */ + public static void createConfigurationDirectory() { + String home = System.getProperty("user.home"); + String sep = System.getProperty("file.separator"); +- File f = new File(home + sep + "lf5"); ++ File f = new File(home + sep + ".logfactor5"); + if (!f.exists()) { + try { + f.mkdir(); +@@ -259,7 +259,7 @@ + String home = System.getProperty("user.home"); + String sep = System.getProperty("file.separator"); + +- return home + sep + "lf5" + sep + CONFIG_FILE_NAME; ++ return home + sep + ".logfactor5" + sep + CONFIG_FILE_NAME; + } + + /** +@@ -281,4 +281,4 @@ + //-------------------------------------------------------------------------- + // Nested Top-Level Classes or Interfaces + //-------------------------------------------------------------------------- +-} +\ No newline at end of file ++} diff --git a/log4j.spec b/log4j.spec index 27a0771..d37b2d2 100644 --- a/log4j.spec +++ b/log4j.spec @@ -1,13 +1,48 @@ +# Copyright (c) 2000-2005, JPackage Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the +# distribution. +# 3. Neither the name of the JPackage Project nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +%define _with_gcj_support 1 + +%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}} + %define section free Name: log4j -Version: 1.2.8 -Release: 7jpp_9fc +Version: 1.2.13 +Release: 2jpp_1fc Epoch: 0 Summary: Java logging package License: Apache Software License -URL: http://jakarta.apache.org/log4j/ -Source0: jakarta-log4j-1.2.8-RHCLEAN.tar.bz2 +URL: http://logging.apache.org/log4j/ +#Source0: http://www.apache.org/dist/logging/log4j/1.2.13/logging-log4j-1.2.13.tar.gz +Source0: logging-log4j-1.2.13-RHCLEAN.tar.gz # Converted from src/java/org/apache/log4j/lf5/viewer/images/lf5_small_icon.gif Source1: %{name}-logfactor5.png Source2: %{name}-logfactor5.sh @@ -20,14 +55,34 @@ Source7: %{name}.catalog Patch0: %{name}-logfactor5-userdir.patch Patch1: %{name}-javadoc-xlink.patch Patch2: %{name}-bz157585.patch -BuildRequires: ant, jaf >= 0:1.0.1-5jpp, javamail >= 0:1.2-5jpp +BuildRequires: jpackage-utils >= 0:1.6 +BuildRequires: ant +#Use classpathx-jaf for now +#BuildRequires: geronimo-jaf-1.0.2-api +BuildRequires: classpathx-jaf +BuildRequires: classpathx-mail +# Use JMS for now +#BuildRequires: geronimo-jms-1.1-api BuildRequires: jms -BuildRequires: jndi, jpackage-utils >= 0:1.5, xml-commons-apis-javadoc -Requires: jpackage-utils >= 0:1.5, xml-commons-apis, jaxp_parser_impl +BuildRequires: mx4j +BuildRequires: jndi +BuildRequires: java-javadoc +BuildRequires: %{__perl} +Requires: jpackage-utils >= 0:1.6 +Requires: xml-commons-apis +Requires: jaxp_parser_impl Group: System/Logging +%if ! %{gcj_support} BuildArch: noarch +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +%if %{gcj_support} +BuildRequires: java-gcj-compat-devel +Requires(post): java-gcj-compat +Requires(postun): java-gcj-compat +%endif + %description Log4j is a tool to help the programmer output log statements to a variety of output targets. @@ -42,66 +97,89 @@ Documentation for %{name}. %package javadoc Summary: Javadoc for %{name} Group: System/Logging -Prereq: coreutils %description javadoc Javadoc for %{name}. %prep -%setup -q -n jakarta-%{name}-%{version} -%patch0 -p1 -%patch1 -p0 -%patch2 -p1 -# remove all binary libs -find . -name "*.jar" -exec rm -f {} \; -find . -name "*.class" -exec rm -f {} \; +%setup -q -n logging-%{name}-%{version} +%patch0 -b .sav +%patch1 -b .sav +#%patch2 -p1 + +%{__perl} -pi -e 's/\r//g' LICENSE.txt + +# remove all the stuff we'll build ourselves +find . \( -name "*.jar" -o -name "*.class" \) -exec %__rm -f {} \; +%__rm -rf docs/api %build -export CLASSPATH=%(build-classpath jaf javamail/mailapi jms) -ant jar javadoc +#export CLASSPATH=$(build-classpath jaf javamail/mailapi jms mx4j/mx4j) +# javac.source=1.1 doesn't work with Sun's 1.4.2_09/1.5.0_05 +%ant \ + -Djavamail.jar=$(build-classpath javamail/mailapi) \ + -Dactivation.jar=$(build-classpath jaf) \ + -Djaxp.jaxp.jar.jar=$(build-classpath jaxp_parser_impl) \ + -Djms.jar=$(build-classpath jms) \ + -Djmx.jar=$(build-classpath mx4j/mx4j) \ + -Djmx-extra.jar=$(build-classpath mx4j/mx4j-tools) \ + -Djndi.jar=$(build-classpath jndi) \ + -Djavac.source=1.2 \ + -Djdk.javadoc=%{_javadocdir}/java \ + jar javadoc %install -rm -rf $RPM_BUILD_ROOT +%__rm -rf %{buildroot} # jars -install -d -m 755 $RPM_BUILD_ROOT%{_javadir} -install -p -m 644 dist/lib/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir} -(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) +%__mkdir_p %{buildroot}%{_javadir} +%__cp -a dist/lib/%{name}-%{version}.jar %{buildroot}%{_javadir} +(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) # javadoc -install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -cp -pr docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -rm -rf docs/api +%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version} +%__cp -a docs/api/* %{buildroot}%{_javadocdir}/%{name}-%{version} +(cd %{buildroot}%{_javadocdir} && %__ln_s %{name}-%{version} %{name}) +%__rm -rf docs/api +ln -s %{_javadocdir}/log4j docs/api # scripts -install -d -m 755 $RPM_BUILD_ROOT%{_bindir} -install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/logfactor5 -install -p -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}/chainsaw +%__mkdir_p %{buildroot}%{_bindir} +%__install -p -m 755 %{SOURCE2} %{buildroot}%{_bindir}/logfactor5 +%__install -p -m 755 %{SOURCE5} %{buildroot}%{_bindir}/chainsaw # freedesktop.org menu entries and icons -install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps} -install -p -m 644 %{SOURCE1} \ - $RPM_BUILD_ROOT%{_datadir}/pixmaps/logfactor5.png -install -p -m 644 %{SOURCE3} \ - $RPM_BUILD_ROOT%{_datadir}/applications/jpackage-logfactor5.desktop -install -p -m 644 %{SOURCE4} \ - $RPM_BUILD_ROOT%{_datadir}/pixmaps/chainsaw.png -install -p -m 644 %{SOURCE6} \ - $RPM_BUILD_ROOT%{_datadir}/applications/jpackage-chainsaw.desktop +%__mkdir_p %{buildroot}%{_datadir}/{applications,pixmaps} +%__cp -a %{SOURCE1} \ + %{buildroot}%{_datadir}/pixmaps/logfactor5.png +%__cp -a %{SOURCE3} \ + %{buildroot}%{_datadir}/applications/jpackage-logfactor5.desktop +%__cp -a %{SOURCE4} \ + %{buildroot}%{_datadir}/pixmaps/chainsaw.png +%__cp -a %{SOURCE6} \ + %{buildroot}%{_datadir}/applications/jpackage-chainsaw.desktop # DTD and the SGML catalog (XML catalog handled in scriptlets) -install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/sgml/%{name} -install -p -m 644 src/java/org/apache/log4j/xml/log4j.dtd \ - $RPM_BUILD_ROOT%{_datadir}/sgml/%{name} -install -p -m 644 %{SOURCE7} \ - $RPM_BUILD_ROOT%{_datadir}/sgml/%{name}/catalog +%__mkdir_p %{buildroot}%{_datadir}/sgml/%{name} +%__cp -a src/java/org/apache/log4j/xml/log4j.dtd \ + %{buildroot}%{_datadir}/sgml/%{name} +%__cp -a %{SOURCE7} \ + %{buildroot}%{_datadir}/sgml/%{name}/catalog +# fix perl location +%__perl -p -i -e 's|/opt/perl5/bin/perl|%{__perl}|' \ +contribs/KitchingSimon/udpserver.pl + + +%if %{gcj_support} +%{_bindir}/aot-compile-rpm +%endif %clean -rm -rf $RPM_BUILD_ROOT +%__rm -rf %{buildroot} %post @@ -117,6 +195,13 @@ if [ -x %{_bindir}/xmlcatalog -a -w %{_sysconfdir}/xml/catalog ]; then > /dev/null || : fi +%if %{gcj_support} +if [ -x %{_bindir}/rebuild-gcj-db ] +then + %{_bindir}/rebuild-gcj-db +fi +%endif + %preun if [ $1 -eq 0 ]; then if [ -x %{_bindir}/xmlcatalog -a -w %{_sysconfdir}/xml/catalog ]; then @@ -125,6 +210,13 @@ if [ $1 -eq 0 ]; then fi fi +%if %{gcj_support} +if [ -x %{_bindir}/rebuild-gcj-db ] +then + %{_bindir}/rebuild-gcj-db +fi +%endif + %postun # Note that we're using versioned catalog, so this is always ok. if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then @@ -133,35 +225,53 @@ if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then %{_datadir}/sgml/%{name}/catalog > /dev/null || : fi +%if %{gcj_support} +if [ -x %{_bindir}/rebuild-gcj-db ] +then + %{_bindir}/rebuild-gcj-db +fi +%endif + %post javadoc -rm -f %{_javadocdir}/%{name} -ln -s %{name}-%{version} %{_javadocdir}/%{name} +%__rm -f %{_javadocdir}/%{name} +%__ln_s %{name}-%{version} %{_javadocdir}/%{name} %postun javadoc if [ $1 -eq 0 ]; then - rm -f %{_javadocdir}/%{name} + %__rm -f %{_javadocdir}/%{name} fi %files %defattr(-,root,root,-) -%doc INSTALL LICENSE.txt +%doc LICENSE.txt %{_bindir}/* %{_javadir}/* %{_datadir}/applications/* %{_datadir}/pixmaps/* %{_datadir}/sgml/%{name} +%if %{gcj_support} +%attr(-,root,root) %{_libdir}/gcj/%{name}/log4j-1.2.13.jar.* +%endif + %files manual %defattr(0644,root,root,0755) %doc docs/* contribs %files javadoc %defattr(0644,root,root,0755) -%{_javadocdir}/%{name}-%{version} +%dir %{_javadocdir}/%{name}-%{version} +%{_javadocdir}/%{name}-%{version}/* +%ghost %dir %{_javadocdir}/%{name} %changelog +* Fri Jul 21 2006 Vivek Lakshmanan - 0:1.2.13-2jpp_1fc +- Merge spec and patches with latest from JPP. +- Clean source tar ball off prebuilt jars and classes. +- Use classpathx-jaf and jms for buildrequires for the time being. + * Wed Jul 12 2006 Jesse Keating - 0:1.2.8-7jpp_9fc - rebuild diff --git a/sources b/sources index 8edef97..58dc135 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e4dc1b4bbac931e9da296463622b17d6 jakarta-log4j-1.2.8-RHCLEAN.tar.bz2 +0bd096035bc7ccbb9a055eef8b0755ab logging-log4j-1.2.13-RHCLEAN.tar.gz