1d812dc
%global     builddir        build-mysql-jdbc
1d812dc
%global     distdir         dist-mysql-jdbc
1d812dc
%global     java6_rtpath    %{java_home}/jre/lib/rt.jar
1d812dc
%global     java6_javacpath /usr/bin/javac
1d812dc
%global     java6_javapath  /usr/bin/javac
1d812dc
1d812dc
Summary:    Official JDBC driver for MySQL
1d812dc
Name:       mysql-connector-java
43a93da
Version:    5.1.26
a1b9386
Release:    2%{?dist}
1d812dc
Epoch:      1 
799cd1a
26c18f5
# MySQL FLOSS Exception
1d812dc
License:    GPLv2 with exceptions
1d812dc
Group:      System Environment/Libraries
1d812dc
URL:        http://dev.mysql.com/downloads/connector/j/
1d812dc
799cd1a
# Mysql has a mirror redirector for its downloads
799cd1a
# You can get this tarball by following a link from:
Milos Jakubicek 3d00a4e
# http://dev.mysql.com/get/Downloads/Connector-J/%{name}-%{version}.zip/from/pick#mirrors
799cd1a
#
Milos Jakubicek 3d00a4e
# Following prebuilt jars and sources have been removed from the tarball:
Igor Foox 1678fab
#
799cd1a
# %{name}-%{version}-bin.jar
799cd1a
# src/lib/ant-contrib.jar
799cd1a
# src/lib/c3p0-0.9.1-pre6.jar
Milos Jakubicek 3d00a4e
# src/lib/c3p0-0.9.1-pre6.src.zip
799cd1a
# src/lib/jboss-common-jdbc-wrapper.jar
Milos Jakubicek 3d00a4e
# src/lib/jboss-common-jdbc-wrapper-src.jar
Milos Jakubicek 5799ee1
# src/lib/slf4j-api-1.6.1.jar
799cd1a
#
799cd1a
# See http://bugs.mysql.com/bug.php?id=28512 for details.
a1b9386
Source0:            %{name}-%{version}-nojars.tar.xz
a1b9386
a1b9386
# To make it easier a script generate-tarball.sh has been created:
a1b9386
# ./generate-tarball.sh version
a1b9386
# will create a new tarball compressed with xz and without those jar files.
a1b9386
Source1:           generate-tarball.sh 
799cd1a
02d2870
# Patch to build with JDBC 4.1/Java 7
02d2870
Patch0:             %{name}-jdbc-4.1.patch
02d2870
Tom Lane fdabe1c
BuildArch:          noarch
Tom Lane fdabe1c
Tom Lane fdabe1c
BuildRequires:      java-devel >= 1:1.6.0
1d812dc
BuildRequires:      ant >= 1.6.0
1d812dc
BuildRequires:      ant-contrib >= 1.0
1d812dc
BuildRequires:      jpackage-utils >= 1.6
1d812dc
BuildRequires:      jta >= 1.0
1d812dc
BuildRequires:      junit
Milos Jakubicek 5799ee1
BuildRequires:      slf4j
f3d56c0
BuildRequires:      apache-commons-logging
ea9308d
Tom Lane fdabe1c
Requires:           java >= 1:1.6.0
Tom Lane fdabe1c
Requires:           jta >= 1.0
Tom Lane fdabe1c
Requires:           slf4j
ea9308d
Requires:               jpackage-utils
ea9308d
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
Milos Jakubicek 5161b82
rm README README.txt
Igor Foox 1678fab
Igor Foox 1678fab
# fix line endings
Milos Jakubicek 5161b82
sed -i 's/\r//' docs/README.txt
Igor Foox 1678fab
Milos Jakubicek 8f881df
%patch0 -p1 -F3
02d2870
Igor Foox 1678fab
%build
799cd1a
799cd1a
# We need both JDK1.5 (for JDBC3.0; appointed by $JAVA_HOME) and JDK1.6 (for JDBC4.0; appointed in the build.xml)
Milos Jakubicek 5799ee1
export CLASSPATH=$(build-classpath jdbc-stdext jta junit slf4j commons-logging.jar)
799cd1a
799cd1a
# We currently need to disable jboss integration because of missing jboss-common-jdbc-wrapper.jar (built from sources).
799cd1a
# See BZ#480154 and BZ#471915 for details.
799cd1a
rm -rf src/com/mysql/jdbc/integration/jboss
799cd1a
rm src/testsuite/regression/ConnectionRegressionTest.java
799cd1a
rm src/testsuite/regression/DataSourceRegressionTest.java
799cd1a
rm src/testsuite/simple/ReadOnlyCallableStatementTest.java
Milos Jakubicek 5161b82
rm src/testsuite/simple/jdbc4/StatementsTest.java
799cd1a
799cd1a
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}
799cd1a
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}
Milos Jakubicek 5161b82
install -m 644 %{builddir}/%{name}-%{version}-SNAPSHOT/%{name}-%{version}-SNAPSHOT-bin.jar \
a1b9386
    $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
Igor Foox 1678fab
ea9308d
# Install the Maven build information
Milos Jakubicek 9641809
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
Milos Jakubicek 9641809
install -pm 644 src/doc/sources/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
Milos Jakubicek 9641809
sed -i 's/>@.*%{version}</' $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
ea9308d
1905c72
%add_maven_depmap
Igor Foox 1678fab
Igor Foox 1678fab
%files
Milos Jakubicek 5161b82
%doc CHANGES COPYING docs
a1b9386
%{_javadir}/*.jar
ea9308d
%config(noreplace) %{_mavendepmapfragdir}/*
fef6b6f
%{_mavenpomdir}/*.pom
Igor Foox 1678fab
Igor Foox 1678fab
%changelog
a1b9386
* Thu Oct 24 2013 Honza Horak <hhorak@redhat.com> - 1:5.1.26-2
a1b9386
- Clean-up of the spec file, including gcj support
a1b9386
- Remove jar files from the tar ball
a1b9386
43a93da
* Wed Oct 23 2013 Honza Horak <hhorak@redhat.com> - 1:5.1.26-1
43a93da
- Update to 5.1.26
011ee30
- Remove versioned jars 
011ee30
  Resolves: #1022144
43a93da
1905c72
* Mon Aug 12 2013 Alexander Kurtakov <akurtako@redhat.com> 1:5.1.25-3
1905c72
- Fix FTBFS.
1905c72
ea9fdac
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:5.1.25-2
ea9fdac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
ea9fdac
e8e90d0
* Tue Jun 25 2013 Honza Horak <hhorak@redhat.com> - 1:5.1.25-1
e8e90d0
- Update to 5.1.25
e8e90d0
185abac
* Mon Apr  8 2013 Honza Horak <hhorak@redhat.com> - 1:5.1.24-1
185abac
- Update to 5.1.24
185abac
49a0210
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:5.1.22-2
49a0210
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
49a0210
Milos Jakubicek f63a713
* Tue Sep 11 2012 Miloš Jakubíček <xjakub@fi.muni.cz> - 1:5.1.22-1
Milos Jakubicek f63a713
- Update to 5.1.22
Milos Jakubicek f63a713
36dfc9e
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:5.1.21-3
36dfc9e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
36dfc9e
Milos Jakubicek 8f881df
* Tue Jul 10 2012 Miloš Jakubíček <xjakub@fi.muni.cz> - 1:5.1.21-2
Milos Jakubicek 8f881df
- More fuzz for mysql-connector-java-jdbc-4.1.patch
Milos Jakubicek 8f881df
Milos Jakubicek 23a0c28
* Tue Jul 10 2012 Miloš Jakubíček <xjakub@fi.muni.cz> - 1:5.1.21-1
Milos Jakubicek 23a0c28
- Update to 5.1.21
Milos Jakubicek 23a0c28
Tom Lane fdabe1c
* Sat May  5 2012 Tom Lane <tgl@redhat.com> 1:5.1.17-5
Tom Lane fdabe1c
- Switch to noarch (non-GCJ) build
Tom Lane fdabe1c
Resolves: #688937, #819139
Tom Lane fdabe1c
- Fix mysql-connector-java-jdbc-4.1.patch to cover both driver classes
Tom Lane fdabe1c
Related: #816696
Tom Lane fdabe1c
55b3183
* Wed Jan 25 2012 Deepak Bhole <dbhole@redhat.com> - 1:5.1.17-4
55b3183
- Removed java-1.6.0-openjdk-devel requirement
55b3183
02d2870
* Wed Jan 25 2012 Deepak Bhole <dbhole@redhat.com> - 1:5.1.17-3
02d2870
- Added patch to support build with JDBC 4.1/Java 7
02d2870
ceebe57
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:5.1.17-2
ceebe57
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ceebe57
Milos Jakubicek 3d00a4e
* Sat Aug 20 2011 Miloš Jakubíček <xjakub@fi.muni.cz> - 1:5.1.17-1
Milos Jakubicek 3d00a4e
- Update to 5.1.17
Milos Jakubicek 3d00a4e
Milos Jakubicek 5799ee1
* Thu Feb 10 2011 Miloš Jakubíček <xjakub@fi.muni.cz> - 1:5.1.15-1
Milos Jakubicek 5799ee1
- Update to 5.1.15, fix BZ#676464, changed BR: log4j to BR: slf4j
Milos Jakubicek 5799ee1
a0d1411
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:5.1.14-2
a0d1411
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a0d1411
Milos Jakubicek 5161b82
* Tue Jan 18 2011 Milos Jakubicek <xjakub@fi.muni.cz> - 1:5.1.14-1
Milos Jakubicek 5161b82
- Update to 5.1.14
Milos Jakubicek 5161b82
Milos Jakubicek 5161b82
* Fri Feb 19 2010 Milos Jakubicek <xjakub@fi.muni.cz> - 1:5.1.12-1
a1973a8
- Update to 5.1.12
a1973a8
fef6b6f
* Fri Jan 29 2010 Milos Jakubicek <xjakub@fi.muni.cz> 1:5.1.11-1
fef6b6f
- Update to 5.1.11
fef6b6f
1d812dc
* Thu Jan 21 2010 Tom Lane <tgl@redhat.com> 1:5.1.8-3
1d812dc
- Clean up rpmlint complaints (/usr/lib/ references, old provides/obsoletes,
1d812dc
  tab usage)
1d812dc
ea9308d
* Fri Dec  4 2009 Mary Ellen Foster <mefoster at gmail.com> - 1:5.1.8-2
ea9308d
- Add Maven POM and depmap fragment
ea9308d
52263db
* Wed Aug 26 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 1:5.1.8-1
799cd1a
- Update to 5.1.8 (resolves BZ#480154) with jboss integration disabled.
64c0625
- Added BR: java-1.6.0-openjdk-devel, java-1.5.0-gcj-devel, jakarta-commons-logging
799cd1a
- Minor spec file updates: %%global instead of %%define, tabs instead of spaces
799cd1a
- Dropped unnecessary patch-build.xml and mysql-connector-java-noSunAppletSecurity.patch
799cd1a
cc89da5
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.1.12-8
cc89da5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
cc89da5
43fc251
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.1.12-7
43fc251
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
43fc251
799cd1a
* Mon Aug 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1:3.1.12-6
26c18f5
- fix license tag
26c18f5
799cd1a
* 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
799cd1a
* 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
52263db
* Sat 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
52263db
* Sun 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