Sisyphus repository
Last update: 28 may 2023 | SRPMs: 18429 | Visits: 27842944
en ru br
ALT Linux repos
5.0: 5.0.8-alt1_1jpp1.7
4.1: 5.0.8-alt1_1jpp1.7
4.0: 5.0.8-alt1_1jpp1.7

Group :: System/Libraries
RPM: mysql-connector-java

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Group: System/Libraries
# BEGIN SourceDeps(oneline):
BuildRequires(pre): rpm-macros-java
# END SourceDeps(oneline)
BuildRequires: /proc rpm-build-java
#BuildRequires: jpackage-default
# see
%define _localstatedir %{_var}

Summary:       Official JDBC driver for MySQL
Name:          mysql-connector-java
Version:       8.0.30
Release:       alt1_2jpp11
Epoch:         1
License:       GPLv2 with exceptions
Source0:       %{name}-%{version}-nojars.tar.xz

# Mysql has a mirror redirector for its downloads

# You can get this tarball by following a link from:
# OR
# Following prebuilt jars and sources have been removed from the tarball:
# %%{name}-%%{version}-bin.jar
# lib/c3p0-0.9.1-pre6.jar
# lib/
# lib/jboss-common-jdbc-wrapper.jar
# lib/jboss-common-jdbc-wrapper-src.jar
# lib/protobuf-java-3.6.1.jar
# lib/slf4j-api-1.6.1.jar
# See for details.

# To make it easier a script has been created:

# ./ version
# will create a new tarball compressed with xz and without those jar files.

Patch1:        remove-coverage-test.patch
Patch2:        java-11-migration.patch
Patch3:        remove-authentication-plugin.patch
Patch4:        remove-StatementsTest.patch

BuildArch:     noarch

BuildRequires: ant >= 1.6.0
BuildRequires: ant-junit
BuildRequires: apache-commons-logging
BuildRequires: git
BuildRequires: javassist
BuildRequires: javapackages-local
BuildRequires: junit5
BuildRequires: protobuf-java
BuildRequires: slf4j
BuildRequires: java-17-openjdk-devel

Requires:      slf4j
Requires: java

MySQL Connector/J is a native Java driver that converts JDBC (Java Database
Connectivity) calls into the network protocol used by the MySQL database.
It lets developers working with the Java programming language easily build
programs and applets that interact with MySQL and connect all corporate
data, even in a heterogeneous environment. MySQL Connector/J is a Type
IV JDBC driver and has a complete JDBC feature set that supports the
capabilities of MySQL.

%setup -q -n mysql-connector-j-%{version}

# fix line endings

for file in README; do
sed -i.orig 's|\r||g' $file
touch -r $file.orig $file
rm $file.orig

sed -i 's/> at .*</>%{version}</' src/build/misc/pom.xml

%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1


# We need both JDK1.5 (for JDBC3.0; appointed by $JAVA_HOME) and JDK1.6 (for JDBC4.0; appointed in the build.xml)

export CLASSPATH=$(build-classpath jdbc-stdext junit slf4j commons-logging.jar)

# We currently need to disable jboss integration because of missing jboss-common-jdbc-wrapper.jar (built from sources).

# See BZ#480154 and BZ#471915 for details.
rm -rf src/main/user-impl/java/com/mysql/cj/jdbc/integration/jboss
rm src/test/java/testsuite/regression/
rm src/test/java/testsuite/regression/
rm src/test/java/testsuite/simple/

ant \
   -Dcom.mysql.cj.extra.libs=%{_javadir} \
   test dist

# Install the Maven build information
%mvn_file mysql:mysql-connector-java %{name}
%mvn_artifact src/build/misc/pom.xml build/%{name}-%{version}-SNAPSHOT/%{name}-%{version}-SNAPSHOT.jar

%files -f .mfiles
%doc --no-dereference LICENSE


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin