5f69d9b
5f69d9b
%define _with_gcj_support 1
5f69d9b
5f69d9b
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
cvsdist b197d52
%define section         free
cvsdist b197d52
cvsdist b197d52
Summary:        An open source data binding framework for Java
5f69d9b
Name:           castor
5f69d9b
Version:        0.9.5
cb460e5
Release:        1jpp_6fc
cvsdist b197d52
Epoch:          0
cvsdist b197d52
Group:          Development/Libraries/Java
cvsdist b197d52
License:        Exolab Software License
676626d
URL:            http://castor.codehaus.org
gbenson 635ef18
Source0:        castor-0.9.5-src-RHCLEAN.tar.bz2
cvsdist b197d52
Patch0:		example-servletapi4.patch
cvsdist 33fa565
Patch1:		example-servletapi5.patch
cvsdist b197d52
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
5f69d9b
%if ! %{gcj_support}
cvsdist b197d52
BuildArch:      noarch
5f69d9b
%endif
cvsdist b197d52
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
cvsdist b197d52
Requires:       adaptx
cvsdist b197d52
Requires:       jdbc-stdext
cvsdist b197d52
Requires:       jndi
cvsdist b197d52
Requires:       jta
cvsdist b197d52
Requires:       ldapjdk
4c52e31
Requires:       log4j
cvsdist b197d52
Requires:       oro
cvsdist b197d52
Requires:       regexp
cvsdist b197d52
Requires:       xerces-j2
cvsdist b197d52
BuildRequires:  adaptx
4c52e31
BuildRequires:  log4j
cvsdist b197d52
BuildRequires:  ant
cvsdist b197d52
BuildRequires:  jdbc-stdext
cvsdist b197d52
BuildRequires:  jndi
cvsdist b197d52
BuildRequires:  jpackage-utils >= 0:1.5.16
cvsdist b197d52
BuildRequires:  jta
cvsdist b197d52
BuildRequires:  ldapjdk
cvsdist b197d52
BuildRequires:  oro
cvsdist b197d52
BuildRequires:  regexp
cvsdist b197d52
BuildRequires:  xerces-j2
cvsdist b197d52
5f69d9b
%if %{gcj_support}
5f69d9b
BuildRequires:		java-gcj-compat-devel
5f69d9b
Requires(post):		java-gcj-compat
5f69d9b
Requires(postun):	java-gcj-compat
5f69d9b
%endif
5f69d9b
cvsdist b197d52
%description
cvsdist b197d52
Castor is an open source data binding framework for Java. It's basically
cvsdist b197d52
the shortest path between Java objects, XML documents and SQL tables.
676626d
Castor provides Java to XML binding, Java to SQL persistence, and more.
cvsdist b197d52
cvsdist b197d52
%package demo
cvsdist b197d52
Group:          Development/Java
cvsdist b197d52
Summary:        Demo for %{name}
cvsdist b197d52
Requires:       %{name} = %{epoch}:%{version}-%{release}
cvsdist 33fa565
Requires:       servletapi5
cvsdist 33fa565
BuildRequires:  servletapi5 
cvsdist b197d52
5f69d9b
%if %{gcj_support}
5f69d9b
BuildRequires:		java-gcj-compat-devel
5f69d9b
Requires(post):		java-gcj-compat
5f69d9b
Requires(postun):	java-gcj-compat
5f69d9b
%endif
5f69d9b
cvsdist b197d52
%description demo
cvsdist b197d52
Demonstrations and samples for %{name}.
cvsdist b197d52
cvsdist b197d52
%package test
cvsdist b197d52
Group:          Development/Java
cvsdist b197d52
Summary:        Tests for %{name}
cvsdist b197d52
Requires:       %{name} = %{epoch}:%{version}-%{release}
cvsdist b197d52
Requires:       junit
cvsdist b197d52
BuildRequires:  junit
cvsdist b197d52
5f69d9b
%if %{gcj_support}
5f69d9b
BuildRequires:		java-gcj-compat-devel
5f69d9b
Requires(post):		java-gcj-compat
5f69d9b
Requires(postun):	java-gcj-compat
5f69d9b
%endif
5f69d9b
cvsdist b197d52
%description test
cvsdist b197d52
Tests for %{name}.
cvsdist b197d52
cvsdist b197d52
%package xml
cvsdist b197d52
Group:          Development/Libraries/Java
cvsdist b197d52
Summary:        XML support for %{name}.
cvsdist b197d52
Requires:       %{name} = %{epoch}:%{version}-%{release}
cvsdist b197d52
5f69d9b
%if %{gcj_support}
5f69d9b
BuildRequires:		java-gcj-compat-devel
5f69d9b
Requires(post):		java-gcj-compat
5f69d9b
Requires(postun):	java-gcj-compat
5f69d9b
%endif
5f69d9b
cvsdist b197d52
%description xml
cvsdist b197d52
XML support for Castor.
cvsdist b197d52
cvsdist b197d52
%package javadoc
cvsdist b197d52
Group:          Development/Documentation
cvsdist b197d52
Summary:        Javadoc for %{name}
52b9852
Prereq: coreutils
cvsdist b197d52
cvsdist b197d52
%description javadoc
cvsdist b197d52
Javadoc for %{name}.
cvsdist b197d52
cvsdist b197d52
%package doc
cvsdist b197d52
Summary:        Documentation for %{name}
cvsdist b197d52
Group:          Development/Documentation
cvsdist b197d52
cvsdist b197d52
%description doc
cvsdist b197d52
Documentation for %{name}.
cvsdist b197d52
cvsdist b197d52
%prep
cvsdist b197d52
%setup -q
cvsdist b197d52
find . -name "*.jar" -exec rm -f {} \;
gbenson 635ef18
find . -name "*.class" -exec rm -f {} \;
cvsdist b197d52
perl -p -i -e 's|org.apache.xerces.utils.regex|org.apache.xerces.impl.xpath.regex|g;' \
cvsdist b197d52
src/main/org/exolab/castor/util/XercesRegExpEvaluator.java
cvsdist b197d52
find . -name "*.java" -exec perl -p -i -e 's|assert\(|assertTrue\(|g;' {} \;
cvsdist b197d52
find . -name "*.java" -exec perl -p -i -e 's|_test.name\(\)|_test.getName\(\)|g;' {} \;
gbenson 100dd41
find src/doc -name "*.xml" -exec perl -p -i -e 's|\222|’|g;' {} \;
cvsdist b197d52
%patch0
cvsdist 33fa565
%patch1
cvsdist b197d52
cvsdist b197d52
%build
cvsdist 33fa565
export CLASSPATH=%(build-classpath adaptx jdbc-stdext jndi jta junit ldapjdk oro regexp servletapi5 xerces-j2)
cvsdist b197d52
ant -buildfile src/build.xml jar
cvsdist b197d52
ant -buildfile src/build.xml examples
cvsdist b197d52
ant -buildfile src/build.xml CTFjar
cvsdist b197d52
ant -buildfile src/build.xml javadoc
cvsdist b197d52
cvsdist b197d52
%install
cvsdist b197d52
rm -rf $RPM_BUILD_ROOT
cvsdist b197d52
cvsdist b197d52
# jar
cvsdist b197d52
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
cvsdist b197d52
install -m 644 dist/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
cvsdist b197d52
install -m 644 dist/%{name}-%{version}-xml.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-xml-%{version}.jar
cvsdist b197d52
install -m 644 dist/CTF-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-tests-%{version}.jar
cvsdist b197d52
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
cvsdist b197d52
cvsdist b197d52
# examples (demo)
cvsdist b197d52
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/examples
cvsdist b197d52
cp -pr build/examples/* $RPM_BUILD_ROOT%{_datadir}/%{name}/examples
cvsdist b197d52
cvsdist b197d52
# javadoc
cvsdist b197d52
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cvsdist b197d52
cp -pr build/doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cvsdist b197d52
cvsdist b197d52
# do this last, since it will delete all build directories
4c52e31
export CLASSPATH=%(build-classpath log4j adaptx)
4c52e31
ant -buildfile src/build.xml doc
cvsdist b197d52
cvsdist b197d52
# like magic
cvsdist b197d52
%jpackage_script org.exolab.castor.builder.SourceGenerator %{nil} %{nil} xerces-j2:%{name} %{name}
cvsdist b197d52
5f69d9b
%if %{gcj_support}
5f69d9b
%{_bindir}/aot-compile-rpm --exclude %{_datadir}/%{name}/examples/webapp-example-castor.war --exclude %{_datadir}/%{name}/examples/webapp/WEB-INF/lib/castor-0.9.5.jar
5f69d9b
%endif
5f69d9b
cvsdist b197d52
%clean
cvsdist b197d52
rm -rf $RPM_BUILD_ROOT
cvsdist b197d52
cvsdist b197d52
%post javadoc
cvsdist b197d52
rm -f %{_javadocdir}/%{name}
cvsdist b197d52
ln -s %{name}-%{version} %{_javadocdir}/%{name}
cvsdist b197d52
cvsdist b197d52
%postun javadoc
cvsdist b197d52
if [ "$1" = "0" ]; then
cvsdist b197d52
    rm -f %{_javadocdir}/%{name}
cvsdist b197d52
fi
cvsdist b197d52
5f69d9b
%post
5f69d9b
%if %{gcj_support}
5f69d9b
if [ -x %{_bindir}/rebuild-gcj-db ]
5f69d9b
then
5f69d9b
  %{_bindir}/rebuild-gcj-db
5f69d9b
fi
5f69d9b
%endif
5f69d9b
5f69d9b
%postun
5f69d9b
%if %{gcj_support}
5f69d9b
if [ -x %{_bindir}/rebuild-gcj-db ]
5f69d9b
then
5f69d9b
  %{_bindir}/rebuild-gcj-db
5f69d9b
fi
5f69d9b
%endif
5f69d9b
5f69d9b
%post test
5f69d9b
%if %{gcj_support}
5f69d9b
if [ -x %{_bindir}/rebuild-gcj-db ]
5f69d9b
then
5f69d9b
  %{_bindir}/rebuild-gcj-db
5f69d9b
fi
5f69d9b
%endif
5f69d9b
5f69d9b
%postun test
5f69d9b
%if %{gcj_support}
5f69d9b
if [ -x %{_bindir}/rebuild-gcj-db ]
5f69d9b
then
5f69d9b
  %{_bindir}/rebuild-gcj-db
5f69d9b
fi
5f69d9b
%endif
5f69d9b
5f69d9b
%post xml
5f69d9b
%if %{gcj_support}
5f69d9b
if [ -x %{_bindir}/rebuild-gcj-db ]
5f69d9b
then
5f69d9b
  %{_bindir}/rebuild-gcj-db
5f69d9b
fi
5f69d9b
%endif
5f69d9b
5f69d9b
%postun xml
5f69d9b
%if %{gcj_support}
5f69d9b
if [ -x %{_bindir}/rebuild-gcj-db ]
5f69d9b
then
5f69d9b
  %{_bindir}/rebuild-gcj-db
5f69d9b
fi
5f69d9b
%endif
5f69d9b
5f69d9b
%post demo
5f69d9b
%if %{gcj_support}
5f69d9b
if [ -x %{_bindir}/rebuild-gcj-db ]
5f69d9b
then
5f69d9b
  %{_bindir}/rebuild-gcj-db
5f69d9b
fi
5f69d9b
%endif
5f69d9b
5f69d9b
%postun demo
5f69d9b
%if %{gcj_support}
5f69d9b
if [ -x %{_bindir}/rebuild-gcj-db ]
5f69d9b
then
5f69d9b
  %{_bindir}/rebuild-gcj-db
5f69d9b
fi
5f69d9b
%endif
5f69d9b
cvsdist b197d52
%files
cvsdist b197d52
%defattr(0644,root,root,0755)
cvsdist b197d52
%doc src/etc/{CHANGELOG,LICENSE,README}
cvsdist b197d52
%attr(0755,root,root) %{_bindir}/%{name}
cvsdist b197d52
%{_javadir}/%{name}-%{version}.jar
cvsdist b197d52
%{_javadir}/%{name}.jar
cvsdist b197d52
%dir %{_datadir}/%{name}
cvsdist b197d52
5f69d9b
%if %{gcj_support}
5f69d9b
%dir %{_libdir}/gcj/%{name}
5f69d9b
%attr(-,root,root) %{_libdir}/gcj/%{name}/castor-0.9.5.jar.*
5f69d9b
%endif
5f69d9b
cvsdist b197d52
%files demo
cvsdist b197d52
%defattr(0644,root,root,0755)
cvsdist b197d52
%{_datadir}/%{name}/examples
cvsdist b197d52
5f69d9b
%if %{gcj_support}
5f69d9b
%dir %{_libdir}/gcj/%{name}
5f69d9b
%attr(-,root,root) %{_libdir}/gcj/%{name}/examples.*
5f69d9b
%endif
5f69d9b
cvsdist b197d52
%files test
cvsdist b197d52
%defattr(0644,root,root,0755)
cvsdist b197d52
%{_javadir}/%{name}-tests-%{version}.jar
cvsdist b197d52
%{_javadir}/%{name}-tests.jar
cvsdist b197d52
5f69d9b
%if %{gcj_support}
5f69d9b
%dir %{_libdir}/gcj/%{name}
5f69d9b
%attr(-,root,root) %{_libdir}/gcj/%{name}/castor-tests-0.9.5.jar.*
5f69d9b
%endif
5f69d9b
cvsdist b197d52
%files xml
cvsdist b197d52
%defattr(0644,root,root,0755)
cvsdist b197d52
%{_javadir}/%{name}-xml-%{version}.jar
cvsdist b197d52
%{_javadir}/%{name}-xml.jar
cvsdist b197d52
cvsdist b197d52
%files javadoc
cvsdist b197d52
%defattr(0644,root,root,0755)
cvsdist b197d52
%{_javadocdir}/%{name}-%{version}
cvsdist b197d52
cvsdist b197d52
%files doc
cvsdist b197d52
%defattr(0644,root,root,0755)
cvsdist b197d52
%doc build/doc/*
cvsdist b197d52
cvsdist b197d52
%changelog
cb460e5
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 0:0.9.5-1jpp_6fc
cb460e5
- Rebuilt
cb460e5
5f69d9b
* Thu Jul  20 2006 Deepak Bhole <dbhole@redhat.com> - 0:0.9.5-1jpp_5fc
5f69d9b
- Added conditional native compilation.
4c52e31
- Added missing BR/R for log4j.
5f69d9b
676626d
* Thu Jun  8 2006 Deepak Bhole <dbhole@redhat.com> - 0:0.9.5-1jpp_4fc
676626d
- Updated project URL -- fix for Bug #180586
676626d
rafaels 8a86c2b
* Wed Mar  8 2006 Rafael Schloming <rafaels@redhat.com> - 0:0.9.5-1jpp_3fc
rafaels 8a86c2b
- excluded s390[x] and ppc64 due to eclipse
rafaels 8a86c2b
52b9852
* Mon Mar  6 2006 Jeremy Katz <katzj@redhat.com> - 0:0.9.5-1jpp_2fc
52b9852
- stop scriptlet spew
52b9852
e43489c
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
e43489c
- rebuilt
e43489c
gbenson efd50fb
* Thu Jun 16 2005 Gary Benson <gbenson@redhat.com> 0:0.9.5-1jpp_1fc
gbenson efd50fb
- Build into Fedora.
gbenson efd50fb
gbenson 635ef18
* Fri Jun 10 2005 Gary Benson <gbenson@redhat.com>
gbenson 635ef18
- Remove jarfiles and classfiles from the tarball.
gbenson 635ef18
gbenson 100dd41
* Thu Jun  2 2005 Gary Benson <gbenson@redhat.com>
gbenson 100dd41
- Fix up (alleged) invalid characters in the documentation.
gbenson 100dd41
cvsdist 33fa565
* Fri Jul 23 2004 Fernando Nasser <fnasser@redhat.com> 0:0.9.5-1jpp_3rh
cvsdist 33fa565
- use servletapi5 instead of servletapi4
cvsdist 33fa565
cvsdist 33fa565
* Thu Mar 11 2004 Frank Ch. Eigler <fche@redhat.com> 0:0.9.5-1jpp_2rh
cvsdist b197d52
- try servletapi4 instead of servletapi3
cvsdist 33fa565
- add example-servletapi4 patch
cvsdist b197d52
cvsdist b197d52
* Thu Mar  4 2004 Frank Ch. Eigler <fche@redhat.com> 0:0.9.5-1jpp_1rh
cvsdist b197d52
- RH vacuuming
cvsdist b197d52
cvsdist b197d52
* Tue Sep 09 2003 David Walluck <david@anti-microsoft.org> 0:0.9.5-1jpp
cvsdist b197d52
- 0.9.5
cvsdist b197d52
cvsdist b197d52
* Fri May 16 2003 Nicolas Mailhot <Nicolas.Mailhot at laPoste.net> 0:0.9.4.3-2jpp
cvsdist b197d52
- use same lsapjdk package as tyrex
cvsdist b197d52
cvsdist b197d52
* Sat May 10 2003 David Walluck <david@anti-microsoft.org> 0:0.9.4.3-1jpp
cvsdist b197d52
- release