File jakarta-commons-logging.spec of Package jakarta-commons-logging
#
# spec file for package jakarta-commons-logging (Version 1.0.4)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
# icecream 0
Name: jakarta-commons-logging
BuildRequires: ant java2-devel-packages junit log4j-mini xml-commons-apis
%define base_name logging
%define short_name commons-%{base_name}
%define name jakarta-%{short_name}
%define section free
Version: 1.0.4
Release: 265
Summary: Jakarta Commons Logging Package
License: The Apache Software License
Group: Development/Libraries/Java
Url: http://jakarta.apache.org/commons/logging/
Source0: http://www.apache.org/dist/jakarta/commons/logging/source/commons-logging-1.0.4-src.tar.gz
Patch: %{name}-java14compat.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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 independently.
commons-logging was heavily influenced by Avalon's Logkit and Log4J.
The commons-logging abstraction is meant to minimize the differences
between the two and to allow a developer to not tie himself to a
particular logging implementation.
%package javadoc
License: The Apache Software License
PreReq: coreutils
Summary: Javadoc for jakarta-commons-logging
Group: Development/Libraries/Java
%description javadoc
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.
This package contains the javadoc documentation for the Jakarta Commons
Logging Package.
%prep
%setup -q -n %{short_name}-%{version}-src
%patch
# -----------------------------------------------------------------------------
%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)
EOBM
ant compile.tests dist
ant test
# -----------------------------------------------------------------------------
%install
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -p -m 644 dist/%{short_name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
install -p -m 644 dist/%{short_name}-api.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 -pr dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
# -----------------------------------------------------------------------------
%clean
rm -rf $RPM_BUILD_ROOT
# -----------------------------------------------------------------------------
%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}
%postun javadoc
if [ "$1" = "0" ]; then
rm -f %{_javadocdir}/%{name}
fi
# -----------------------------------------------------------------------------
%files
%defattr(0644,root,root,0755)
%doc PROPOSAL.html STATUS.html LICENSE.txt RELEASE-NOTES.txt
%{_javadir}/*
%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
# -----------------------------------------------------------------------------
%changelog
* Wed Jul 16 2008 coolo@suse.de
- trying to reduce build requires
* Tue May 08 2007 kesselborn@suse.de
- remove avalon references ... avalon is dropped and support for it hence not needed
* Mon Sep 25 2006 skh@suse.de
- fix BuildRequires
- don't use icecream
- use source="1.4" and target="1.4" for build with java 1.5
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jul 27 2005 jsmeix@suse.de
- Adjustments in the spec file.
* Mon Jul 18 2005 jsmeix@suse.de
- Current version 1.0.4 from JPackage.org
* Thu Sep 16 2004 skh@suse.de
- Fix prerequires of javadoc subpackage
* Sun Sep 05 2004 skh@suse.de
- Initial package created with version 1.0.4 (JPackage 1.5)