Deepak Bhole dfd8d3
# Copyright (c) 2000-2005, JPackage Project
Deepak Bhole dfd8d3
# All rights reserved.
Deepak Bhole dfd8d3
#
Deepak Bhole dfd8d3
# Redistribution and use in source and binary forms, with or without
Deepak Bhole dfd8d3
# modification, are permitted provided that the following conditions
Deepak Bhole dfd8d3
# are met:
Deepak Bhole dfd8d3
#
Deepak Bhole dfd8d3
# 1. Redistributions of source code must retain the above copyright
Deepak Bhole dfd8d3
#    notice, this list of conditions and the following disclaimer.
Deepak Bhole dfd8d3
# 2. Redistributions in binary form must reproduce the above copyright
Deepak Bhole dfd8d3
#    notice, this list of conditions and the following disclaimer in the
Deepak Bhole dfd8d3
#    documentation and/or other materials provided with the
Deepak Bhole dfd8d3
#    distribution.
Deepak Bhole dfd8d3
# 3. Neither the name of the JPackage Project nor the names of its
Deepak Bhole dfd8d3
#    contributors may be used to endorse or promote products derived
Deepak Bhole dfd8d3
#    from this software without specific prior written permission.
Deepak Bhole dfd8d3
#
Deepak Bhole dfd8d3
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Deepak Bhole dfd8d3
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Deepak Bhole dfd8d3
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Deepak Bhole dfd8d3
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Deepak Bhole dfd8d3
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Deepak Bhole dfd8d3
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Deepak Bhole dfd8d3
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Deepak Bhole dfd8d3
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Deepak Bhole dfd8d3
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Deepak Bhole dfd8d3
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Deepak Bhole dfd8d3
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Deepak Bhole dfd8d3
#
Deepak Bhole dfd8d3
Deepak Bhole 0ae8fd
%define _with_gcj_support 1
Deepak Bhole 0ae8fd
Deepak Bhole dfd8d3
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
Deepak Bhole dfd8d3
Permaine Cheung 6a948c
%define     short_name      logkit
Permaine Cheung 6a948c
%define     camelcase_short_name      LogKit
Permaine Cheung 6a948c
Permaine Cheung 6a948c
Name:        avalon-%{short_name}
Permaine Cheung 6a948c
Version:     1.2
Permaine Cheung 83cb90
Release:     4jpp.5%{?dist}
Permaine Cheung 6a948c
Epoch:       0
Permaine Cheung 6a948c
Summary:     Java logging toolkit
Permaine Cheung 6a948c
License:     Apache Software License
Permaine Cheung 6a948c
Group:       Development/Libraries/Java
Permaine Cheung 6a948c
Url:         http://avalon.apache.org/%{short_name}/
Permaine Cheung 83cb90
Source0:     http://www.apache.org/dist/avalon/logkit/LogKit-1.2-src.tar.gz
Permaine Cheung 6a948c
Patch0:      %{name}-build.patch
Permaine Cheung 6a948c
Patch1:      %{name}-javadoc.patch
Permaine Cheung 6a948c
Patch2:      %{name}-notarget.patch
Permaine Cheung 6a948c
Requires:    avalon-framework >= 0:4.1.4
Permaine Cheung 6a948c
Requires:    servlet
Permaine Cheung 6a948c
Requires:    jms
Permaine Cheung 6a948c
Requires:    jdbc-stdext
Permaine Cheung 6a948c
BuildRequires:    jpackage-utils >= 0:1.5
Permaine Cheung 6a948c
BuildRequires:    ant
Permaine Cheung 6a948c
BuildRequires:    javamail
Permaine Cheung 6a948c
BuildRequires:    junit
Permaine Cheung 6a948c
BuildRequires:    log4j
Permaine Cheung 6a948c
BuildRequires:    avalon-framework >= 0:4.1.4
Permaine Cheung 6a948c
BuildRequires:    servlet
Permaine Cheung 6a948c
BuildRequires:    jms
Permaine Cheung 6a948c
BuildRequires:    jdbc-stdext
Deepak Bhole dfd8d3
%if ! %{gcj_support}
Permaine Cheung 6a948c
BuildArch:    noarch
Deepak Bhole dfd8d3
%endif
Permaine Cheung 83cb90
BuildRoot:    %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
cvsdist 6725c5
Deepak Bhole dfd8d3
%if %{gcj_support}
Permaine Cheung 6a948c
BuildRequires:       java-gcj-compat-devel
Permaine Cheung 6a948c
Requires(post):      java-gcj-compat
Permaine Cheung 6a948c
Requires(postun):    java-gcj-compat
Deepak Bhole dfd8d3
%endif
Deepak Bhole dfd8d3
cvsdist 6725c5
%description
cvsdist 6725c5
LogKit is a logging toolkit designed for secure performance orientated
cvsdist 6725c5
logging in applications. To get started using LogKit, it is recomended
cvsdist 6725c5
that you read the whitepaper and browse the API docs.
cvsdist 6725c5
cvsdist 6725c5
%package javadoc
Permaine Cheung 6a948c
Summary:    Javadoc for %{name}
Permaine Cheung 6a948c
Group:        Development/Documentation
Deepak Bhole eb07c2
Requires(post):   /bin/rm,/bin/ln
Deepak Bhole eb07c2
Requires(postun): /bin/rm
cvsdist 6725c5
cvsdist 6725c5
%description javadoc
cvsdist 6725c5
Javadoc for %{name}.
cvsdist 6725c5
cvsdist 6725c5
%prep
Deepak Bhole dfd8d3
%setup -q -n %{camelcase_short_name}-%{version}
Deepak Bhole dfd8d3
Deepak Bhole dfd8d3
%patch0
gbenson f040d8
%patch1 -p1
Jesse Keating 326700
%patch2 -p1
Deepak Bhole dfd8d3
cvsdist 6725c5
# remove all binary libs
cvsdist 6725c5
find . -name "*.jar" -exec rm -f {} \;
cvsdist 6725c5
cvsdist 6725c5
%build
Deepak Bhole dfd8d3
export CLASSPATH=%(build-classpath log4j javamail/mailapi jms servlet jdbc-stdext avalon-framework junit):$PWD/build/classes
cvsdist 6725c5
ant clean jar javadocs
cvsdist 6725c5
cvsdist 6725c5
%install
Permaine Cheung 6a948c
rm -rf $RPM_BUILD_ROOT
cvsdist 6725c5
# jars
cvsdist 6725c5
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
cvsdist 6725c5
install -m 644 build/lib/%{short_name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
cvsdist 6725c5
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done)
cvsdist 6725c5
# javadoc
cvsdist 6725c5
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cvsdist 6725c5
cp -pr build/javadocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cvsdist 6725c5
Deepak Bhole dfd8d3
%if %{gcj_support}
Deepak Bhole dfd8d3
%{_bindir}/aot-compile-rpm
Deepak Bhole dfd8d3
%endif
Deepak Bhole dfd8d3
cvsdist 6725c5
%clean
cvsdist 6725c5
rm -rf $RPM_BUILD_ROOT
cvsdist 6725c5
cvsdist 6725c5
%post javadoc
cvsdist 6725c5
rm -f %{_javadocdir}/%{name}
cvsdist 6725c5
ln -s %{name}-%{version} %{_javadocdir}/%{name}
cvsdist 6725c5
cvsdist 6725c5
%postun javadoc
cvsdist 6725c5
if [ "$1" = "0" ]; then
cvsdist 6725c5
    rm -f %{_javadocdir}/%{name}
cvsdist 6725c5
fi
cvsdist 6725c5
Deepak Bhole dfd8d3
%if %{gcj_support}
Permaine Cheung 6a948c
%post
Deepak Bhole dfd8d3
if [ -x %{_bindir}/rebuild-gcj-db ]
Deepak Bhole dfd8d3
then
Deepak Bhole dfd8d3
  %{_bindir}/rebuild-gcj-db
Deepak Bhole dfd8d3
fi
Deepak Bhole dfd8d3
%endif
Deepak Bhole dfd8d3
Deepak Bhole dfd8d3
%if %{gcj_support}
Permaine Cheung 6a948c
%postun
Deepak Bhole dfd8d3
if [ -x %{_bindir}/rebuild-gcj-db ]
Deepak Bhole dfd8d3
then
Deepak Bhole dfd8d3
  %{_bindir}/rebuild-gcj-db
Deepak Bhole dfd8d3
fi
Deepak Bhole dfd8d3
%endif
Deepak Bhole dfd8d3
cvsdist 6725c5
%files
cvsdist 6725c5
%defattr(0644,root,root,0755)
cvsdist 6725c5
%doc KEYS LICENSE
cvsdist 6725c5
%{_javadir}/*
cvsdist 6725c5
Deepak Bhole dfd8d3
%if %{gcj_support}
Deepak Bhole dfd8d3
%attr(-,root,root) %{_libdir}/gcj/%{name}
Deepak Bhole dfd8d3
%endif
Deepak Bhole dfd8d3
cvsdist 6725c5
%files javadoc
cvsdist 6725c5
%defattr(0644,root,root,0755)
cvsdist 6725c5
%{_javadocdir}/%{name}-%{version}
cvsdist 6725c5
cvsdist 6725c5
%changelog
Permaine Cheung 83cb90
* Fri Feb 09 2007 Permaine Cheung <pcheung@redhat.com> 0:1.2-4jpp.5%{?dist}
Permaine Cheung 83cb90
- Fix source URL, BuildRoot
Permaine Cheung 83cb90
Permaine Cheung 6a948c
* Thu Feb 08 2007 Permaine Cheung <pcheung@redhat.com> 0:1.2-4jpp.4%{?dist}
Permaine Cheung 6a948c
- rpmlint cleanup.
Permaine Cheung 6a948c
Permaine Cheung 6a948c
* Thu Aug 03 2006 Deepak Bhole <dbhole@redhat.com> 0:1.2-4jpp.3
Deepak Bhole eb07c2
- Added missing requirements.
Deepak Bhole eb07c2
Jakub Jelinek 41a1f3
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 0:1.2-4jpp_2fc
Jakub Jelinek 41a1f3
- Rebuilt
Jakub Jelinek 41a1f3
Deepak Bhole dfd8d3
* Wed Jul 19 2006 Deepak Bhole <dbhole@redhat.com> 0:1.2-4jpp_1fc
Deepak Bhole dfd8d3
- Added conditional native compilation.
Deepak Bhole dfd8d3
- Removed name/release/version defines as applicable.
gbenson a176ba
gbenson f040d8
* Fri Aug 20 2004 Ralph Apel <r.apel@r-apel.de> 0:1.2-3jpp
gbenson f040d8
- Build with ant-1.6.2
gbenson f040d8
cvsdist 6725c5
* Fri May 09 2003 David Walluck <david@anti-microsoft.org> 0:1.2-2jpp
cvsdist 6725c5
- update for JPackage 1.5
cvsdist 6725c5
cvsdist 6725c5
* Fri Mar 21 2003 Nicolas Mailhot <Nicolas.Mailhot (at) JPackage.org> 1.2-1jpp
cvsdist 6725c5
- For jpackage-utils 1.5
cvsdist 6725c5
cvsdist 6725c5
* Tue May 07 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0.1-4jpp 
cvsdist 6725c5
- hardcoded distribution and vendor tag
cvsdist 6725c5
- group tag again
cvsdist 6725c5
cvsdist 6725c5
* Thu May 2 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0.1-3jpp 
cvsdist 6725c5
- distribution tag
cvsdist 6725c5
- group tag
cvsdist 6725c5
cvsdist 6725c5
* Mon Mar 18 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0.1-2jpp 
cvsdist 6725c5
- generic servlet support
cvsdist 6725c5
cvsdist 6725c5
* Sun Feb 03 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0.1-1jpp 
cvsdist 6725c5
- 1.0.1
cvsdist 6725c5
- versioned dir for javadoc
cvsdist 6725c5
- no dependencies for and javadoc package
cvsdist 6725c5
- adaptation for new servlet3 package
cvsdist 6725c5
- drop j2ee package
cvsdist 6725c5
- regenerated the patch
cvsdist 6725c5
- section package
cvsdist 6725c5
cvsdist 6725c5
* Wed Dec 5 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0-4jpp
cvsdist 6725c5
- javadoc into javadoc package
cvsdist 6725c5
- Requires and BuildRequires servletapi3 >= 3.2.3-2
cvsdist 6725c5
- regenerated the patch
cvsdist 6725c5
cvsdist 6725c5
* Wed Nov 21 2001 Christian Zoffoli <czoffoli@littlepenguin.org> 1.0-3jpp
cvsdist 6725c5
- changed extension --> jpp
cvsdist 6725c5
cvsdist 6725c5
* Tue Nov 20 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0-2jpp
cvsdist 6725c5
- non-free extension classes back in original archive
cvsdist 6725c5
- removed packager tag
cvsdist 6725c5
cvsdist 6725c5
* Sun Oct 28 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0-1jpp
cvsdist 6725c5
- 1.0
cvsdist 6725c5
cvsdist 6725c5
* Tue Oct 9 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0-0.b5.2jpp
cvsdist 6725c5
- non-free extension as additional package
cvsdist 6725c5
cvsdist 6725c5
* Sat Oct 6 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0-0.b5.1jpp
cvsdist 6725c5
- 1.0b5
cvsdist 6725c5
- first unified release
cvsdist 6725c5
- used original tarball
cvsdist 6725c5
cvsdist 6725c5
* Mon Sep 10 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0-0.b4.1mdk
cvsdist 6725c5
- first Mandrake release