[Jpackage-commits] dist/castor0/devel .cvsignore, 1.1, 1.2 castor-0.9.9.1.pom, NONE, 1.1 castor0.spec, NONE, 1.1 sources, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Wed May 28 19:59:09 CEST 2008


Update of /home/projects/jpackage/cvs/dist/castor0/devel
In directory ryu.zarb.org:/tmp/cvs-serv13376/devel

Modified Files:
	.cvsignore sources 
Added Files:
	castor-0.9.9.1.pom castor0.spec 
Log Message:
Import from JPP 5.0

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/castor0/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	28 May 2008 17:56:10 -0000	1.1
--- .cvsignore	28 May 2008 17:59:07 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ castor-0.9.9.1-src.tgz

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/castor0/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	28 May 2008 17:56:10 -0000	1.1
--- sources	28 May 2008 17:59:07 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ 09e276d0819e522ef171e7385517b004  castor-0.9.9.1-src.tgz

--- NEW FILE: castor-0.9.9.1.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>castor</groupId>
  <artifactId>castor</artifactId>
  <version>0.9.9.1</version>
</project>
--- NEW FILE: castor0.spec ---
# Copyright (c) 2000-2008, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}

# If you don't want to run the unit tests
# give rpmbuild option '--without tests'

%define with_tests %{!?_without_tests:1}%{?_without_tests:0}
%define without_tests %{?_without_tests:1}%{!?_without_tests:0}

%define section       free
%define cname         castor

Summary:        An open source data binding framework for Java
Name:           castor0
Version:        0.9.9.1
Release:        3jpp
Epoch:          0
Group:          Development/Libraries/Java
License:        Exolab Software License, BSD-like
URL:            http://castor.codehaus.org/
Source0:        http://dist.codehaus.org/castor/0.9.9.1/castor-0.9.9.1-src.tgz
Source1:        http://repo1.maven.org/maven2/castor/castor/0.9.9.1/castor-0.9.9.1.pom
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:%{_vendor}}
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
%if ! %{gcj_support}
BuildArch:      noarch
%endif
Requires:       adaptx
Requires:       cglib
Requires:       java >= 0:1.5.0
Requires:       jakarta-commons-logging
Requires:       jndi
Requires:       jta_1_0_1B_api
Requires:       ldapsdk
Requires:       oro
Requires:       regexp
Requires:       xerces-j2
BuildRequires:  adaptx
BuildRequires:  ant
BuildRequires:  cglib
BuildRequires:  checkstyle
BuildRequires:  java-devel = 0:1.5.0
BuildRequires:  jakarta-commons-logging
BuildRequires:  jdbc-stdext
BuildRequires:  jndi
BuildRequires:  jpackage-utils >= 0:1.7.4
BuildRequires:  jta_1_0_1B_api
BuildRequires:  ldapsdk
BuildRequires:  log4j
BuildRequires:  oro
BuildRequires:  regexp
BuildRequires:  xerces-j2
%if %{with_tests}
BuildRequires:  mockejb
BuildRequires:  tyrex
%endif
Provides:  %{cname} = %{epoch}:%{version}-%{release}
Obsoletes: %{cname} < %{epoch}:%{version}-%{release}
%if %{gcj_support}
BuildRequires:     java-gcj-compat-devel
Requires(post):    java-gcj-compat
Requires(postun):  java-gcj-compat
%endif
Requires(post):    jpackage-utils >= 0:1.7.4
Requires(postun):  jpackage-utils >= 0:1.7.4


%description
Castor is an open source data binding framework for Java. It's basically
the shortest path between Java objects, XML documents and SQL tables.
Castor provides Java to XML binding, Java to SQL persistence, and then
some more.

%package test
Group:          Development/Java
Summary:        Tests for %{name}
Requires:       %{name} = %{epoch}:%{version}-%{release}
Requires:       junit
BuildRequires:  junit

%if %{gcj_support}
BuildRequires:    java-gcj-compat-devel
Requires(post):   java-gcj-compat
Requires(postun): java-gcj-compat
%endif

%description test
Tests for %{name}.

%package xml
Group:          Development/Libraries/Java
Summary:        XML support for %{name}
Requires:       %{name} = %{epoch}:%{version}-%{release}

%if %{gcj_support}
BuildRequires:    java-gcj-compat-devel
Requires(post):   java-gcj-compat
Requires(postun): java-gcj-compat
%endif

%description xml
XML support for Castor.

%package javadoc
Group:          Development/Documentation
Summary:        Javadoc for %{name}

%description javadoc
Javadoc for %{name}.

%package doc
Summary:        Documentation for %{name}
Group:          Development/Documentation

%description doc
Documentation for %{name}.

%prep
%setup -q -n %{cname}-%{version}
find . -name "*.jar" -exec rm -f {} \;
perl -p -i -e 's|org.apache.xerces.utils.regex|org.apache.xerces.impl.xpath.regex|g;' \
src/main/org/exolab/castor/util/XercesRegExpEvaluator.java
find . -name "*.java" -exec perl -p -i -e 's|assert\(|assertTrue\(|g;' {} \;
find . -name "*.java" -exec perl -p -i -e 's|_test.name\(\)|_test.getName\(\)|g;' {} \;

## FIXME: These tests require mockejb, which we don't have yet.
#rm -f src/tests/jdo/JDOJ2EECategory.java
#rm -f src/tests/jdo/TestTransactionManagedEnvironment.java

%build
[ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java
export CLASSPATH=%(build-classpath \
adaptx \
cglib \
checkstyle \
commons-logging \
jdbc-stdext \
jndi \
jta_1_0_1B_api \
junit \
ldapsdk \
oro \
regexp \
xerces-j2 \
)
%if %{with_tests}
CLASSPATH=$CLASSPATH:$(build-classpath \
mockejb \
tyrex \
)
%endif
ant -buildfile src/build.xml jar
%if %{with_tests}
ant -buildfile src/build.xml CTFjar
%endif
ant -buildfile src/build.xml javadoc

%install
%{__rm} -rf %{buildroot}

# jar
%{__install} -d -m 755 %{buildroot}%{_javadir}
%{__install} -m 644 dist/%{cname}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
%{__install} -m 644 dist/%{cname}-%{version}-xml.jar %{buildroot}%{_javadir}/%{name}-xml-%{version}.jar
%if %{with_tests}
%{__install} -m 644 dist/CTF-%{version}.jar %{buildroot}%{_javadir}/%{name}-tests-%{version}.jar
%endif
pushd %{buildroot}%{_javadir}
   for jar in *-%{version}.jar; do 
      ln -sf ${jar} $(echo $jar| sed  -e "s|-%{version}||g")
   done
popd

# pom and depmap frags
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
%add_to_maven_depmap %{cname} %{cname} %{version} JPP %{name}
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom

# javadoc
%{__install} -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
%{__cp} -pr build/doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}

# do this last, since it will delete all build directories
export CLASSPATH=%(build-classpath adaptx log4j)
ant -buildfile src/build.xml doc

# like magic
%jpackage_script org.exolab.castor.builder.SourceGenerator %{nil} %{nil} xerces-j2:%{name} %{name}

%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif

%clean
%{__rm} -rf %{buildroot}

%post javadoc
%{__rm} -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}

%postun javadoc
if [ "$1" = "0" ]; then
    rm -f %{_javadocdir}/%{name}
fi

%post
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%postun
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%if %{gcj_support}
%post xml
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%if %{gcj_support}
%postun xml
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%files
%defattr(0644,root,root,0755)
%doc src/etc/{CHANGELOG,LICENSE,README}
%attr(0755,root,root) %{_bindir}/%{name}
%{_javadir}/%{name}-%{version}.jar
%{_javadir}/%{name}.jar
%{_datadir}/maven2
%{_mavendepmapfragdir}
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/castor-0.9.9.1.jar.*
%endif

%if %{with_tests}
%files test
%defattr(0644,root,root,0755)
%{_javadir}/%{name}-tests-%{version}.jar
%{_javadir}/%{name}-tests.jar
%endif

%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/castor-test-0.9.9.1.jar.*
%endif

%files xml
%defattr(0644,root,root,0755)
%{_javadir}/%{name}-xml-%{version}.jar
%{_javadir}/%{name}-xml.jar

%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/castor-xml-0.9.9.1.jar.*
%endif

%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}

%files doc
%defattr(0644,root,root,0755)
%doc build/doc/*

%changelog
* Thu Jan 31 2008 Ralph Apel <r.apel at r-apel.de> 0:0.9.9.1-3jpp
- Rename to castor0
- (B)Require jta_api and put it in classpath
- Add pom and depmap frag
- Activate mockejb/tyrex tests

- 0.9.9.1
* Thu Jul 20 2006 Deepak Bhole <dbhole at redhat.com> 0:0.9.9.1-2jpp
- Added conditional native compilation.

* Mon Jun 19 2006 Ralph Apel <r.apel at r-apel.de> 0:0.9.9.1-1jpp
- 0.9.9.1

* Thu May 19 2005 Ralph Apel <r.apel at r-apel.de> 0:0.9.6-1jpp
- 0.9.6

* Wed Nov 3 2004 Nicolas Mailhot <nim at jpackage.org> - 0:0.9.5-3jpp
- Clean up specfile a bit
- Kill demos as they no longer build with latest servlet.jar

* Fri Aug 20 2004 Ralph Apel <r.apel at r-apel.de> 0:0.9.5-2jpp
- Build with ant-1.6.2

* Tue Sep 09 2003 David Walluck <david at anti-microsoft.org> 0:0.9.5-1jpp
- 0.9.5

* Fri May 16 2003 Nicolas Mailhot <Nicolas.Mailhot at laPoste.net> 0:0.9.4.3-2jpp
- use same lsapjdk package as tyrex

* Sat May 10 2003 David Walluck <david at anti-microsoft.org> 0:0.9.4.3-1jpp
- release




More information about the JPackage-commits mailing list