2009-05-26 02:42:30 +00:00
|
|
|
#
|
2012-01-20 08:29:17 +00:00
|
|
|
# spec file for package mysql-connector-cpp
|
2009-05-26 02:42:30 +00:00
|
|
|
#
|
2023-02-09 17:43:46 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2009-05-26 02:42:30 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-02-21 15:14:24 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2009-05-26 02:42:30 +00:00
|
|
|
#
|
|
|
|
|
2013-02-26 08:54:29 +00:00
|
|
|
|
2021-01-25 07:21:51 +00:00
|
|
|
%define libname libmysqlcppconn9
|
2020-05-01 11:48:22 +00:00
|
|
|
%define x_libname libmysqlcppconn8-2
|
2009-05-26 02:42:30 +00:00
|
|
|
Name: mysql-connector-cpp
|
2023-06-13 06:59:15 +00:00
|
|
|
Version: 8.0.33
|
2013-02-26 08:54:29 +00:00
|
|
|
Release: 0
|
2009-05-26 02:42:30 +00:00
|
|
|
Summary: MySQL Connector/C++: Standardized database driver for C++ development
|
2012-01-20 08:29:17 +00:00
|
|
|
License: SUSE-GPL-2.0-with-FLOSS-exception
|
2011-09-19 19:24:33 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2018-08-27 15:23:03 +00:00
|
|
|
URL: http://dev.mysql.com/downloads/connector/
|
2019-02-21 15:14:24 +00:00
|
|
|
Source: http://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-%{version}-src.tar.gz
|
2020-05-01 11:48:22 +00:00
|
|
|
# PATCH-FIX-OPENSUSE fix options for mysql_config
|
|
|
|
Patch1: mysql-connector-cpp-config.patch
|
2017-11-24 13:10:42 +00:00
|
|
|
# PATCH-FIX-UPSTREAM - bsc#1067883 kstreitova@suse.com -- fix build with libmariadb by fixing copypaste errors in libmysql_dynamic_proxy.cpp file
|
2020-05-01 11:48:22 +00:00
|
|
|
Patch3: mysql-connector-cpp-libmysql_dynamic_proxy_typos.patch
|
2019-02-21 15:14:24 +00:00
|
|
|
# PATCH-FIX-OPENSUSE fix library to work with MariaDB instead of MySQL
|
2018-02-05 18:49:58 +00:00
|
|
|
Patch4: mysql-connector-cpp-mariadb.patch
|
2020-05-01 11:48:22 +00:00
|
|
|
# PATCH-FIX-OPENSUSE use system protobuf (due to some build issues in OBS)
|
|
|
|
Patch6: mysql-connector-cpp-use-system-protobuf.patch
|
2021-06-07 06:34:18 +00:00
|
|
|
# PATCH-FIX-OPENSUSE test for optional flag (not present in mariadb or older mysql)
|
|
|
|
Patch7: mysql-connector-cpp-test-feature.patch
|
2023-06-13 06:59:15 +00:00
|
|
|
# PATCH-FIX-UPSTREAM
|
|
|
|
Patch8: mysql-connector-cpp-library.patch
|
2013-02-26 08:54:29 +00:00
|
|
|
BuildRequires: cmake >= 2.6.2
|
2020-05-01 11:48:22 +00:00
|
|
|
BuildRequires: fdupes
|
2012-01-20 08:29:17 +00:00
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: libmysqlclient-devel
|
2020-05-01 11:48:22 +00:00
|
|
|
BuildRequires: protobuf-devel
|
2018-08-27 15:23:03 +00:00
|
|
|
BuildRequires: zlib-devel
|
2013-04-17 13:50:57 +00:00
|
|
|
Obsoletes: mysql-connector-c++ < %{version}
|
|
|
|
Provides: mysql-connector-c++ = %{version}
|
2018-08-27 15:23:03 +00:00
|
|
|
%if 0%{?suse_version} > 1325
|
|
|
|
BuildRequires: libboost_headers-devel
|
|
|
|
%else
|
|
|
|
BuildRequires: boost-devel >= 1.34.0
|
|
|
|
%endif
|
2009-05-26 02:42:30 +00:00
|
|
|
|
|
|
|
%description
|
2019-02-21 15:14:24 +00:00
|
|
|
MySQL Connector/C++ is a library for applications written in C or C++ that
|
|
|
|
communicate with MySQL database servers. Version 8.0 of Connector/C++
|
|
|
|
implements three different APIs which can be used by applications:
|
|
|
|
|
|
|
|
* The new X DevAPI for applications written in C++.
|
|
|
|
* The new X DevAPI for C for applications written in plain C.
|
|
|
|
* The legacy JDBC4-based API also implemented in version 1.1 of the connector.
|
2009-05-26 02:42:30 +00:00
|
|
|
|
2009-07-28 22:52:45 +00:00
|
|
|
The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its
|
|
|
|
full functionality is not available when connecting to MySQL 5.0. You cannot
|
|
|
|
connect to MySQL 4.1 or earlier.
|
2009-05-26 02:42:30 +00:00
|
|
|
|
|
|
|
%package -n libmysqlcppconn-devel
|
2009-07-28 22:52:45 +00:00
|
|
|
Summary: Development files for MySQL Connector/C++
|
2012-01-20 08:29:17 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2015-08-12 17:02:26 +00:00
|
|
|
Requires: %{libname} = %{version}
|
2013-04-17 13:50:57 +00:00
|
|
|
Obsoletes: mysql-connector-c++-devel < %{version}
|
|
|
|
Provides: mysql-connector-c++-devel = %{version}
|
2017-09-20 07:04:06 +00:00
|
|
|
%if 0%{?suse_version} > 1325
|
|
|
|
Requires: libboost_headers-devel
|
|
|
|
%else
|
|
|
|
Requires: boost-devel >= 1.34.0
|
|
|
|
%endif
|
2009-05-26 02:42:30 +00:00
|
|
|
|
|
|
|
%description -n libmysqlcppconn-devel
|
2019-02-21 15:14:24 +00:00
|
|
|
MySQL Connector/C++ API is a MySQL database connector for C++ development. The
|
2009-07-28 22:52:45 +00:00
|
|
|
MySQL driver for C++ can be used to connect to MySQL from C++ applications. The
|
2013-02-26 08:54:29 +00:00
|
|
|
driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0.
|
2009-05-26 02:42:30 +00:00
|
|
|
|
2009-07-28 22:52:45 +00:00
|
|
|
The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its
|
|
|
|
full functionality is not available when connecting to MySQL 5.0. You cannot
|
|
|
|
connect to MySQL 4.1 or earlier.
|
2009-05-26 02:42:30 +00:00
|
|
|
|
2015-08-12 17:02:26 +00:00
|
|
|
%package -n %{libname}
|
2009-05-26 02:42:30 +00:00
|
|
|
Summary: MySQL Connector/C++: Standardized database driver for C++ development
|
2012-01-20 08:29:17 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2009-05-26 02:42:30 +00:00
|
|
|
|
2015-08-12 17:02:26 +00:00
|
|
|
%description -n %{libname}
|
2009-07-28 22:52:45 +00:00
|
|
|
MySQL Connector/C++ is a MySQL database connector for C++ development. The
|
|
|
|
MySQL driver for C++ can be used to connect to MySQL from C++ applications. The
|
2013-02-26 08:54:29 +00:00
|
|
|
driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0.
|
2009-05-26 02:42:30 +00:00
|
|
|
|
2009-07-28 22:52:45 +00:00
|
|
|
The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its
|
|
|
|
full functionality is not available when connecting to MySQL 5.0. You cannot
|
|
|
|
connect to MySQL 4.1 or earlier.
|
2009-05-26 02:42:30 +00:00
|
|
|
|
2019-02-21 15:14:24 +00:00
|
|
|
%package -n libmysqlcppconn8-devel
|
|
|
|
Summary: Development files for MySQL Connector/C++
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{x_libname} = %{version}
|
|
|
|
Obsoletes: mysql-connector-c++-devel < %{version}
|
|
|
|
Provides: mysql-connector-c++-devel = %{version}
|
|
|
|
%if 0%{?suse_version} > 1325
|
|
|
|
Requires: libboost_headers-devel
|
|
|
|
%else
|
|
|
|
Requires: boost-devel >= 1.34.0
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description -n libmysqlcppconn8-devel
|
|
|
|
MySQL Connector/C++ 8.0 implements the X DevAPI. The X DevAPI allows one to work
|
|
|
|
with MySQL Servers implementing a document store via the X Plugin. One can also
|
|
|
|
execute plain SQL queries using this API.
|
|
|
|
|
|
|
|
The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its
|
|
|
|
full functionality is not available when connecting to MySQL 5.0. You cannot
|
|
|
|
connect to MySQL 4.1 or earlier.
|
|
|
|
|
|
|
|
%package -n %{x_libname}
|
|
|
|
Summary: MySQL Connector/C++: Standardized database driver for C++ development
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
|
|
|
%description -n %{x_libname}
|
|
|
|
MySQL Connector/C++ 8.0 implements the X DevAPI. The X DevAPI allows one to work
|
|
|
|
with MySQL Servers implementing a document store via the X Plugin. One can also
|
|
|
|
execute plain SQL queries using this API.
|
|
|
|
|
|
|
|
The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its
|
|
|
|
full functionality is not available when connecting to MySQL 5.0. You cannot
|
|
|
|
connect to MySQL 4.1 or earlier.
|
|
|
|
|
2009-05-26 02:42:30 +00:00
|
|
|
%prep
|
2019-02-21 15:14:24 +00:00
|
|
|
%setup -q -n mysql-connector-c++-%{version}-src
|
2020-05-01 11:48:22 +00:00
|
|
|
%autopatch -p1
|
2019-02-21 15:14:24 +00:00
|
|
|
chmod -x jdbc/examples/*
|
2009-05-26 02:42:30 +00:00
|
|
|
|
|
|
|
%build
|
2014-08-29 14:22:33 +00:00
|
|
|
%cmake \
|
2019-02-21 15:14:24 +00:00
|
|
|
-DWITH_JDBC=ON \
|
2023-06-13 06:59:15 +00:00
|
|
|
-DWITH_ZLIB=ON \
|
|
|
|
-DBUILD_STATIC=OFF \
|
|
|
|
-DMYSQLCLIENT_STATIC_LINKING=OFF \
|
|
|
|
-DMYSQLCLIENT_STATIC_BINDING=OFF \
|
2019-02-21 15:14:24 +00:00
|
|
|
-DCMAKE_INSTALL_LIBDIR=%{_lib} \
|
|
|
|
-DCMAKE_INSTALL_LIBDIR:PATH=%{_lib}
|
2021-01-03 12:28:10 +00:00
|
|
|
%cmake_build
|
2009-05-26 02:42:30 +00:00
|
|
|
|
|
|
|
%install
|
2014-08-29 14:22:33 +00:00
|
|
|
%cmake_install
|
2009-05-26 02:42:30 +00:00
|
|
|
rm -f %{buildroot}%{_libdir}/libmysqlcppconn-static.a
|
2013-02-26 08:54:29 +00:00
|
|
|
rm -f %{buildroot}%{_prefix}/[A-Z]*
|
2019-02-21 15:14:24 +00:00
|
|
|
mkdir -p %{buildroot}%{_docdir}/libmysqlcppconn-devel
|
|
|
|
install -m 0644 README.txt %{buildroot}%{_docdir}/libmysqlcppconn-devel/
|
|
|
|
mkdir -p %{buildroot}%{_docdir}/libmysqlcppconn-devel/examples
|
|
|
|
install -m 0644 jdbc/examples/* %{buildroot}%{_docdir}/libmysqlcppconn-devel/examples/
|
|
|
|
mkdir -p %{buildroot}%{_docdir}/libmysqlcppconn8-devel
|
|
|
|
install -m 0644 README.txt %{buildroot}%{_docdir}/libmysqlcppconn8-devel/
|
2009-05-26 02:42:30 +00:00
|
|
|
|
2020-05-01 11:48:22 +00:00
|
|
|
%fdupes -s %{buildroot}
|
|
|
|
|
2015-08-12 17:02:26 +00:00
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
2009-05-26 02:42:30 +00:00
|
|
|
|
2019-02-21 15:14:24 +00:00
|
|
|
%post -n %{x_libname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n %{x_libname} -p /sbin/ldconfig
|
|
|
|
|
2009-05-26 02:42:30 +00:00
|
|
|
%files -n libmysqlcppconn-devel
|
2019-02-21 15:14:24 +00:00
|
|
|
%license LICENSE.txt
|
2020-05-01 11:48:22 +00:00
|
|
|
%doc README.txt examples
|
2019-02-21 15:14:24 +00:00
|
|
|
%{_includedir}/jdbc
|
2020-05-01 11:48:22 +00:00
|
|
|
%{_includedir}/mysql/jdbc.h
|
2019-02-21 15:14:24 +00:00
|
|
|
%{_libdir}/libmysqlcppconn.so
|
2009-05-26 02:42:30 +00:00
|
|
|
|
2015-08-12 17:02:26 +00:00
|
|
|
%files -n %{libname}
|
2019-02-21 15:14:24 +00:00
|
|
|
%{_libdir}/libmysqlcppconn.so.*
|
|
|
|
|
|
|
|
%files -n libmysqlcppconn8-devel
|
|
|
|
%license LICENSE.txt
|
2020-05-01 11:48:22 +00:00
|
|
|
%doc README.txt
|
2019-02-21 15:14:24 +00:00
|
|
|
%{_includedir}/mysqlx
|
|
|
|
%{_libdir}/libmysqlcppconn8.so
|
|
|
|
|
|
|
|
%files -n %{x_libname}
|
|
|
|
%{_libdir}/libmysqlcppconn8.so.*
|
2009-05-26 02:42:30 +00:00
|
|
|
|
|
|
|
%changelog
|