Projects
home:pandora:RobinOS23
mariadb-connector-c
_service:download_src_package:mariadb-connector...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:download_src_package:mariadb-connector-c.spec of Package mariadb-connector-c
%define anolis_release 1 %bcond_with debug %bcond_without testsuite # Enable CMake in-source builds # This is is a workaround for the https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds # which reverts the CMake behaviour to before F33 # The Change owners offered themselves to help fix the affected packages via ProvenPackager rights. # I'm generally in favor of this change, however when I tried to adapt it, I encountered a number of issues. # That's why I disabled it for now. %global __cmake_in_source_build 1 Name: mariadb-connector-c Version: 3.2.7 Release: %{anolis_release}%{?dist} Summary: The MariaDB Native Client library (C driver) License: LGPLv2+ Source: https://downloads.mariadb.org/interstitial/connector-c-%{version}/%{name}-%{version}-src.tar.gz Source2: my.cnf Source3: client.cnf Url: http://mariadb.org/ %if %{with testsuite} Patch1: testsuite.patch %endif Requires: %{_sysconfdir}/my.cnf BuildRequires: gcc-c++ cmake openssl-devel zlib-devel # Remote-IO plugin BuildRequires: libcurl-devel # auth_gssapi_client plugin BuildRequires: krb5-devel %description The MariaDB Native Client library (C driver) is used to connect applications developed in C/C++ to MariaDB and MySQL databases. %package devel Summary: Development files for mariadb-connector-c Requires: %{name} = %{version}-%{release} Recommends: %{name}-doc = %{version}-%{release} Requires: openssl-devel zlib-devel BuildRequires: multilib-rpm-config Conflicts: mysql-devel %description devel Development files for mariadb-connector-c. Contains everything needed to build against libmariadb.so >=3 client library. %package doc Summary: Manual pages documenting API of the libmariadb.so library Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Manual pages documenting API of the libmariadb.so library. %if %{with testsuite} %package test Summary: Testsuite files for mariadb-connector-c Requires: %{name} = %{version}-%{release} Requires: cmake Recommends: mariadb-server %description test Testsuite files for mariadb-connector-c. Contains binaries and a prepared CMake ctest file. Requires running MariaDB / MySQL server with create database "test". %endif %package config Summary: Configuration files for packages that use /etc/my.cnf as a configuration file BuildArch: noarch Obsoletes: mariadb-config <= 3:10.3.8-4 %description config This package delivers /etc/my.cnf that includes other configuration files from the /etc/my.cnf.d directory and ships this directory as well. Other packages should only put their files into /etc/my.cnf.d directory and require this package, so the /etc/my.cnf file is present. %prep %setup -q -n %{name}-%{version}-src %if %{with testsuite} %patch1 -p1 %endif # Remove unsused parts rm -r win win-iconv zlib %build # https://jira.mariadb.org/browse/MDEV-13836: # The server has (used to have for ages) some magic around the port number. # If it's 0, the default port value will use getservbyname("mysql", "tcp"), that is, whatever is written in /etc/services. # If it's a positive number, say, 3306, it will be 3306, no matter what /etc/services say. # I don't know if that behavior makes much sense, /etc/services wasn't supposed to be a system configuration file. # The INSTALL_* macros have to be specified relative to CMAKE_INSTALL_PREFIX # so we can't use %%{_datadir} and so forth here. %cmake . \ -DCMAKE_BUILD_TYPE="%{?with_debug:Debug}%{!?with_debug:RelWithDebInfo}" \ -DCMAKE_SYSTEM_PROCESSOR="%{_arch}" \ \ -DMARIADB_UNIX_ADDR=%{_sharedstatedir}/mysql/mysql.sock \ -DMARIADB_PORT=3306 \ \ -DWITH_EXTERNAL_ZLIB=ON \ -DWITH_SSL=OPENSSL \ -DWITH_MYSQLCOMPAT=ON \ -DPLUGIN_CLIENT_ED25519=DYNAMIC \ \ -DINSTALL_LAYOUT=RPM \ -DINSTALL_BINDIR="bin" \ -DINSTALL_LIBDIR="%{_lib}" \ -DINSTALL_INCLUDEDIR="include/mysql" \ -DINSTALL_PLUGINDIR="%{_lib}/mariadb/plugin" \ -DINSTALL_PCDIR="%{_lib}/pkgconfig" \ \ %if %{with testsuite} -DWITH_UNIT_TESTS=ON %endif # Override all optimization flags when making a debug build %if %{with debug} CFLAGS="$CFLAGS -O0 -g"; export CFLAGS CXXFLAGS="$CXXFLAGS -O0 -g"; export CXXFLAGS FFLAGS="$FFLAGS -O0 -g"; export FFLAGS FCFLAGS="$FCFLAGS -O0 -g"; export FCFLAGS %endif cmake -B %__cmake_builddir -LAH %cmake_build %install %cmake_install %multilib_fix_c_header --file %{_includedir}/mysql/mariadb_version.h # Remove static linked libraries and symlinks to them rm %{buildroot}%{_libdir}/lib*.a # Add a compatibility symlinks ln -s mariadb_config %{buildroot}%{_bindir}/mysql_config ln -s mariadb_version.h %{buildroot}%{_includedir}/mysql/mysql_version.h # Install config files install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/my.cnf install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf %check # Check the generated configuration on the actual machine %{buildroot}%{_bindir}/mariadb_config # Run the unit tests # - don't run mytap tests # - ignore the testsuite result for now. Enable tests now, fix them later. # Note: there must be a database called 'test' created for the testcases to be run %if %{with testsuite} pushd unittest/libmariadb/ %ctest || : popd %endif %files %doc README %license COPYING.LIB %{_libdir}/libmariadb.so.3 %dir %{_libdir}/mariadb %dir %{_libdir}/mariadb/plugin %{_libdir}/mariadb/plugin/* %files doc # Library manual pages %{_mandir}/man3/{mariadb,mysql}_*.3* %files devel # Binary which provides compiler info for software compiling against this library %{_bindir}/mariadb_config %{_bindir}/mysql_config # Symlinks to the versioned library %{_libdir}/libmariadb.so %{_libdir}/libmysqlclient.so %{_libdir}/libmysqlclient_r.so # Pkgconfig %{_libdir}/pkgconfig/libmariadb.pc # Header files %dir %{_includedir}/mysql %{_includedir}/mysql/* %files config %dir %{_sysconfdir}/my.cnf.d %config(noreplace) %{_sysconfdir}/my.cnf %config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf %if %{with testsuite} %files test %dir %{_datadir}/%{name} %{_datadir}/%{name}/* %{_libdir}/libcctap.so %endif %changelog * Thu Jun 30 2022 happy_orange <songnannan@linux.alibaba.com> - 3.2.7-1 - Init package from upstream release
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2