## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global libname_so 10 %global x_libname_so 2 Name: mysql-connector-cpp Version: 9.4.0 Release: %autorelease Summary: MySQL Connector/C++: Standardized database driver for C++ development License: GPL-2.0-only Group: Development/Libraries/C and C++ URL: http://dev.mysql.com/downloads/connector/ Source: http://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-%{version}-src.tar.gz # PATCH-FIX-UPSTREAM Patch: mysql-connector-cpp-library.patch BuildRequires: cmake BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: libzstd-devel BuildRequires: lz4-devel BuildRequires: mysql8.4-devel BuildRequires: protobuf-lite-devel BuildRequires: zlib-devel BuildRequires: boost-devel %global _description %{expand: 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. 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.} %description %_description %package devel Summary: Development files for MySQL Connector/C++ Group: Development/Libraries/C and C++ Requires: %{name} = %{version} Requires: boost-devel >= 1.34.0 %description devel %_description %prep %autosetup -n mysql-connector-c++-%{version}-src -p1 chmod -x jdbc/examples/* %build %cmake \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DWITH_JDBC=ON \ -DWITH_LZ4=ON \ -DWITH_PROTOBUF=ON \ -DWITH_ZLIB=ON \ -DWITH_ZSTD=ON \ -DBUILD_STATIC=OFF \ -DMYSQLCLIENT_STATIC_LINKING=OFF \ -DMYSQLCLIENT_STATIC_BINDING=OFF \ -UCMAKE_INSTALL_DOCDIR:STRING=share/doc/%{name} \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} %cmake_build %install %cmake_install # Add CMake files to the right location, and remove the incorrect ones mkdir -p %{buildroot}%{_libdir}/cmake/%{name}/ install -D -m 0644 %{buildroot}/%{_prefix}/*.cmake %{buildroot}%{_libdir}/cmake/%{name}/ # Remove unwanted files rm -v %{buildroot}%{_prefix}/{INFO_SRC,INFO_BIN} rm -v %{buildroot}/%{_prefix}/*.cmake %fdupes -s %{buildroot} %files %license LICENSE.txt %doc README.txt jdbc/examples %{_libdir}/libmysqlcppconn.so.%{libname_so}{,.*} %{_libdir}/libmysqlcppconnx.so.%{x_libname_so}{,.*} %files devel %{_libdir}/libmysqlcppconn.so %{_libdir}/libmysqlcppconnx.so %{_libdir}/cmake/%{name}/ %{_includedir}/jdbc/ %{_includedir}/mysql/jdbc.h %{_includedir}/mysqlx/ %changelog ## START: Generated by rpmautospec * Tue Sep 02 2025 Sandro - 9.4.0-1 - Initial package ## END: Generated by rpmautospec