rpms/jakarta-commons-dbcp/devel jakarta-commons-dbcp.spec, 1.14, 1.15
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Jul 20 22:00:40 UTC 2006
Author: dbhole
Update of /cvs/dist/rpms/jakarta-commons-dbcp/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv15498
Modified Files:
jakarta-commons-dbcp.spec
Log Message:
Added conditional native compilation.
Index: jakarta-commons-dbcp.spec
===================================================================
RCS file: /cvs/dist/rpms/jakarta-commons-dbcp/devel/jakarta-commons-dbcp.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- jakarta-commons-dbcp.spec 12 Jul 2006 06:28:12 -0000 1.14
+++ jakarta-commons-dbcp.spec 20 Jul 2006 22:00:38 -0000 1.15
@@ -1,43 +1,117 @@
+# 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 _with_gcj_support 1
+%define _without_maven 1
+
+%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 build with maven, and use straight ant instead,
+# give rpmbuild option '--without maven'
+
+%define with_maven %{!?_without_maven:1}%{?_without_maven:0}
+%define without_maven %{?_without_maven:1}%{!?_without_maven:0}
+
%define base_name dbcp
%define short_name commons-%{base_name}
-%define name jakarta-%{short_name}
-%define version 1.2.1
-%define release 3jpp_4fc
%define section free
-Name: %{name}
-Version: %{version}
-Release: %{release}
+Name: jakarta-commons-dbcp
+Version: 1.2.1
+Release: 5jpp_1fc
Epoch: 0
Summary: Jakarta Commons DataBase Pooling Package
-License: Apache Software License
+License: Apache Software License 2.0
Group: Development/Libraries/Java
+Vendor: JPackage Project
+Distribution: JPackage
Source0: %{short_name}-%{version}-src-RHCLEAN.tar.bz2
+Source1: pom-maven2jpp-depcat.xsl
+Source2: pom-maven2jpp-newdepmap.xsl
+Source3: pom-maven2jpp-mapdeps.xsl
+Source4: %{base_name}-%{version}-jpp-depmap.xml
+Source5: commons-build.tar.gz
+
+Patch0: commons-dbcp-1.2.1-project_xml.patch
+Patch1: commons-dbcp-1.2.1-TestJOCLed.patch
+Patch2: commons-dbcp-1.2.1-TestConnectionPool.patch
+Patch3: commons-dbcp-1.2.1-navigation_xml.patch
+Patch4: commons-dbcp-1.2.1-project_properties.patch
+
Url: http://jakarta.apache.org/commons/%{base_name}
BuildRequires: ant
BuildRequires: jakarta-commons-collections >= 2.0
BuildRequires: jakarta-commons-pool >= 1.1
BuildRequires: jdbc-stdext >= 2.0
-BuildRequires: xml-commons-apis
-BuildRequires: jpackage-utils > 1.4
-BuildRequires: junit >= 3.7
+BuildRequires: xerces-j2
+BuildRequires: xml-commons-apis >= 0:1.3
+BuildRequires: jpackage-utils > 1.6
+BuildRequires: junit >= 3.8
+%if %{with_maven}
+BuildRequires: maven >= 0:1.1
+BuildRequires: saxon
+BuildRequires: saxon-scripts
+%endif
+
Requires: /usr/sbin/update-alternatives
Requires: jakarta-commons-collections >= 2.0
Requires: jakarta-commons-pool >= 1.1
+%if ! %{gcj_support}
BuildArch: noarch
+%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
+Provides: %{short_name}
Provides: hibernate_jdbc_cache
-# FC2
-Obsoletes: %{short_name} <= 1.1
+Obsoletes: %{short_name}
+
+%if %{gcj_support}
+BuildRequires: java-gcj-compat-devel
+Requires(post): java-gcj-compat
+Requires(postun): java-gcj-compat
+%endif
%description
-The DBCP package shall create and maintain a database connection pool
-package written in the Java language to be distributed under the ASF
-license. The package shall be available as a pseudo-JDBC driver and
-via a DataSource interface. The package shall also support multiple
-logins to multiple database systems, reclamation of stale or dead
-connections, testing for valid connections, PreparedStatement
-pooling, and other features.
+Many Jakarta projects support interaction with a relational
+database. Creating a new connection for each user can be time
+consuming (often requiring multiple seconds of clock time),
+in order to perform a database transaction that might take
+milliseconds. Opening a connection per user can be unfeasible
+in a publicly-hosted Internet application where the number of
+simultaneous users can be very large. Accordingly, developers
+often wish to share a "pool" of open connections between all
+of the application's current users. The number of users actually
+performing a request at any given time is usually a very small
+percentage of the total number of active users, and during
+request processing is the only time that a database connection
+is required. The application itself logs into the DBMS, and
+handles any user account issues internally.
%package javadoc
Summary: Javadoc for %{name}
@@ -46,27 +120,105 @@
%description javadoc
Javadoc for %{name}.
+%if %{with_maven}
+%package manual
+Summary: Documents for %{name}
+Group: Development/Documentation
+
+%description manual
+%{summary}.
+%endif
+
%prep
+cat <<EOT
+
+ If you dont want to build with maven,
+ give rpmbuild option '--without maven'
+
+EOT
+
rm -rf $RPM_BUILD_ROOT
%setup -q -n %{short_name}-%{version}
# quick hack
cp LICENSE.txt ../LICENSE
# remove all binary libs
find . -name "*.jar" -exec rm -f {} \;
+gzip -dc %{SOURCE5} | tar xf -
+
+%patch0 -b .sav
+%patch1 -b .sav
+%patch2 -b .sav
+%patch3 -b .sav
+%patch4 -b .sav
%build
-export CLASSPATH=$(build-classpath commons-collections commons-pool jdbc-stdext junit)
-ant -Djava.io.tmpdir=. dist
+%if %{with_maven}
+export DEPCAT=$(pwd)/%{base_name}-%{version}-depcat.new.xml
+echo '<?xml version="1.0" standalone="yes"?>' > $DEPCAT
+echo '<depset>' >> $DEPCAT
+for p in $(find . -name project.xml); do
+ pushd $(dirname $p)
+ /usr/bin/saxon project.xml %{SOURCE1} >> $DEPCAT
+ popd
+done
+echo >> $DEPCAT
+echo '</depset>' >> $DEPCAT
+/usr/bin/saxon $DEPCAT %{SOURCE2} > %{base_name}-%{version}-depmap.new.xml
+
+for p in $(find . -name project.xml); do
+ pushd $(dirname $p)
+ cp project.xml project.xml.orig
+ /usr/bin/saxon -o project.xml project.xml.orig %{SOURCE3} map=%{SOURCE4}
+ popd
+done
+mkdir -p .maven/repository/JPP/jars
+pushd .maven/repository/JPP/jars
+ ln -sf $(build-classpath jdbc-stdext) jdbc.jar
+popd
+
+maven \
+ -Dmaven.repo.remote=file:/usr/share/maven/repository \
+ -Dmaven.home.local=$(pwd)/.maven \
+ jar javadoc xdoc:transform
+%else
+
+export CLASSPATH=$(build-classpath jdbc-stdext xerces-j2)
+ant \
+ -Dbuild.sysclasspath=first \
+ -Dcommons-pool.jar=$(build-classpath commons-pool) \
+ -Dcommons-collections.jar=$(build-classpath commons-collections) \
+ -Djunit.jar=$(build-classpath junit) \
+ -Djndi.jar=$(build-classpath jndi) \
+ -Dsax2.jar=$(build-classpath xml-commons-apis) \
+ -Djava.io.tmpdir=. \
+ dist test
+%endif
%install
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
+%if %{with_maven}
+install -m 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
+%else
install -m 644 dist/%{short_name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
+%endif
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"`; done)
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+%if %{with_maven}
+cp -pr target/docs/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+rm -rf target/docs/apidocs
+%else
cp -pr dist/docs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+%endif
+ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
+
+%if %{with_maven}
+# manual
+install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+cp -pr target/docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+%endif
# quick hack clean up
rm ../LICENSE
@@ -76,6 +228,10 @@
$RPM_BUILD_ROOT%{_javadir}/hibernate_jdbc_cache.jar
+%if %{gcj_support}
+%{_bindir}/aot-compile-rpm
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -83,59 +239,72 @@
update-alternatives --install %{_javadir}/hibernate_jdbc_cache.jar \
hibernate_jdbc_cache %{_javadir}/%{name}.jar 60
+%if %{gcj_support}
+if [ -x %{_bindir}/rebuild-gcj-db ]
+then
+ %{_bindir}/rebuild-gcj-db
+fi
+%endif
+
%preun
{
[ $1 -eq 0 ] || exit 0
update-alternatives --remove hibernate_jdbc_cache %{_javadir}/%{name}.jar
} >/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
%defattr(-,root,root)
%doc LICENSE.txt
%{_javadir}/*
%ghost %{_javadir}/hibernate_jdbc_cache.jar
+%if %{gcj_support}
+%attr(-,root,root) %{_libdir}/gcj/%{name}
+%endif
+
%files javadoc
%defattr(-,root,root)
-%{_javadocdir}/%{name}-%{version}
-
-%changelog
-* Wed Jul 12 2006 Jesse Keating <jkeating at redhat.com> - 0:1.2.1-3jpp_4fc
-- rebuild
-
-* Wed Dec 21 2005 Jesse Keating <jkeating at redhat.com> - 0:1.2.1-3jpp_3fc
-- rebuilt again
-
-* Fri Dec 09 2005 Jesse Keating <jkeating at redhat.com>
-- rebuilt
+%doc %{_javadocdir}/%{name}-%{version}
+%ghost %{_javadocdir}/%{name}
-* Tue Jun 21 2005 Gary Benson <gbenson at redhat.com> - 0:1.2.1-3jpp_2fc
-- Remove jarfile from the tarball.
+%if %{with_maven}
+%files manual
+%defattr(0644,root,root,0755)
+%doc %{_docdir}/%{name}-%{version}
+%endif
-* Thu Jan 20 2005 Gary Benson <gbenson at redhat.com> - 0:1.2.1-3jpp_1fc
-- Build into Fedora.
+%changelog
+* Thu Jul 20 2006 Deepak Bhole <dbhole at redhat.com> 0:1.2.1-5jpp_1fc
+- Added conditional native compilation.
-* Tue Nov 02 2004 Fernando Nasser <fnasser at redhat.com> 0:1.2.1-0.hjc.3jpp_1rh
-- Import latest community version
+* Wed Apr 12 2006 Ralph Apel <r.apel at r-apel.de> - 0:1.2.1-4jpp
+- First JPP-1.7 release
+- Build with maven by default
+- Add option to build with straight ant
+- Add -manual subpackage when built with maven
+- Backported TestJOCLed from HEAD
-* Tue Nov 02 2004 Fernando Nasser <fnasser at redhat.com> 0:1.2.1-0.hjc.3jpp
-- Bump version to make provide hibernate_jdbc_cache official
+* Tue Nov 02 2004 Fernando Nasser <fnasser at redhat.com> - 0:1.2.1-3jpp
+- Bump release to make provide hibernate_jdbc_cache official
* Tue Aug 24 2004 Randy Watler <rwatler at finali.com> - 0:1.2.1-0.hjc.2jpp
- Rebuild with ant-1.6.2
-* Wed Jul 21 2004 Fernando Nasser <fnasser at redhat.com> 0:1.2.1-1jpp_1rh
-- Import latest community version
-
* Fri Jul 02 2004 Ralph Apel <r.apel at r-apel.de> 0:1.2.1-0.hjc.1jpp
- Provide hibernate_jdbc_cache and di update-alternatives, prio 60
* Thu Jun 24 2004 Kaj J. Niemi <kajtzu at fi.basen.net> 0:1.2.1-1jpp
- Update to 1.2.1 (tomcat 5.0.27 wants it)
-* Thu Mar 4 2004 Frank Ch. Eigler <fche at redhat.com> 0:1.1-1jpp_1rh
-- RH vacuuming
-
* Mon Oct 27 2003 Henri Gomez <hgomez at users.sourceforge.net> 1.1-1jpp
- common-dbcp 1.1
More information about the fedora-cvs-commits
mailing list