forked from pool/mysql-connector-java
bnc#927981 CVE-2015-2575: * http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1.html - Remove not applicable patch: * mysql-connector-java-7-jdbc-4.1.patch - Do not explicitely check for jdk6 but be happy with 7 and 8: * jdk6-check-use-jdk7.patch - Do not require hibernate4 to actually build: * extra-libs-build.patch - Do not build jdk5 depending jdbc3: * no-jdk5-requirement.patch - Add and rebase jdbc4.1 patch: * mysql-connector-java-jdbc-4.1.patch OBS-URL: https://build.opensuse.org/package/show/Java:packages/mysql-connector-java?expand=0&rev=21
130 lines
4.2 KiB
RPMSpec
130 lines
4.2 KiB
RPMSpec
#
|
|
# spec file for package mysql-connector-java
|
|
#
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: mysql-connector-java
|
|
Version: 5.1.35
|
|
Release: 0
|
|
Summary: Official JDBC Driver for MySQL
|
|
License: GPL-2.0+
|
|
Group: Development/Libraries/Java
|
|
Url: http://dev.mysql.com/downloads/connector/j/
|
|
Source0: %{name}-%{version}-suse.tar.xz
|
|
# Script to repack upstream tarball
|
|
# ./generate-tarball.sh VERSION
|
|
Source99: generate-tarball.sh
|
|
# PATCH-FIX-UPSTREAM: do not strictly require jdk6 to compile
|
|
Patch0: jdk6-check-use-jdk7.patch
|
|
# PATCH-FIX-UPSTREAM: do not require hibernate4 to actually just build
|
|
Patch1: extra-libs-build.patch
|
|
# PATCH-FIX-SUSE: do not build jdbc3 driver needing too old java
|
|
Patch2: no-jdk5-requirement.patch
|
|
# PATCH-FIX-UPSTREAM: build with jdbc4.1 and also with new javac
|
|
Patch3: mysql-connector-java-jdbc-4.1.patch
|
|
BuildRequires: ant
|
|
BuildRequires: ant-contrib
|
|
BuildRequires: apache-commons-logging
|
|
BuildRequires: geronimo-jta-1_1-api
|
|
BuildRequires: java-devel >= 1.6.0
|
|
BuildRequires: javapackages-tools
|
|
BuildRequires: junit
|
|
BuildRequires: log4j-mini
|
|
BuildRequires: slf4j
|
|
BuildRequires: xz
|
|
Requires: jta >= 1.0
|
|
Requires: log4j
|
|
Requires: slf4j
|
|
Provides: mm.mysql = %{version}
|
|
Obsoletes: mm.mysql < %{version}
|
|
# manual is no longer distributed
|
|
Provides: %{name}-manual = %{version}
|
|
Obsoletes: %{name}-manual < %{version}
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
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.
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
|
|
# dup
|
|
rm -f README
|
|
# wrong end of line encoding
|
|
sed -i -e 's/.$//' README.txt
|
|
|
|
%build
|
|
# disable jboss integration
|
|
rm -rf src/com/mysql/jdbc/integration/jboss
|
|
rm src/testsuite/regression/ConnectionRegressionTest.java
|
|
rm src/testsuite/regression/DataSourceRegressionTest.java
|
|
rm src/testsuite/simple/ReadOnlyCallableStatementTest.java
|
|
rm src/testsuite/simple/jdbc4/StatementsTest.java
|
|
# disable hibernate integration
|
|
rm -rf src/com/mysql/fabric/hibernate
|
|
rm -rf src/demo
|
|
|
|
export CLASSPATH=$(build-classpath \
|
|
ant-contrib \
|
|
commons-logging \
|
|
slf4j \
|
|
jdbc-stdext\
|
|
jta \
|
|
junit \
|
|
log4j)
|
|
|
|
ant \
|
|
-Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 \
|
|
-DbuildDir=build-mysql-jdbc \
|
|
-DdistDir=dist-mysql-jdbc \
|
|
-Dcom.mysql.jdbc.jdk6.javac="%{javac}" \
|
|
-Dcom.mysql.jdbc.jdk6.java="%{java}"
|
|
|
|
%install
|
|
install -d -m 755 %{buildroot}%{_javadir}
|
|
|
|
install ./build-mysql-jdbc/%{name}-%{version}-SNAPSHOT/%{name}-%{version}-SNAPSHOT-bin.jar \
|
|
%{buildroot}%{_javadir}/%{name}.jar
|
|
|
|
rm -rf %{buildroot}%{name}-%{version}/docs/release-test-output
|
|
|
|
# Install the Maven build information
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
|
install -pm 644 src/doc/sources/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
|
sed -i 's/>@.*</>%{version}</' %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
|
|
|
%add_maven_depmap JPP-%{name}.pom %{name}.jar
|
|
|
|
%files
|
|
%defattr(0644,root,root,0755)
|
|
%doc CHANGES COPYING README.txt
|
|
%attr(0644,root,root) %{_javadir}/%{name}.jar
|
|
%config(noreplace) %{_datadir}/maven-metadata/%{name}.xml*
|
|
%{_mavenpomdir}/*.pom
|
|
|
|
%changelog
|