Permaine Cheung edf1cf
# Copyright (c) 2000-2007, JPackage Project
Permaine Cheung edf1cf
# All rights reserved.
Permaine Cheung edf1cf
#
Permaine Cheung edf1cf
# Redistribution and use in source and binary forms, with or without
Permaine Cheung edf1cf
# modification, are permitted provided that the following conditions
Permaine Cheung edf1cf
# are met:
Permaine Cheung edf1cf
#
Permaine Cheung edf1cf
# 1. Redistributions of source code must retain the above copyright
Permaine Cheung edf1cf
#    notice, this list of conditions and the following disclaimer.
Permaine Cheung edf1cf
# 2. Redistributions in binary form must reproduce the above copyright
Permaine Cheung edf1cf
#    notice, this list of conditions and the following disclaimer in the
Permaine Cheung edf1cf
#    documentation and/or other materials provided with the
Permaine Cheung edf1cf
#    distribution.
Permaine Cheung edf1cf
# 3. Neither the name of the JPackage Project nor the names of its
Permaine Cheung edf1cf
#    contributors may be used to endorse or promote products derived
Permaine Cheung edf1cf
#    from this software without specific prior written permission.
Permaine Cheung edf1cf
#
Permaine Cheung edf1cf
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Permaine Cheung edf1cf
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Permaine Cheung edf1cf
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Permaine Cheung edf1cf
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Permaine Cheung edf1cf
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Permaine Cheung edf1cf
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Permaine Cheung edf1cf
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Permaine Cheung edf1cf
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Permaine Cheung edf1cf
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Permaine Cheung edf1cf
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Permaine Cheung edf1cf
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Permaine Cheung edf1cf
#
Permaine Cheung edf1cf
Matt Wringe 02f6f2
%define _with_gcj_support 1
Matt Wringe 02f6f2
Matt Wringe 02f6f2
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
Permaine Cheung edf1cf
%define short_name    framework
Permaine Cheung edf1cf
%define short_Name    Avalon
Permaine Cheung edf1cf
Permaine Cheung edf1cf
Name:        avalon-%{short_name}
Permaine Cheung edf1cf
Version:     4.1.4
Permaine Cheung edf1cf
Release:     2jpp.14%{?dist}
Permaine Cheung edf1cf
Epoch:       0
Permaine Cheung edf1cf
Summary:     Java components interfaces
Permaine Cheung edf1cf
License:     Apache Software License
Permaine Cheung edf1cf
Url:         http://avalon.apache.org/%{short_name}/
Permaine Cheung edf1cf
Group:       Development/Libraries/Application Frameworks
Permaine Cheung edf1cf
Source0:     http://www.apache.org/dist/avalon/framework/v4.1.4/Avalon-4.1.4-src.tar.gz
Permaine Cheung edf1cf
Patch1:        %{name}-target.patch
Permaine Cheung edf1cf
Requires:    xml-commons-apis >= 1.3
Permaine Cheung edf1cf
Requires:    xalan-j2
Permaine Cheung edf1cf
BuildRequires:    ant
Permaine Cheung edf1cf
BuildRequires:    junit
Permaine Cheung edf1cf
BuildRequires:    avalon-logkit
Permaine Cheung edf1cf
BuildRequires:    xml-commons-apis >= 1.3
Permaine Cheung edf1cf
BuildRequires:    jpackage-utils >= 0:1.5
Matt Wringe 02f6f2
%if ! %{gcj_support}
Permaine Cheung edf1cf
BuildArch:    noarch
Matt Wringe 02f6f2
%endif
Permaine Cheung edf1cf
BuildRoot:    %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
cvsdist d2622c
Matt Wringe 02f6f2
%if %{gcj_support}
Permaine Cheung edf1cf
BuildRequires:       java-gcj-compat-devel
Permaine Cheung edf1cf
Requires(post):      java-gcj-compat
Permaine Cheung edf1cf
Requires(postun):    java-gcj-compat
Matt Wringe 02f6f2
%endif
Matt Wringe 02f6f2
cvsdist d2622c
%description
cvsdist d2622c
The Avalon framework consists of interfaces that define relationships
cvsdist d2622c
between commonly used application components, best-of-practice pattern
cvsdist d2622c
enforcements, and several lightweight convenience implementations of the
cvsdist d2622c
generic components.
cvsdist d2622c
What that means is that we define the central interface Component. We
cvsdist d2622c
also define the relationship (contract) a component has with peers,
Deepak Bhole 8c27f8
ancestors and children.
cvsdist d2622c
cvsdist d2622c
%package manual
Permaine Cheung edf1cf
Summary:      Manual for %{name}
Permaine Cheung edf1cf
Group:        Development/Libraries/Application Frameworks
cvsdist d2622c
cvsdist d2622c
%description manual
cvsdist d2622c
Documentation for %{name}.
cvsdist d2622c
cvsdist d2622c
%package javadoc
Permaine Cheung edf1cf
Summary:      Javadoc for %{name}
Permaine Cheung edf1cf
Group:        Development/Documentation
Matt Wringe d5228d
Requires(post):  /bin/rm /bin/ln
Matt Wringe d5228d
Requires(postun): /bin/rm
cvsdist d2622c
cvsdist d2622c
%description javadoc
cvsdist d2622c
Javadoc for %{name}.
cvsdist d2622c
cvsdist d2622c
%prep
gbenson 204504
%setup -q -n %{short_Name}-%{version}
gbenson 204504
%patch1 -p1
cvsdist d2622c
# remove all binary libs
cvsdist d2622c
find . -name "*.jar" -exec rm -f {} \;
cvsdist d2622c
Permaine Cheung edf1cf
# Fix for wrong-file-end-of-line-encoding problem
Permaine Cheung edf1cf
for i in `find docs -iname "*.html"`; do sed -i 's/\r//' $i; done
Permaine Cheung edf1cf
for i in `find docs -iname "*.css"`; do sed -i 's/\r//' $i; done
Permaine Cheung edf1cf
for i in `find docs -iname "*.xml"`; do sed -i 's/\r//' $i; done
Permaine Cheung edf1cf
sed -i 's/\r//' README.txt
Permaine Cheung edf1cf
sed -i 's/\r//' LICENSE.txt
Permaine Cheung edf1cf
sed -i 's/\r//' KEYS
Permaine Cheung edf1cf
sed -i 's/\r//' docs/api/package-list
Permaine Cheung edf1cf
cvsdist d2622c
%build
cvsdist d2622c
export CLASSPATH=%(build-classpath avalon-logkit junit log4j junit)
gbenson 0e2921
ant all
Permaine Cheung edf1cf
ant -Dfailonerror=false javadocs
cvsdist d2622c
cvsdist d2622c
%install
Permaine Cheung edf1cf
rm -rf $RPM_BUILD_ROOT
cvsdist d2622c
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
cvsdist d2622c
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cvsdist d2622c
install -m 644 target/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
cvsdist d2622c
cp -pr target/javadocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cvsdist d2622c
# create unversioned symlinks
cvsdist d2622c
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done)
cvsdist d2622c
Permaine Cheung 0e4f2f
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
Permaine Cheung 0e4f2f
Matt Wringe 02f6f2
%if %{gcj_support}
Matt Wringe 02f6f2
%{_bindir}/aot-compile-rpm
Matt Wringe 02f6f2
%endif
Matt Wringe 02f6f2
cvsdist d2622c
%clean
cvsdist d2622c
rm -rf $RPM_BUILD_ROOT
cvsdist d2622c
Matt Wringe 02f6f2
%if %{gcj_support}
Permaine Cheung edf1cf
%post
Matt Wringe 02f6f2
if [ -x %{_bindir}/rebuild-gcj-db ]
Matt Wringe 02f6f2
then
Matt Wringe 02f6f2
  %{_bindir}/rebuild-gcj-db
Matt Wringe 02f6f2
fi
Matt Wringe 02f6f2
%endif
Matt Wringe 02f6f2
Matt Wringe 02f6f2
%if %{gcj_support}
Permaine Cheung edf1cf
%postun
Matt Wringe 02f6f2
if [ -x %{_bindir}/rebuild-gcj-db ]
Matt Wringe 02f6f2
then
Matt Wringe 02f6f2
  %{_bindir}/rebuild-gcj-db
Matt Wringe 02f6f2
fi
Matt Wringe 02f6f2
%endif
Matt Wringe 02f6f2
cvsdist d2622c
%files
cvsdist d2622c
%defattr(0644,root,root,0755)
cvsdist d2622c
%doc KEYS LICENSE.txt README.txt
cvsdist d2622c
%{_javadir}/*.jar
cvsdist d2622c
Matt Wringe 02f6f2
%if %{gcj_support}
Matt Wringe 02f6f2
%attr(-,root,root) %{_libdir}/gcj/%{name}/avalon-framework-4.1.4.jar.*
Matt Wringe 02f6f2
%endif
Matt Wringe 02f6f2
cvsdist d2622c
%files manual
cvsdist d2622c
%defattr(0644,root,root,0755)
cvsdist d2622c
%doc docs/*
cvsdist d2622c
cvsdist d2622c
%files javadoc
cvsdist d2622c
%defattr(0644,root,root,0755)
cvsdist d2622c
%{_javadocdir}/%{name}-%{version}
Permaine Cheung 0e4f2f
%{_javadocdir}/%{name}
cvsdist d2622c
cvsdist d2622c
%changelog
Permaine Cheung 7b964b
* Thu Mar 08 2007 Permaine Cheung <pcheung at redhat.com> - 0:4.1.4-2jpp.14
Permaine Cheung edf1cf
- rpmlint cleanup.
Permaine Cheung edf1cf
Matt Wringe d5228d
* Thu Aug 10 2006 Matt Wringe <mwringe at redhat.com> - 0:4.1.4-2jpp.13
Matt Wringe d5228d
- Add missing javadoc requires
Matt Wringe d5228d
Jakub Jelinek 0075c2
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 0:4.1.4-2jpp_12fc
Jakub Jelinek 0075c2
- Rebuilt
Jakub Jelinek 0075c2
Matt Wringe cdfaf9
* Wed Jul 19 2006 Matt Wringe <mwringe at redhat.com> - 0:4.1.4-2jpp_11fc
Matt Wringe cdfaf9
- Removed separate definition of name, version and release.
Matt Wringe cdfaf9
Matt Wringe 02f6f2
* Wed Jul 19 2006 Matt Wringe <mwringe at redhat.com> - 0:4.1.4-2jpp_10fc
Matt Wringe 02f6f2
- Added conditional native compling.
Matt Wringe 02f6f2
Deepak Bhole 8c27f8
* Thu Jun  8 2006 Deepak Bhole <dbhole@redhat.com> - 0:4.1.4-2jpp_9fc
Deepak Bhole 8c27f8
- Updated description for fix to Bug# 170999
Deepak Bhole 8c27f8
Jeremy Katz 2caf16
* Mon Mar  6 2006 Jeremy Katz <katzj@redhat.com> - 0:4.1.4-2jpp_8fc
Jeremy Katz 2caf16
- stop scriptlet spew
Jeremy Katz 2caf16
Jesse Keating a8e537
* Wed Dec 21 2005 Gary Benson <gbenson@redhat.com> 0:4.1.4-2jpp_7fc
Jesse Keating a8e537
- Rebuild again
Jesse Keating a8e537
gbenson 0e2921
* Thu Dec 15 2005 Gary Benson <gbenson@redhat.com> 0:4.1.4-2jpp_6fc
gbenson 0e2921
- Rebuild for new gcj.
gbenson 93becf
gbenson a7a26a
* Thu Nov  4 2004 Gary Benson <gbenson@redhat.com> 0:4.1.4-2jpp_5fc
gbenson 18f38b
- Build into Fedora.
gbenson 18f38b
gbenson a7a26a
* Thu Oct 28 2004 Gary Benson <gbenson@redhat.com> 0:4.1.4-2jpp_4fc
gbenson a7a26a
- Bootstrap into Fedora.
gbenson a7a26a
Andrew Overholt 3b709c
* Thu Sep 30 2004 Andrew Overholt <overholt@redhat.com> 0:4.1.4-2jpp_3rh
gbenson a8e2fd
- Remove avalon-logkit as a Requires
Andrew Overholt 3b709c
cvsdist 30a5a5
* Mon Mar  8 2004 Frank Ch. Eigler <fche@redhat.com> 0:4.1.4-2jpp_2rh
cvsdist 30a5a5
- RH vacuuming part II
cvsdist 30a5a5
cvsdist 9cbf37
* Fri Mar  5 2004 Frank Ch. Eigler <fche@redhat.com> 0:4.1.4-2jpp_1rh
cvsdist 9cbf37
- RH vacuuming
cvsdist 9cbf37
cvsdist d2622c
* Fri May 09 2003 David Walluck <david@anti-microsoft.org> 0:4.1.4-2jpp
cvsdist d2622c
- update for JPackage 1.5
cvsdist d2622c
cvsdist d2622c
* Fri Mar 21 2003 Nicolas Mailhot <Nicolas.Mailhot (at) JPackage.org> 4.1.4-1jpp
cvsdist d2622c
- For jpackage-utils 1.5
cvsdist d2622c
- Forrest is not used right now
cvsdist d2622c
cvsdist d2622c
* Tue May 07 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 4.1.2-3jpp 
cvsdist d2622c
- hardcoded distribution and vendor tag
cvsdist d2622c
- group tag again
cvsdist d2622c
cvsdist d2622c
* Thu May 2 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 4.1.2-2jpp 
cvsdist d2622c
- distribution tag
cvsdist d2622c
- group tag
cvsdist d2622c
cvsdist d2622c
* Sun Feb 03 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 4.1.2-1jpp 
cvsdist d2622c
- 4.1.2
cvsdist d2622c
- section macro
cvsdist d2622c
cvsdist d2622c
* Thu Jan 17 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 4.1-2jpp
cvsdist d2622c
- versioned dir for javadoc
cvsdist d2622c
- no dependencies for manual and javadoc packages
cvsdist d2622c
- requires xml-commons-apis
cvsdist d2622c
cvsdist d2622c
* Wed Dec 12 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 4.1-1jpp
cvsdist d2622c
- 4.1
cvsdist d2622c
- Requires and BuildRequires xalan-j2
cvsdist d2622c
cvsdist d2622c
* Wed Dec 5 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 4.0-4jpp
cvsdist d2622c
- javadoc into javadoc package
cvsdist d2622c
cvsdist d2622c
* Wed Nov 21 2001 Christian Zoffoli <czoffoli@littlepenguin.org> 4.0-3jpp
cvsdist d2622c
- changed extension --> jpp
cvsdist d2622c
cvsdist d2622c
* Sat Oct 6 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 4.0-2jpp
cvsdist d2622c
- first unified release
cvsdist d2622c
- used original tarball
cvsdist d2622c
cvsdist d2622c
* Thu Sep 13 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 4.0-1mdk
cvsdist d2622c
- first Mandrake release