Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37887516
en ru br
ALT Linux repos
5.0: 3.2.0-alt2_0.cr2.1jpp5
4.1: 3.2.0-alt1_0.cr2.1jpp1.7
4.0: 3.2.0-alt1_0.cr2.1jpp1.7

Group :: Databases
RPM: hibernate3

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

BuildRequires: /proc
BuildRequires: jpackage-1.5-compat
# Copyright (c) 2000-2005, 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 base_version 3.2
%define hname hibernate

Summary:        Relational persistence and query service
Name:           hibernate3
Version:        3.2.0
Release:        alt1_0.cr2.1jpp1.7
Epoch:          0
License:        LGPL
URL:            http://www.hibernate.org/
Group:          Databases
Source0:        http://prdownloads.sourceforge.net/hibernate/hibernate-3.2.0.cr2.tar.gz
Patch0: hibernate-3.2-EhCache.patch

BuildRequires: jpackage-utils >= 0:1.6
BuildRequires: ant >= 0:1.6
BuildRequires: ant-antlr
BuildRequires: antlr
BuildRequires: ant-junit
BuildRequires: junit
BuildRequires: ant-swing
BuildRequires: asm
BuildRequires: c3p0
BuildRequires: cglib >= 0:2.0
BuildRequires: concurrent
BuildRequires: jakarta-commons-collections >= 0:2.1
BuildRequires: jakarta-commons-logging
BuildRequires: jgroups
BuildRequires: hsqldb
BuildRequires: dom4j
BuildRequires: jaxen >= 0:1.1
BuildRequires: j2ee-connector
BuildRequires: jaas
BuildRequires: jacc
BuildRequires: jdbc-stdext
BuildRequires: jta
BuildRequires: log4j
BuildRequires: ehcache >= 0:1.2
BuildRequires: oscache
BuildRequires: proxool
BuildRequires: swarmcache
BuildRequires: jboss-cache >= 0:1.3.0
BuildRequires: jboss4-common >= 0:4.0.2
BuildRequires: jboss4-jmx >= 0:4.0.2
BuildRequires: jboss4-system >= 0:4.0.2
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
Requires: hibernate_jdbc_cache
Requires: hibernate_in_process_cache
Requires: cglib >= 0:2.0
Requires: jakarta-commons-collections >= 0:2.1
Requires: jakarta-commons-logging
Requires: dom4j
Requires: jdbc-stdext
Requires: jta
Requires: xml-commons-apis
BuildArch:      noarch

%description
Hibernate is a powerful, ultra-high performance
object/relational persistence and query service
for Java. Hibernate lets you develop persistent
objects following common Java idiom - including
association, inheritance, polymorphism, composition
and the Java collections framework. Extremely
fine-grained, richly typed object models are
possible. The Hibernate Query Language, designed
as a "minimal" object-oriented extension to SQL,
provides an elegant bridge between the object and
relational worlds. Hibernate is now the most
popular ORM solution for Java.


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

%description javadoc
Javadoc for %{name}.

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

%description manual
Javadoc for %{name}.

%prep
%setup -q -n %{hname}-%{base_version}
# remove all binary libs
#find . -name "*.jar" -exec mv {} {}.no \;
for j in $(find . -name "*.jar"); do
   mv $j $j.no
done

%patch0 -b .sav

%build
export OPT_JAR_LIST="ant/ant-swing ant/ant-antlr antlr ant/ant-junit junit ant-launcher"
#BUILD/hibernate-3.2/lib/cleanimports.jar.no
#BUILD/hibernate-3.2/lib/syndiag2.jar.no
#BUILD/hibernate-3.2/lib/versioncheck.jar.no

build-jar-repository -s -p lib \
ant \
ant/ant-antlr \
ant/ant-junit \
ant/ant-swing \
ant-launcher \
antlr \
asm/asm \
asm/asm-attrs \
c3p0 \
cglib \
commons-collections \
commons-logging \
concurrent \
dom4j \
ehcache \
hsqldb \
j2ee-connector \
jaas \
jacc \
javassist \
jaxen \
jboss-cache \
jboss4/jboss-common \
jboss4/jboss-jmx \
jboss4/jboss-system \
jdbc-stdext \
jgroups \
jta \
junit \
log4j \
oscache \
proxool \
swarmcache \
xerces-j2 \
xml-commons-apis \


export JAVA_HOME=/usr/lib/jvm/java-1.5.0
export CLASSPATH=$CLASSPATH:build/classes:build/testclasses:etc
ant -Dant.build.javac.source=1.4 -Dant.build.javac.target=1.4 jar extras junitreport javadoc


# TEST org.hibernate.test.ejb3.lock.EJB3LockTest FAILED

# Testcase: testLockModeTypeRead took 0.138 sec FAILED
# isolation not maintained expected:<[lock test]> but was:<[updated]>

# TEST org.hibernate.test.hql.HQLTest FAILED

# (known issues, fails with sun and bea)
# Testcase: testEmptyInListFailureExpected took 0.013 sec FAILED
# Old query translator did not throw an exception, the new one did
# Testcase: testMaxindexHqlFunctionInElementAccessorFailureExpected took 0.016 sec        FAILED
# SQL is not the same as the old SQL (scalar=true)
# Testcase: testMultipleElementAccessorOperatorsFailureExpected took 0.017 sec FAILED
# SQL is not the same as the old SQL (scalar=true)
# Testcase: testKeyManyToOneJoinFailureExpected took 0.003 sec         FAILED
# New query translator did *NOT* throw an exception, the old one did : org.hibernate.QueryException: BY expected after GROUP or ORDER: o [from Order o left join fetch o.lineItems li left join fetch li.product p]
# Testcase: testDuplicateExplicitJoinFailureExpected took 0.014 sec FAILED
# SQL is not the same as the old SQL (scalar=true)

# TEST org.hibernate.test.legacy.IJ2Test FAILED

# Testcase: testUnionSubclass took 0.181 sec Caused an ERROR
# could not set a field value by reflection setter of org.hibernate.test.legacy.J.amount

# TEST org.hibernate.test.legacy.SQLLoaderTest FAILED

# Testcase: testReturnPropertyComponentRename took 0.019 sec Caused an ERROR
# could not execute query Caused by: java.sql.SQLException: Column not found: subName
# (known with hsqldb?, fails with sun and bea)

# TEST org.hibernate.test.optlock.OptimisticLockTest FAILED

# Testcase: testOptimisticLockDirtyDeleteFailureExpected took 0.01 sec FAILED
# Should fail since other session have update the summary
# Testcase: testOptimisticLockAllDeleteFailureExpected took 0.071 sec FAILED
# Should fail since other session have update the summary

# TEST org.hibernate.test.readonly.ReadOnlyTest FAILED

# Testcase: testReadOnlyOnProxiesFailureExpected took 0.074 sec Caused an ERROR
# Instance was not associated with the session
# (known with hsqldb?, fails with sun and bea)

# TEST org.hibernate.test.unionsubclass.UnionSubclassTest FAILED

# Testcase: testUnionSubclass took 0.166 sec FAILED
# null
# Testcase: testUnionSubclassManyToOne took 0.053 sec Caused an ERROR
# attempt to create delete event with null entity



%install

# jars

mkdir -p $RPM_BUILD_ROOT%{_javadir}

cp -p %{name}.jar \
 $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)

mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/etc
cp -p etc/* $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/etc

# javadoc

mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr doc/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
rm -rf doc/api

# manual

mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -p lgpl.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -pr doc/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}

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

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

%files
%doc %{_docdir}/%{name}-%{version}/lgpl.txt
%{_javadir}/*.jar
%{_datadir}/%{name}-%{version}

%files javadoc
%{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}

%files manual
%{_docdir}/%{name}-%{version}

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin