b608779
%global     builddir        build-mysql-jdbc
b608779
%global     distdir         dist-mysql-jdbc
b608779
%global     gcj_support     1
b608779
%global     java6_rtpath    %{java_home}/jre/lib/rt.jar
b608779
%global     java6_javacpath /usr/bin/javac
b608779
%global     java6_javapath  /usr/bin/javac
b608779
b608779
Summary:    Official JDBC driver for MySQL
b608779
Name:       mysql-connector-java
40a62bd
Version:    5.1.12
b608779
Release:    1%{?dist}
b608779
Epoch:      1 
799cd1a
26c18f5
# MySQL FLOSS Exception
b608779
License:    GPLv2 with exceptions
b608779
Group:      System Environment/Libraries
b608779
URL:        http://dev.mysql.com/downloads/connector/j/
b608779
799cd1a
# Mysql has a mirror redirector for its downloads
799cd1a
# You can get this tarball by following a link from:
799cd1a
# http://dev.mysql.com/get/Downloads/Connector-J/%{name}-%{version}.tar.gz/from/pick#mirrors
799cd1a
#
799cd1a
# Following prebuilt jars have been removed from the tarball:
Igor Foox 1678fab
#
799cd1a
# %{name}-%{version}-bin.jar
799cd1a
# src/lib/ant-contrib.jar
799cd1a
# src/lib/commons-logging.jar
799cd1a
# src/lib/Commons-Logging-LICENSE.txt
799cd1a
# src/lib/c3p0-LICENSE
799cd1a
# src/lib/c3p0-0.9.1-pre6.jar
799cd1a
# src/lib/jboss-common-jdbc-wrapper.jar
799cd1a
# src/lib/jboss-lgpl.txt
799cd1a
# src/lib/jdbc2_0-stdext.jar
799cd1a
# src/lib/jta-spec1_0_1.jar
Igor Foox 1678fab
# src/lib/junit.jar
799cd1a
# src/lib/LICENSE-AspectJ.html
Igor Foox 1678fab
# src/lib/log4j-1.2.9.jar
799cd1a
#
799cd1a
# See http://bugs.mysql.com/bug.php?id=28512 for details.
b608779
Source0:            %{name}-%{version}.tar.xz
799cd1a
b608779
BuildRoot:          %{_tmppath}/%{name}-%{epoch}-%{version}-%{release}-root-%(%{__id_u} -n)
Igor Foox 1678fab
%if %{gcj_support}
b608779
BuildRequires:      java-gcj-compat-devel >= 1.0.31
b608779
Requires(post):     java-gcj-compat >= 1.0.31
b608779
Requires(postun):   java-gcj-compat >= 1.0.31
Igor Foox 1678fab
%else
b608779
BuildRequires:      java-devel >= 1.4.2
b608779
Requires:           java >= 1.4.2
Igor Foox 1678fab
%endif
b608779
Requires:           jta >= 1.0
b608779
Requires:           log4j
b608779
BuildRequires:      ant >= 1.6.0
b608779
BuildRequires:      ant-contrib >= 1.0
b608779
BuildRequires:      java-devel >= 1.4.0
b608779
BuildRequires:      jpackage-utils >= 1.6
b608779
BuildRequires:      jta >= 1.0
b608779
BuildRequires:      junit
b608779
BuildRequires:      log4j
b608779
BuildRequires:      java-1.6.0-openjdk-devel
b608779
BuildRequires:      java-1.5.0-gcj-devel
b608779
BuildRequires:      jakarta-commons-logging
759828d
759828d
Requires:               jpackage-utils
759828d
Requires(post):         jpackage-utils
759828d
Requires(postun):       jpackage-utils
759828d
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
799cd1a
sed -i 's/\r//' README
799cd1a
sed -i 's/\r//' docs/README
799cd1a
sed -i 's/\r//' EXCEPTIONS-CONNECTOR-J
Igor Foox 1678fab
Igor Foox 1678fab
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)
b608779
export CLASSPATH=$(build-classpath jdbc-stdext jta junit log4j commons-logging.jar)
799cd1a
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-gcj
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
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}
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
759828d
# Install the Maven build information
759828d
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
759828d
install -pm 644 src/doc/sources/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
759828d
sed -i 's/>@.*%{version}</' $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
759828d
759828d
%add_to_maven_depmap mysql %{name} %{version} JPP %{name}
Igor Foox 1678fab
Igor Foox 1678fab
Igor Foox 1678fab
%post
759828d
%update_maven_depmap
759828d
%if %{gcj_support}
Igor Foox 1678fab
if [ -x %{_bindir}/rebuild-gcj-db ]
Igor Foox 1678fab
then
Igor Foox 1678fab
  %{_bindir}/rebuild-gcj-db
Igor Foox 1678fab
fi
759828d
%endif
Igor Foox 1678fab
Igor Foox 1678fab
%postun
759828d
%update_maven_depmap
759828d
%if %{gcj_support}
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
%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
759828d
%config(noreplace) %{_mavendepmapfragdir}/*
b608779
%{_mavenpomdir}/*.pom
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
40a62bd
* Fri Feb 19 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 1:5.1.12-1
40a62bd
- Update to 5.1.12
40a62bd
b608779
* Fri Jan 29 2010 Milos Jakubicek <xjakub@fi.muni.cz> 1:5.1.11-1
b608779
- Update to 5.1.11
b608779
b608779
* Thu Jan 21 2010 Tom Lane <tgl@redhat.com> 1:5.1.8-3
b608779
- Clean up rpmlint complaints (/usr/lib/ references, old provides/obsoletes,
b608779
  tab usage)
b608779
759828d
* Fri Dec  4 2009 Mary Ellen Foster <mefoster at gmail.com> - 1:5.1.8-2
759828d
- Add Maven POM and depmap fragment
759828d
799cd1a
* Tue 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
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