pkg://jakarta-commons-logging-1.0.4-2jpp_4fc.src.rpm:110824/jakarta-commons-logging.spec
info downloads
%define base_name logging
%define short_name commons-%{base_name}
%define name jakarta-%{short_name}
%define section free
%define with_tests %{?_with_tests:1}%{!?_without_tests:0}
Name: %{name}
Version: 1.0.4
Release: 2jpp_4fc
Epoch: 0
Summary: Jakarta Commons Logging Package
License: Apache Software License
Group: Development/Libraries/Java
URL: http://jakarta.apache.org/commons/%{base_name}/
Source0: http://www.apache.org/dist/jakarta/commons/logging/source/commons-logging-1.0.4-src.tar.gz
BuildRequires: ant, jpackage-utils >= 0:1.5, log4j, avalon-logkit, avalon-framework, junit
BuildRequires: coreutils
Patch1: %{name}-junitclasspath.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
# RHEL3 and FC2
Obsoletes: %{short_name} <= 0:1.0.2
# libgcj aot-compiled native libraries
BuildRequires: gcc-java >= 4.0.0-0.43
BuildRequires: java-1.4.2-gcj-compat >= 1.4.2.0-40jpp_16rh
Requires(post,postun): java-1.4.2-gcj-compat >= 1.4.2.0-40jpp_16rh
ExclusiveArch: %{ix86} x86_64 ppc alpha
%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/Documentation
%description javadoc
Javadoc for %{name}.
# -----------------------------------------------------------------------------
%prep
%setup -q -n %{short_name}-%{version}-src
%patch1
# -----------------------------------------------------------------------------
%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
%if %{with_tests}
ant test
%endif
aot-compile \
dist/%{short_name}.jar \
lib%{name}-%{version}.jar.so \
"$RPM_OPT_FLAGS -fPIC"
# also covers %{short_name}-api.jar
# -----------------------------------------------------------------------------
%install
rm -rf $RPM_BUILD_ROOT
# 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}
# solibs
install -d -m 755 $RPM_BUILD_ROOT%{_libdir}
install -m 755 lib%{name}-%{version}.jar.so $RPM_BUILD_ROOT%{_libdir}
ln -sf lib%{name}-%{version}.jar.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}.jar.so
# gcjdb
gcjdbdir=`gcj-dbtool -p %{_libdir}`.d
mkdir -p $RPM_BUILD_ROOT$gcjdbdir
gcj-dbtool -n $RPM_BUILD_ROOT$gcjdbdir/%{name}-%{version}.db 80000
gcj-dbtool -f $RPM_BUILD_ROOT$gcjdbdir/%{name}-%{version}.db \
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar \
%{_libdir}/lib%{name}-%{version}.jar.so
# -----------------------------------------------------------------------------
%clean
rm -rf $RPM_BUILD_ROOT
# -----------------------------------------------------------------------------
%pre
rm -f %{_javadir}/%{short_name}*.jar
rm -f %{_javadir}/%{name}*.jar
%post
/usr/bin/rebuild-gcj-db %{_libdir}
%postun
/usr/bin/rebuild-gcj-db %{_libdir}
%triggerpostun -- commons-logging < 1.1
pushd %{_javadir} &> /dev/null
ln -sf %{name}-%{version}.jar %{short_name}-%{version}.jar
ln -sf %{short_name}-%{version}.jar %{short_name}.jar
ln -sf %{name}-api-%{version}.jar %{short_name}-api-%{version}.jar
ln -sf %{short_name}-api-%{version}.jar %{short_name}-api.jar
popd &> /dev/null
%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}/*
%attr(0755,root,root) %{_libdir}/lib*.jar.so
%{_libdir}/*/*/%{name}-%{version}.db
%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
# -----------------------------------------------------------------------------
%changelog
* Mon May 23 2005 Gary Benson <gbenson@redhat.com> - 0:1.0.4-2jpp_4fc
- Add alpha to the list of build architectures (#157522).
- Use absolute paths for rebuild-gcj-db.
* Thu May 5 2005 Gary Benson <gbenson@redhat.com> - 0:1.0.4-2jpp_3fc
- Add dependencies for %post and %postun scriptlets (#156901).
* Wed May 4 2005 Gary Benson <gbenson@redhat.com> - 0:1.0.4-2jpp_2fc
- BC-compile.
* Tue Jan 11 2005 Gary Benson <gbenson@redhat.com> - 0:1.0.4-2jpp_1fc
- Sync with RHAPS.
* Thu Nov 4 2004 Gary Benson <gbenson@redhat.com> - 0:1.0.4-1jpp_2fc
- Build into Fedora.
* Thu Oct 21 2004 Fernando Nasser <fnasser@redhat.com> - 0:1.0.4-2jpp_1rh
- Merge with more recent upstream version
* Fri Oct 01 2004 Andrew Overholt <overholt@redhat.com> - 0:1.0.4-1jpp_2rh
- add coreutils BuildRequires
* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:1.0.4-2jpp
- Rebuild with ant-1.6.2
* Fri Jul 02 2004 Aizaz Ahmed <aahmed@redhat.com> 0:1.0.3-4jpp_4rh
- Added trigger to restore symlinks that are removed if ugrading
from a commons-logging rhug package
- junitclasspath.patch added to ensure that the tests run correctly
regardless of the system classpath
* Thu Jun 24 2004 Kaj J. Niemi <kajtzu@fi.basen.net> - 0:1.0.4-1jpp
- Update to 1.0.4 (tomcat 5.0.27 wants it)
- Drop Patch #0 (jakarta-commons-logging-noclasspath.patch), unnecessary
* Fri Apr 02 2004 Frank Ch. Eigler <fche@redhat.com> 0:1.0.3-4jpp_3rh
- more of the same, for version-suffixed .jar files
* Fri Mar 26 2004 Frank Ch. Eigler <fche@redhat.com> 0:1.0.3-4jpp_2rh
- add RHUG upgrade cleanup
* Thu Mar 04 2004 Frank Ch. Eigler <fche@redhat.com> 0:1.0.3-4jpp_1rh
- RH vacuuming
* Tue Jun 17 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.0.3-4jpp
- Drop log4j requirement and manifest Class-Path.
- Run unit tests during build.
- Nuke spurious subdir in -javadoc package.
- Some spec file cleanups.
* Fri May 09 2003 David Walluck <david@anti-microsoft.org> 0:1.0.3-3jpp
- update for JPackage 1.5
* Fri Mar 11 2003 Henri Gomez <hgomez@users.sourceforge.net> 1.0.3-2jpp
- update spec to respect JPP 1.5 policy
* Wed Mar 09 2003 Henri Gomez <hgomez@users.sourceforge.net> 1.0.3-1jpp
- 1.0.3
- Built with IBM SDK 1.4 to have JDK 1.4 support compiled in
* Thu Feb 27 2003 Henri Gomez <hgomez@users.sourceforge.net> 1.0.2-2jpp
- fix ASF license and add packager tag
* Mon Sep 30 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.0.2-1jpp
- 1.0.2
* Tue Aug 20 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.0.1-1jpp
- 1.0.1
* Fri Jul 12 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.0-5jpp
- remove Requires logkit (commons-log could works with log4j, jdk1.4)
* Mon Jun 10 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.0-4jpp
- use sed instead of bash 2.x extension in link area to make spec compatible
with distro using bash 1.1x
* Mon Jun 10 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.0-3jpp
- built with Sun JDK 1.4.0_01 to have JDK 1.4 support compiled in
* Fri Jun 07 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.0-2jpp
- added short names in %{javadir}, as does jakarta developpers
* Mon May 06 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0-1jpp
- fist jpp release