ecf8c6f
%global		builddir		build-mysql-jdbc
ecf8c6f
%global		distdir			dist-mysql-jdbc
ecf8c6f
%global		gcj_support		1
ecf8c6f
%global		java6_rtpath	/usr/lib/jvm/java-1.6.0/jre/lib/rt.jar
ecf8c6f
%global		java6_javacpath	/usr/lib/jvm/java-1.6.0/bin/javac
ecf8c6f
%global		java6_javapath	/usr/lib/jvm/java-1.6.0/bin/javac
ecf8c6f
ecf8c6f
Summary:	Official JDBC driver for MySQL
ecf8c6f
Name:		mysql-connector-java
ecf8c6f
Version:	5.1.8
ecf8c6f
Release:	1%{?dist}
ecf8c6f
Epoch:		1 
ecf8c6f
26c18f5
# MySQL FLOSS Exception
ecf8c6f
License:	GPLv2 with exceptions
ecf8c6f
Group:		System Environment/Libraries
ecf8c6f
# Mysql has a mirror redirector for its downloads
ecf8c6f
# You can get this tarball by following a link from:
ecf8c6f
# http://dev.mysql.com/get/Downloads/Connector-J/%{name}-%{version}.tar.gz/from/pick#mirrors
ecf8c6f
#
ecf8c6f
# Following prebuilt jars have been removed from the tarball:
Igor Foox 1678fab
#
ecf8c6f
# %{name}-%{version}-bin.jar
ecf8c6f
# src/lib/ant-contrib.jar
ecf8c6f
# src/lib/commons-logging.jar
ecf8c6f
# src/lib/Commons-Logging-LICENSE.txt
ecf8c6f
# src/lib/c3p0-LICENSE
ecf8c6f
# src/lib/c3p0-0.9.1-pre6.jar
ecf8c6f
# src/lib/jboss-common-jdbc-wrapper.jar
ecf8c6f
# src/lib/jboss-lgpl.txt
ecf8c6f
# src/lib/jdbc2_0-stdext.jar
ecf8c6f
# src/lib/jta-spec1_0_1.jar
Igor Foox 1678fab
# src/lib/junit.jar
ecf8c6f
# src/lib/LICENSE-AspectJ.html
Igor Foox 1678fab
# src/lib/log4j-1.2.9.jar
ecf8c6f
#
ecf8c6f
# See http://bugs.mysql.com/bug.php?id=28512 for details.
ecf8c6f
ecf8c6f
Source0:			%{name}-%{version}.tar.gz
ecf8c6f
URL:				http://dev.mysql.com/downloads/connector/j/5.1.html
ecf8c6f
BuildRoot:			%{_tmppath}/%{name}-%{epoch}-%{version}-%{release}-root-%(%{__id_u} -n)
Igor Foox 1678fab
%if %{gcj_support}
ecf8c6f
BuildRequires:		java-gcj-compat-devel >= 1.0.31
ecf8c6f
Requires(post):		java-gcj-compat >= 1.0.31
ecf8c6f
Requires(postun):	java-gcj-compat >= 1.0.31
Igor Foox 1678fab
%else
ecf8c6f
BuildRequires:		java-devel >= 1.4.2
ecf8c6f
Requires:			java >= 1.4.2
Igor Foox 1678fab
%endif
ecf8c6f
Requires:			jta >= 1.0
ecf8c6f
Requires:			log4j
ecf8c6f
BuildRequires:		ant >= 1.6.0
ecf8c6f
BuildRequires:		ant-contrib >= 1.0
ecf8c6f
BuildRequires:		java-devel >= 1.4.0
ecf8c6f
BuildRequires:		jpackage-utils >= 1.6
ecf8c6f
BuildRequires:		jta >= 1.0
ecf8c6f
BuildRequires:		junit
ecf8c6f
BuildRequires:		log4j
ecf8c6f
BuildRequires:		java-1.6.0-openjdk-devel
ecf8c6f
BuildRequires:		java-1.5.0-gcj-devel
ecf8c6f
BuildRequires:		jakarta-commons-logging
ecf8c6f
Provides:			mm.mysql
ecf8c6f
Obsoletes:			mm.mysql
Igor Foox 1678fab
Igor Foox 1678fab
%description
Igor Foox 1678fab
MySQL Connector/J is a native Java driver that converts JDBC (Java Database
Igor Foox 1678fab
Connectivity) calls into the network protocol used by the MySQL database.
Igor Foox 1678fab
It lets developers working with the Java programming language easily build
Igor Foox 1678fab
programs and applets that interact with MySQL and connect all corporate
Igor Foox 1678fab
data, even in a heterogeneous environment. MySQL Connector/J is a Type
Igor Foox 1678fab
IV JDBC driver and has a complete JDBC feature set that supports the
Igor Foox 1678fab
capabilities of MySQL.
Igor Foox 1678fab
Igor Foox 1678fab
%prep
Igor Foox 1678fab
%setup -q -n %{name}-%{version}
Igor Foox 1678fab
Igor Foox 1678fab
# Remove duplicate README.txt files
Igor Foox 1678fab
rm README.txt
Igor Foox 1678fab
rm docs/README.txt
Igor Foox 1678fab
Igor Foox 1678fab
# fix line endings
ecf8c6f
sed -i 's/\r//' README
ecf8c6f
sed -i 's/\r//' docs/README
ecf8c6f
sed -i 's/\r//' EXCEPTIONS-CONNECTOR-J
Igor Foox 1678fab
Igor Foox 1678fab
Igor Foox 1678fab
%build
ecf8c6f
ecf8c6f
# We need both JDK1.5 (for JDBC3.0; appointed by $JAVA_HOME) and JDK1.6 (for JDBC4.0; appointed in the build.xml)
ecf8c6f
export CLASSPATH=$(build-classpath ant-contrib jdbc-stdext jta junit log4j commons-logging.jar)
ecf8c6f
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-gcj
ecf8c6f
ecf8c6f
# We currently need to disable jboss integration because of missing jboss-common-jdbc-wrapper.jar (built from sources).
ecf8c6f
# See BZ#480154 and BZ#471915 for details.
ecf8c6f
rm -rf src/com/mysql/jdbc/integration/jboss
ecf8c6f
rm src/testsuite/regression/ConnectionRegressionTest.java
ecf8c6f
rm src/testsuite/regression/DataSourceRegressionTest.java
ecf8c6f
rm src/testsuite/simple/ReadOnlyCallableStatementTest.java
ecf8c6f
ecf8c6f
ant -DbuildDir=%{builddir} -DdistDir=%{distdir} -Dcom.mysql.jdbc.java6.rtjar=%{java6_rtpath} -Dcom.mysql.jdbc.java6.javac=%{java6_javacpath} -Dcom.mysql.jdbc.java6.java=%{java6_javapath}
ecf8c6f
Igor Foox 1678fab
Igor Foox 1678fab
%install
Igor Foox 1678fab
rm -rf $RPM_BUILD_ROOT
Igor Foox 1678fab
Igor Foox 1678fab
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
Igor Foox 1678fab
install -m 644 %{builddir}/%{name}-%{version}/%{name}-%{version}-bin.jar \
Igor Foox 1678fab
    $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
Igor Foox 1678fab
Igor Foox 1678fab
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*.jar; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
Igor Foox 1678fab
Igor Foox 1678fab
# natively compile
Igor Foox 1678fab
%if %{gcj_support}
Igor Foox 1678fab
%{_bindir}/aot-compile-rpm
Igor Foox 1678fab
%endif
Igor Foox 1678fab
Igor Foox 1678fab
Igor Foox 1678fab
%if %{gcj_support}
Igor Foox 1678fab
Igor Foox 1678fab
%post
Igor Foox 1678fab
if [ -x %{_bindir}/rebuild-gcj-db ]
Igor Foox 1678fab
then
Igor Foox 1678fab
  %{_bindir}/rebuild-gcj-db
Igor Foox 1678fab
fi
Igor Foox 1678fab
Igor Foox 1678fab
%postun
Igor Foox 1678fab
if [ -x %{_bindir}/rebuild-gcj-db ]
Igor Foox 1678fab
then
Igor Foox 1678fab
  %{_bindir}/rebuild-gcj-db
Igor Foox 1678fab
fi
Igor Foox 1678fab
Igor Foox 1678fab
%endif
Igor Foox 1678fab
Igor Foox 1678fab
%clean
Igor Foox 1678fab
rm -rf $RPM_BUILD_ROOT
Igor Foox 1678fab
Igor Foox 1678fab
%files
Igor Foox 1678fab
%defattr(0644,root,root,0755)
Igor Foox 1678fab
%doc CHANGES COPYING EXCEPTIONS-CONNECTOR-J README docs
Igor Foox 1678fab
%attr(0644,root,root) %{_javadir}/*.jar
Igor Foox 1678fab
%if %{gcj_support}
Igor Foox 1678fab
%attr(-,root,root) %{_libdir}/gcj/%{name}
Igor Foox 1678fab
%endif
Igor Foox 1678fab
Igor Foox 1678fab
%changelog
ecf8c6f
* Tue Aug 26 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 1:5.1.8-1
ecf8c6f
- Update to 5.1.8 (resolves BZ#480154) with jboss integration disabled.
ecf8c6f
- Added BR: java-1.6.0-openjdk-devel, java-1.5.0-gcj-devel, jakarta-commons-logging
ecf8c6f
- Minor spec file updates: %%global instead of %%define, tabs instead of spaces
ecf8c6f
- Dropped unnecessary patch-build.xml and mysql-connector-java-noSunAppletSecurity.patch
ecf8c6f
ecf8c6f
* Mon Aug 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1:3.1.12-6
26c18f5
- fix license tag
26c18f5
ecf8c6f
* Fri Apr 04 2008 Andrew Overholt <overholt@redhat.com> 1:3.1.12-5
Andrew Overholt ad5bf8f
- Rebuild for rhbz #234286.
Andrew Overholt ad5bf8f
be965dd
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1:3.1.12-4
be965dd
- Autorebuild for GCC 4.3
be965dd
ecf8c6f
* Thu Oct 05 2006 Christian Iseli <Christian.Iseli@licr.org> 1:3.1.12-3
39f2ab0
 - rebuilt for unwind info generation, broken in gcc-4.1.1-21
39f2ab0
Igor Foox 128f8d9
* Thu Sep 21 2006 Igor Foox <ifoox@redhat.com> 1:3.1.12-2
Igor Foox 128f8d9
- Remove jpp string from release.
Igor Foox 128f8d9
Igor Foox 1678fab
* Fri Sep 08 2006 Igor Foox <ifoox@redhat.com> 1:3.1.12-1jpp_5fc
Igor Foox 1678fab
- Add dist tag.
Igor Foox 1678fab
Igor Foox 1678fab
* Thu Sep 07 2006 Igor Foox <ifoox@redhat.com> 1:3.1.12-1jpp_4fc
Igor Foox 1678fab
- Fix indentation of preamble.
Igor Foox 1678fab
- Fix version and epoch of jta Requires.
Igor Foox 1678fab
- Fix Group from Development/Libraries to System Environment/Libraries.
Igor Foox 1678fab
Igor Foox 1678fab
* Wed Sep 06 2006 Igor Foox <ifoox@redhat.com> 1:3.1.12-1jpp_3fc
Igor Foox 1678fab
- Remove duplicate readme files.
Igor Foox 1678fab
- Remove binary jars from distributed tarball, since they have no source
Igor Foox 1678fab
  attached to them, and are in violation of the LGPL.
Igor Foox 1678fab
- Change jta BR to 1.0 from 1.0.1 since geronimo-specs-compat is 1.0.
Igor Foox 1678fab
- Remove unneccessary 0 epoch from BRs.
Igor Foox 1678fab
Igor Foox 1678fab
* Thu Jul 20 2006 Igor Foox <ifoox@redhat.com> 1:3.1.12-1jpp_2fc
Igor Foox 1678fab
- Fix line endings.
Igor Foox 1678fab
- Change Group to standard Development/Java.
Igor Foox 1678fab
Igor Foox 1678fab
* Thu Jun 1 2006 Igor Foox <ifoox@redhat.com> 1:3.1.12-1jpp_1fc
Igor Foox 1678fab
- Natively compile
Igor Foox 1678fab
- Add mysql-connector-java-noSunAppletSecurity.patch to take out references
Igor Foox 1678fab
to sun classes
Igor Foox 1678fab
- Change BuildRoot to what Extras expects
Igor Foox 1678fab
Igor Foox 1678fab
* Thu Feb 2 2006 Jason Corley <jason.corley@gmail.com> 1:3.1.12-1jpp
Igor Foox 1678fab
- 3.1.12
Igor Foox 1678fab
- add some more docs from the tarball
Igor Foox 1678fab
- correct url
Igor Foox 1678fab
- remove vendor and distribution, should be defined in ~/.rpmmacros instead
Igor Foox 1678fab
Igor Foox 1678fab
* Sun May 14 2005 Jason Corley <jason.corley@gmail.com> 1:3.1.8-0.a.1jpp
Igor Foox 1678fab
- 3.1.8a
Igor Foox 1678fab
Igor Foox 1678fab
* Sun Feb 13 2005 Jason Corley <jason.corley@gmail.com> 1:3.1.6-1jpp
Igor Foox 1678fab
- Update to 3.1.6 now that it's considered stable
Igor Foox 1678fab
Igor Foox 1678fab
* Sat Feb 12 2005 Jason Corley <jason.corley@gmail.com> 1:3.0.16-1jpp
Igor Foox 1678fab
- Update to 3.0.16
Igor Foox 1678fab
Igor Foox 1678fab
* Mon Aug 23 2004 Fernando Nasser <fnasser@redhat.com> 1:3.0.14-1jpp
Igor Foox 1678fab
- Update to 3.0.14
Igor Foox 1678fab
- Rebuilt with Ant 1.6.2
Igor Foox 1678fab
Igor Foox 1678fab
* Wed Mar 24 2004 Kaj J. Niemi <kajtzu@fi.basen.net> 1:3.0.11-1jpp
Igor Foox 1678fab
- Bumped epoch, back to a "stable" release
Igor Foox 1678fab
Igor Foox 1678fab
* Fri Mar 19 2004 Kaj J. Niemi <kajtzu@fi.basen.net> 0:3.1.1-1jpp
Igor Foox 1678fab
- 3.1.1, supports stored procedures and SAVEPOINTs among other things.
Igor Foox 1678fab
- Tidy .spec file: nicer description and don't own %%{_javadir}
Igor Foox 1678fab
Igor Foox 1678fab
* Wed Jan 21 2004 David Walluck <david@anti-microsoft.org> 0:3.0.10-1jpp
Igor Foox 1678fab
- 3.0.10
Igor Foox 1678fab
- change group
Igor Foox 1678fab
Igor Foox 1678fab
* Wed Oct 05 2003 Henri Gomez <hgomez@users.sourceforge.net>  0:3.0.9-1jpp
Igor Foox 1678fab
- mysql-connector-j 3.0.9
Igor Foox 1678fab
Igor Foox 1678fab
* Mon Jul 07 2003 Henri Gomez <hgomez@users.sourceforge.net> 3.0.8.2jpp
Igor Foox 1678fab
- mysql-connector-j 3.0.8
Igor Foox 1678fab
- jar goes back in /usr/share/java
Igor Foox 1678fab
Igor Foox 1678fab
* Sun May 11 2003 David Walluck <david@anti-microsoft.org> 0:3.0.6-2jpp
Igor Foox 1678fab
- update for JPackage 1.5
Igor Foox 1678fab
Igor Foox 1678fab
* Tue Mar 25 2003 Nicolas Mailhot <Nicolas.Mailhot (at) JPackage.org> 3.0.6-1jpp
Igor Foox 1678fab
- For jpackage-utils 1.5
Igor Foox 1678fab
- New project name
Igor Foox 1678fab
- Requires java >= 1.4.1
Igor Foox 1678fab
Igor Foox 1678fab
* Thu Jun 06 2002 Henri Gomez <hgomez@users.sourceforge.net> 2.0.14.1jpp
Igor Foox 1678fab
- mm.mysql 2.0.14
Igor Foox 1678fab
Igor Foox 1678fab
* Tue May 07 2002 Henri Gomez <hgomez@users.sourceforge.net> 2.0.13.1jpp
Igor Foox 1678fab
- mm.mysql 2.0.13
Igor Foox 1678fab
Igor Foox 1678fab
* Tue Mar 26 2002 Henri Gomez <hgomez@users.sourceforge.net> 2.0.11.2jpp
Igor Foox 1678fab
- correct changelog
Igor Foox 1678fab
Igor Foox 1678fab
* Mon Feb 04 2002 Henri Gomez <hgomez@users.sourceforge.net>
Igor Foox 1678fab
- mm.mysql 2.0.11
Igor Foox 1678fab
Igor Foox 1678fab
* Thu Jan 17 2002 Henri Gomez <hgomez@users.sourceforge.net>
Igor Foox 1678fab
- mm.mysql 2.0.8
Igor Foox 1678fab
- seriously patch build.xml to make it compile on Linux boxes
Igor Foox 1678fab
  with both JDK 1.2/1.3 and 1.1
Igor Foox 1678fab
- added javadoc generation to build.xml
Igor Foox 1678fab
- changed manual to javadoc package
Igor Foox 1678fab
Igor Foox 1678fab
* Tue Feb 06 2001 Henri Gomez <hgomez@users.sourceforge.net>
Igor Foox 1678fab
- mm.mysql 2.0.4
Igor Foox 1678fab
- Fixes to getDecimal to fix decimal place wrong bug
Igor Foox 1678fab
Igor Foox 1678fab
* Mon Jan 15 2001 Henri Gomez <hgomez@users.sourceforge.net>
Igor Foox 1678fab
- Initial release mm.mysql 2.0.3
Igor Foox 1678fab
- detect jdbc-2.0 extension jar (javax.sql) and if present
Igor Foox 1678fab
  also build MysqlDataSource and MysqlDataSourceFactory
Igor Foox 1678fab
- build with IBM JDK 1.3.0 (cx130-20001114) and jikes 1.12
Igor Foox 1678fab
- build CLASSPATH=/usr/share/java/jdbc2_0-stdext.jar
Igor Foox 1678fab