Igor Foox 1678fab
%define            builddir       build-mysql-jdbc
Igor Foox 1678fab
%define            distdir        dist-mysql-jdbc
Igor Foox 1678fab
%define            gcj_support    1
Igor Foox 1678fab
Igor Foox 1678fab
Summary:           Official JDBC driver for MySQL
Igor Foox 1678fab
Name:              mysql-connector-java
Igor Foox 1678fab
Version:           3.1.12
Andrew Overholt ad5bf8f
Release:           5%{?dist}
Igor Foox 1678fab
Epoch:             1 
Igor Foox 1678fab
License:           GPL
Igor Foox 1678fab
Group:             System Environment/Libraries
Igor Foox 1678fab
# ************ NOTE ************
Igor Foox 1678fab
# The following files have been removed from the tarball to avoid licensing
Igor Foox 1678fab
# issues due to the fact that they are not distributed with their source.
Igor Foox 1678fab
#
Igor Foox 1678fab
# src/lib/ant-contrib.jar 
Igor Foox 1678fab
# src/lib/jta-spec1_0_1.jar 
Igor Foox 1678fab
# src/lib/junit.jar
Igor Foox 1678fab
# src/lib/log4j-1.2.9.jar
Igor Foox 1678fab
# src/lib/aspectjrt.jar 
Igor Foox 1678fab
# src/lib/aspectjtools.jar 
Igor Foox 1678fab
# src/lib/c3p0-0.8.5-pre8.jar 
Igor Foox 1678fab
# src/lib/jboss-common-jdbc-wrapper.jar 
Igor Foox 1678fab
# src/lib/jboss-lgpl.txt 
Igor Foox 1678fab
# src/lib/jdbc2_0-stdext.jar 
Igor Foox 1678fab
# mysql-connector-java-3.1.12-bin.jar
Igor Foox 1678fab
# debug/mysql-connector-java-3.1.12-bin-g.jar
Igor Foox 1678fab
Source0:           %{name}-%{version}.tar.gz
Igor Foox 1678fab
Patch0:            patch-build.xml
Igor Foox 1678fab
Patch1:            mysql-connector-java-noSunAppletSecurity.patch
Igor Foox 1678fab
URL:               http://dev.mysql.com/downloads/connector/j/3.1.html
Igor Foox 1678fab
BuildRoot:         %{_tmppath}/%{name}-%{epoch}-%{version}-%{release}-root-%(%{__id_u} -n)
Igor Foox 1678fab
%if %{gcj_support}
Igor Foox 1678fab
BuildRequires:     java-gcj-compat-devel >= 1.0.31
Igor Foox 1678fab
Requires(post):    java-gcj-compat >= 1.0.31
Igor Foox 1678fab
Requires(postun):  java-gcj-compat >= 1.0.31
Igor Foox 1678fab
%else
Igor Foox 1678fab
BuildRequires:     java-devel >= 1.4.2
Igor Foox 1678fab
Requires:          java >= 1.4.2
Igor Foox 1678fab
%endif
Igor Foox 1678fab
Requires:          jta >= 1.0
Igor Foox 1678fab
Requires:          log4j
Igor Foox 1678fab
BuildRequires:     ant >= 1.6.0
Igor Foox 1678fab
BuildRequires:     ant-contrib >= 1.0
Igor Foox 1678fab
BuildRequires:     java-devel >= 1.4.0
Igor Foox 1678fab
BuildRequires:     jpackage-utils >= 1.6
Igor Foox 1678fab
BuildRequires:     jta >= 1.0
Igor Foox 1678fab
BuildRequires:     junit
Igor Foox 1678fab
BuildRequires:     log4j
Igor Foox 1678fab
Provides:          mm.mysql
Igor Foox 1678fab
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
%patch0
Igor Foox 1678fab
%patch1
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
Igor Foox 1678fab
%{__sed} -i 's/\r//' README
Igor Foox 1678fab
%{__sed} -i 's/\r//' docs/README
Igor Foox 1678fab
%{__sed} -i 's/\r//' EXCEPTIONS-CONNECTOR-J
Igor Foox 1678fab
Igor Foox 1678fab
Igor Foox 1678fab
%build
Igor Foox 1678fab
export CLASSPATH=$(build-classpath ant-contrib jdbc-stdext jta junit log4j)
Igor Foox 1678fab
ant -DbuildDir=%{builddir} -DdistDir=%{distdir}
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
Andrew Overholt ad5bf8f
* Fri Apr 04 2008 Andrew Overholt <overholt@redhat.com> 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
39f2ab0
* Thu Oct 05 2006 Christian Iseli <Christian.Iseli@licr.org> 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