2017-03-23 13:15:46 +01:00
|
|
|
#
|
|
|
|
# spec file for package mariadb-connector-c
|
|
|
|
#
|
2018-04-19 13:51:02 +02:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-03-23 13:15:46 +01: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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2017-07-13 14:07:28 +02:00
|
|
|
|
2017-09-12 16:29:43 +02:00
|
|
|
%define sover 3
|
2017-03-23 13:15:46 +01:00
|
|
|
%define libname libmariadb
|
2017-11-07 12:20:45 +01:00
|
|
|
# equivalent mariadb version
|
|
|
|
%define mariadb_version 10.2.10
|
2017-03-29 13:08:33 +02:00
|
|
|
%if ! %{defined _rundir}
|
|
|
|
%define _rundir %{_localstatedir}/run
|
|
|
|
%endif
|
2017-11-19 08:42:06 +01:00
|
|
|
%bcond_with sqlite3
|
2017-03-23 13:15:46 +01:00
|
|
|
Name: mariadb-connector-c
|
2018-04-19 13:51:02 +02:00
|
|
|
Version: 3.0.3
|
2017-03-23 13:15:46 +01:00
|
|
|
Release: 0
|
2017-05-10 19:27:13 +02:00
|
|
|
Summary: MariaDB connector in C
|
2018-04-19 13:51:02 +02:00
|
|
|
License: LGPL-2.1-or-later
|
2017-03-23 13:15:46 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2017-07-13 14:07:28 +02:00
|
|
|
Url: https://github.com/MariaDB/mariadb-connector-c
|
2017-07-13 16:42:09 +02:00
|
|
|
Source: https://downloads.mariadb.com/Connectors/c/connector-c-%{version}/%{name}-%{version}-src.tar.gz
|
|
|
|
Source1: https://downloads.mariadb.com/Connectors/c/connector-c-%{version}/%{name}-%{version}-src.tar.gz.asc
|
2017-03-23 13:15:46 +01:00
|
|
|
# Imported from keyserver based on keyid @ https://mariadb.com/kb/en/mariadb-enterprise/mariadb-enterprise-installation-guide/
|
|
|
|
Source2: mariadb.keyring
|
2017-11-07 12:20:45 +01:00
|
|
|
Source3: baselibs.conf
|
2017-03-23 13:15:46 +01:00
|
|
|
Patch1: mariadb-connector-c-2.3.1_unresolved_symbols.patch
|
|
|
|
Patch3: absolute_path_fix.patch
|
|
|
|
Patch4: private_library.patch
|
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: curl-devel
|
2017-11-19 08:42:06 +01:00
|
|
|
BuildRequires: pkgconfig
|
2017-03-23 13:15:46 +01:00
|
|
|
BuildRequires: pkgconfig(krb5)
|
|
|
|
BuildRequires: pkgconfig(openssl)
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
|
|
|
%if %{with sqlite3}
|
2017-11-19 08:42:06 +01:00
|
|
|
BuildRequires: pkgconfig(sqlite3)
|
2017-03-23 13:15:46 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
2017-05-10 19:27:13 +02:00
|
|
|
MariaDB Connector is used to connect applications developed in
|
|
|
|
C or C++ to MariaDB and MySQL databases.
|
2017-03-23 13:15:46 +01:00
|
|
|
|
|
|
|
%package -n %{libname}%{sover}
|
2017-05-10 19:27:13 +02:00
|
|
|
Summary: MariaDB connector in C
|
2017-07-13 14:07:28 +02:00
|
|
|
Group: System/Libraries
|
2017-03-23 13:15:46 +01:00
|
|
|
|
|
|
|
%description -n %{libname}%{sover}
|
2017-05-10 19:27:13 +02:00
|
|
|
MariaDB Connector is used to connect applications developed in
|
|
|
|
C or C++ to MariaDB and MySQL databases.
|
2017-03-23 13:15:46 +01:00
|
|
|
|
|
|
|
This package holds the runtime components.
|
|
|
|
|
|
|
|
%package -n %{libname}_plugins
|
2017-05-10 19:27:13 +02:00
|
|
|
Summary: Plugins for the MariaDB C Connector
|
2017-11-07 12:20:45 +01:00
|
|
|
# We need "Conflicts" because we moved some plugins here:
|
|
|
|
# dialog.so was in mariadb-client package
|
|
|
|
# mysql_clear_password.so was in mariadb package
|
2017-08-08 14:59:51 +02:00
|
|
|
Group: System/Libraries
|
2017-11-07 12:20:45 +01:00
|
|
|
Conflicts: mariadb <= 10.1.25
|
2017-11-19 08:42:06 +01:00
|
|
|
Conflicts: mariadb-client <= 10.1.25
|
2017-03-23 13:15:46 +01:00
|
|
|
|
|
|
|
%description -n %{libname}_plugins
|
2017-05-10 19:27:13 +02:00
|
|
|
MariaDB Connector is used to connect applications developed in
|
|
|
|
C or C++ to MariaDB and MySQL databases.
|
2017-03-23 13:15:46 +01:00
|
|
|
|
|
|
|
This package holds MariaDB library plugins.
|
|
|
|
|
|
|
|
%package -n %{libname}private
|
2017-05-10 19:27:13 +02:00
|
|
|
Summary: Additional internal libraries for the MariaDB C Connector
|
2017-07-13 14:07:28 +02:00
|
|
|
Group: System/Libraries
|
2017-03-23 13:15:46 +01:00
|
|
|
|
|
|
|
%description -n %{libname}private
|
2017-05-10 19:27:13 +02:00
|
|
|
MariaDB Connector is used to connect applications developed in
|
|
|
|
C or C++ to MariaDB and MySQL databases.
|
2017-03-23 13:15:46 +01:00
|
|
|
|
|
|
|
This package holds the runtime components with private API.
|
|
|
|
|
|
|
|
%package -n %{libname}-devel
|
2017-11-19 08:42:06 +01:00
|
|
|
Summary: Development files for the MariaDB Connector C API
|
|
|
|
Group: Development/Libraries/C and C++
|
2017-03-23 13:15:46 +01:00
|
|
|
Requires: %{libname}%{sover} = %{version}
|
|
|
|
Requires: pkgconfig(openssl)
|
2017-11-07 12:20:45 +01:00
|
|
|
# mysql-devel needs to be provided as some pkgs still depend on it
|
|
|
|
Provides: mysql-devel = %{mariadb_version}
|
|
|
|
Obsoletes: mysql-devel < %{mariadb_version}
|
|
|
|
Provides: libmysqlclient-devel = %{mariadb_version}
|
|
|
|
Obsoletes: libmysqlclient-devel < %{mariadb_version}
|
|
|
|
# libmysqlclient_r.so was in libmysqlclient_r18 subpackage, now it's here
|
|
|
|
Provides: libmysqlclient_r18 = %{mariadb_version}
|
|
|
|
Obsoletes: libmysqlclient_r18 < %{mariadb_version}
|
2017-05-10 19:27:13 +02:00
|
|
|
|
2017-03-23 13:15:46 +01:00
|
|
|
%description -n %{libname}-devel
|
2017-05-10 19:27:13 +02:00
|
|
|
MariaDB Connector is used to connect applications developed in
|
|
|
|
C or C++ to MariaDB and MySQL databases.
|
2017-03-23 13:15:46 +01:00
|
|
|
|
|
|
|
This package holds the development files.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-%{version}-src
|
|
|
|
%patch1 -p1
|
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
|
|
|
|
|
|
|
%build
|
|
|
|
%cmake \
|
|
|
|
%if %{with sqlite3}
|
|
|
|
-DWITH_SQLITE:BOOL=ON \
|
|
|
|
%endif
|
|
|
|
-DWITH_EXTERNAL_ZLIB:BOOL=ON \
|
2017-09-12 16:29:43 +02:00
|
|
|
-DMARIADB_UNIX_ADDR:STRING=%{_rundir}/mysql/mysql.sock \
|
2017-11-07 12:20:45 +01:00
|
|
|
-DINSTALL_LIBDIR:STRING=%{_libdir} \
|
|
|
|
-DINSTALL_INCLUDEDIR:STRING=%{_includedir}/mysql \
|
|
|
|
-DINSTALL_PLUGINDIR:STRING=%{_libdir}/mysql/plugin/ \
|
2017-09-12 16:29:43 +02:00
|
|
|
-DWITH_MYSQLCOMPAT=ON \
|
2017-11-19 08:42:06 +01:00
|
|
|
-DWITH_SSL=OPENSSL
|
|
|
|
%make_jobs
|
2017-03-23 13:15:46 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
%cmake_install
|
|
|
|
|
2017-09-12 16:29:43 +02:00
|
|
|
# remove static linked libraries
|
2017-11-07 12:20:45 +01:00
|
|
|
rm %{buildroot}%{_libdir}/libmariadbclient.a
|
|
|
|
rm %{buildroot}%{_libdir}/libmysqlclient.a
|
|
|
|
rm %{buildroot}%{_libdir}/libmysqlclient_r.a
|
|
|
|
|
|
|
|
# add a compatibility symlink
|
|
|
|
ln -s mariadb_config %{buildroot}%{_bindir}/mysql_config
|
|
|
|
ln -s mariadb_version.h %{buildroot}%{_includedir}/mysql/mysql_version.h
|
2017-11-13 19:07:40 +01:00
|
|
|
|
|
|
|
# install some extra required header file
|
|
|
|
install -Dpm 0644 build/include/ma_config.h \
|
|
|
|
%{buildroot}%{_includedir}/mysql/my_config.h
|
2017-03-23 13:15:46 +01:00
|
|
|
|
2017-11-19 08:42:06 +01:00
|
|
|
%post -n %{libname}%{sover} -p /sbin/ldconfig
|
|
|
|
%post -n %{libname}private -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname}%{sover} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname}private -p /sbin/ldconfig
|
|
|
|
|
2017-03-23 13:15:46 +01:00
|
|
|
%files -n %{libname}%{sover}
|
2018-04-19 13:51:02 +02:00
|
|
|
%license COPYING.LIB
|
|
|
|
%doc README
|
2017-11-07 12:20:45 +01:00
|
|
|
%{_libdir}/libmariadb.so.%{sover}
|
2017-03-23 13:15:46 +01:00
|
|
|
|
|
|
|
%files -n %{libname}_plugins
|
2017-11-07 12:20:45 +01:00
|
|
|
%dir %{_libdir}/mysql/
|
|
|
|
%dir %{_libdir}/mysql/plugin/
|
|
|
|
%{_libdir}/mysql/plugin/dialog.so
|
|
|
|
%{_libdir}/mysql/plugin/mysql_clear_password.so
|
|
|
|
%{_libdir}/mysql/plugin/auth_gssapi_client.so
|
|
|
|
%{_libdir}/mysql/plugin/remote_io.so
|
|
|
|
%{_libdir}/mysql/plugin/sha256_password.so
|
2017-03-23 13:15:46 +01:00
|
|
|
|
|
|
|
%files -n %{libname}private
|
2017-11-07 12:20:45 +01:00
|
|
|
%{_libdir}/libmariadbprivate.so
|
2017-03-23 13:15:46 +01:00
|
|
|
|
|
|
|
%files -n %{libname}-devel
|
|
|
|
%{_bindir}/mariadb_config
|
2017-11-07 12:20:45 +01:00
|
|
|
%{_bindir}/mysql_config
|
|
|
|
%dir %{_includedir}/mysql
|
|
|
|
%{_includedir}/mysql/*
|
|
|
|
%{_libdir}/libmariadb.so
|
|
|
|
%{_libdir}/libmysqlclient.so
|
|
|
|
%{_libdir}/libmysqlclient_r.so
|
2017-03-23 13:15:46 +01:00
|
|
|
|
|
|
|
%changelog
|