Group :: Development/Java
RPM: c3p0
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
BuildRequires: /proc
BuildRequires: jpackage-1.4-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.
#
Summary: JDBC DataSources/Resource Pools
Name: c3p0
Version: 0.9.0
Release: alt2_2jpp1.7
Epoch: 0
License: LGPL
URL: http://sourceforge.net/projects/c3p0
Group: Development/Java
Source0: c3p0-0.9.0.src.tgz
BuildRequires: jpackage-utils >= 0:1.5
BuildRequires: ant
#BuildRequires: junit
Requires: alternatives >= 0:0.2.0-alt0.12
Provides: hibernate_jdbc_cache
BuildArch: noarch
%description
c3p0 is an easy-to-use library for augmenting
traditional (DriverManager-based) JDBC drivers
with JNDI-bindable DataSources, including
DataSources that implement Connection and Statement
Pooling, as described by the jdbc3 spec and jdbc2
standard extension.
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Documentation
%description javadoc
Javadoc for %{name}.
%prep
%setup -q -n %{name}-%{version}.src
# remove all binary libs
find . -name "*.jar" -exec rm -f {} \;
%build
#export CLASSPATH=$(build-classpath \
#junit)
#ant -Dbuild.sysclasspath=first open-dist stats-test benchmark-test load-test psload-test refser-test
export CLASSPATH=
ant -Dbuild.sysclasspath=first open-dist
%install
# jars
mkdir -p $RPM_BUILD_ROOT%{_javadir}
cp -p dist/%{name}-%{version}.bin/lib/%{name}-%{version}.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)
# javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr build/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
# hibernate_jdbc_cache ghost symlink
ln -s %{_sysconfdir}/alternatives \
$RPM_BUILD_ROOT%{_javadir}/hibernate_jdbc_cache.jar
install -d $RPM_BUILD_ROOT/%_altdir; cat >$RPM_BUILD_ROOT/%_altdir/hibernate_jdbc_cache_%{name}<<EOF
%{_javadir}/hibernate_jdbc_cache.jar %{_javadir}/%{name}.jar 20
EOF
%post
%register_alternatives hibernate_jdbc_cache_%{name}
%preun
{
[ $1 -eq 0 ] || exit 0
%unregister_alternatives hibernate_jdbc_cache_%{name}
} >/dev/null 2>&1 || :
%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}
%postun javadoc
if [ "$1" = "0" ]; then
rm -f %{_javadocdir}/%{name}
fi
%files
%_altdir/hibernate_jdbc_cache_%{name}
%doc src/dist-static/LICENSE
%doc src/doc/index.html
%{_javadir}/*
%exclude %{_javadir}/hibernate_jdbc_cache.jar
%files javadoc
%{_javadocdir}/*
%changelog
…
Full changelog you can see here
BuildRequires: jpackage-1.4-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.
#
Summary: JDBC DataSources/Resource Pools
Name: c3p0
Version: 0.9.0
Release: alt2_2jpp1.7
Epoch: 0
License: LGPL
URL: http://sourceforge.net/projects/c3p0
Group: Development/Java
Source0: c3p0-0.9.0.src.tgz
BuildRequires: jpackage-utils >= 0:1.5
BuildRequires: ant
#BuildRequires: junit
Requires: alternatives >= 0:0.2.0-alt0.12
Provides: hibernate_jdbc_cache
BuildArch: noarch
%description
c3p0 is an easy-to-use library for augmenting
traditional (DriverManager-based) JDBC drivers
with JNDI-bindable DataSources, including
DataSources that implement Connection and Statement
Pooling, as described by the jdbc3 spec and jdbc2
standard extension.
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Documentation
%description javadoc
Javadoc for %{name}.
%prep
%setup -q -n %{name}-%{version}.src
# remove all binary libs
find . -name "*.jar" -exec rm -f {} \;
%build
#export CLASSPATH=$(build-classpath \
#junit)
#ant -Dbuild.sysclasspath=first open-dist stats-test benchmark-test load-test psload-test refser-test
export CLASSPATH=
ant -Dbuild.sysclasspath=first open-dist
%install
# jars
mkdir -p $RPM_BUILD_ROOT%{_javadir}
cp -p dist/%{name}-%{version}.bin/lib/%{name}-%{version}.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)
# javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr build/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
# hibernate_jdbc_cache ghost symlink
ln -s %{_sysconfdir}/alternatives \
$RPM_BUILD_ROOT%{_javadir}/hibernate_jdbc_cache.jar
install -d $RPM_BUILD_ROOT/%_altdir; cat >$RPM_BUILD_ROOT/%_altdir/hibernate_jdbc_cache_%{name}<<EOF
%{_javadir}/hibernate_jdbc_cache.jar %{_javadir}/%{name}.jar 20
EOF
%post
%register_alternatives hibernate_jdbc_cache_%{name}
%preun
{
[ $1 -eq 0 ] || exit 0
%unregister_alternatives hibernate_jdbc_cache_%{name}
} >/dev/null 2>&1 || :
%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}
%postun javadoc
if [ "$1" = "0" ]; then
rm -f %{_javadocdir}/%{name}
fi
%files
%_altdir/hibernate_jdbc_cache_%{name}
%doc src/dist-static/LICENSE
%doc src/doc/index.html
%{_javadir}/*
%exclude %{_javadir}/hibernate_jdbc_cache.jar
%files javadoc
%{_javadocdir}/*
%changelog
…
Full changelog you can see here