# 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 base_name logging %define short_name commons-%{base_name} %define section free %define gcj_support 0 Name: jakarta-%{short_name} Version: 1.1 Release: %mkrel 5 Epoch: 1 Summary: Jakarta Commons Logging Package License: Apache License Group: Development/Java BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot URL: http://jakarta.apache.org/commons/%{base_name}/ Source0: http://www.apache.org/dist/jakarta/commons/logging/source/commons-logging-%{version}-src.tar.bz2 Patch1: %{short_name}-eclipse-manifest.patch BuildRequires: ant #BuildRequires: avalon-framework #BuildRequires: avalon-logkit BuildRequires: java-rpmbuild BuildRequires: junit BuildRequires: log4j BuildRequires: servletapi5 %if %{gcj_support} BuildRequires: java-gcj-compat-devel %else BuildArch: noarch %endif %description The commons-logging package provides a simple, component oriented interface (org.apache.commons.logging.Log) together with wrappers for logging systems. The user can choose at runtime which system they want to use. In addition, a small number of basic implementations are provided to allow users to use the package standalone. commons-logging was heavily influenced by Avalon's Logkit and Log4J. The commons-logging abstraction is meant to minimixe the differences between the two, and to allow a developer to not tie himself to a particular logging implementation. %package javadoc Summary: Javadoc for %{name} Group: Development/Java %description javadoc Javadoc for %{name}. # ----------------------------------------------------------------------------- %prep %setup -q -n %{short_name}-%{version}-src %patch1 -p1 # ----------------------------------------------------------------------------- %build cat > build.properties <<EOBM junit.jar=$(build-classpath junit) log4j.jar=$(build-classpath log4j) log4j12.jar=$(build-classpath log4j) logkit.jar=$(build-classpath avalon-logkit) avalon-framework.jar=$(build-classpath avalon-framework) servletapi.jar=$(build-classpath servletapi5) EOBM export OPT_JAR_LIST="ant/ant-junit" %{ant} -Dsource.version=1.4 -Dtarget.version=1.4 clean compile #%{ant} -Dsource.version=1.4 -Dtarget.version=1.4 compile.tests test (cd src/java && %{javadoc} -d ../../target/docs/api `%{_bindir}/find . -type f -name '*.java'`) # ----------------------------------------------------------------------------- %install rm -rf $RPM_BUILD_ROOT # jars install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -p -m 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar install -p -m 644 target/%{short_name}-adapters-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-adapters-%{version}.jar install -p -m 644 target/%{short_name}-api-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-api-%{version}.jar (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"`; done) (cd $RPM_BUILD_ROOT%{_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 -a target/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} %{__ln_s} %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} # ----------------------------------------------------------------------------- %if %{gcj_support} %{_bindir}/aot-compile-rpm %endif %clean rm -rf $RPM_BUILD_ROOT %if %{gcj_support} %post %{update_gcjdb} %postun %{clean_gcjdb} %endif %files %defattr(0644,root,root,0755) %doc PROPOSAL.html STATUS.html LICENSE.txt RELEASE-NOTES.txt %{_javadir}/* %if %{gcj_support} %dir %{_libdir}/gcj/%{name} %attr(-,root,root) %{_libdir}/gcj/%{name}/* %endif %files javadoc %defattr(0644,root,root,0755) %{_javadocdir}/%{name}-%{version} %{_javadocdir}/%{name} # ----------------------------------------------------------------------------- %changelog * Sat Jan 12 2013 umeabot <umeabot> 1:1.1-5.mga3 + Revision: 354695 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Mar 07 2011 dmorgan <dmorgan> 1:1.1-4.mga1 + Revision: 65927 - Rebuild to use good MANIFEST (needed for eclipse) * Fri Mar 04 2011 dmorgan <dmorgan> 1:1.1-3.3.8.mga1 + Revision: 63835 - Revive jakarta-commons-logging * Mon Jan 17 2011 dmorgan <dmorgan> 0:1.1-3.3.7.mga1 + Revision: 20981 - Remove buildrequires + ahmad <ahmad> - imported package jakarta-commons-logging