Blame SPECS/mariadb-connector-c.spec

169275
# For deep debugging we need to build binaries with extra debug info
169275
%bcond_with     debug
169275
8deb81
Name:           mariadb-connector-c
169275
Version:        3.1.11
169275
Release:        2%{?with_debug:.debug}%{?dist}
8deb81
Summary:        The MariaDB Native Client library (C driver)
8deb81
License:        LGPLv2+
8deb81
Source:         https://downloads.mariadb.org/interstitial/connector-c-%{version}/mariadb-connector-c-%{version}-src.tar.gz
8deb81
Source2:        my.cnf
8deb81
Source3:        client.cnf
8deb81
Url:            http://mariadb.org/
8deb81
# More information: https://mariadb.com/kb/en/mariadb/building-connectorc-from-source/
8deb81
8deb81
Requires:       %{_sysconfdir}/my.cnf
8deb81
BuildRequires:  zlib-devel cmake openssl-devel gcc-c++
8deb81
# Remote-IO plugin
8deb81
BuildRequires:  libcurl-devel
169275
# auth_gssapi_client plugin
169275
BuildRequires:  krb5-devel
169275
169275
Requires:       ( mariadb >= 3:10.3.27 if mariadb )
169275
Requires:       ( %{name}-config = %{version}-%{release} if %{name}-config )
8deb81
8deb81
%description
8deb81
The MariaDB Native Client library (C driver) is used to connect applications
8deb81
developed in C/C++ to MariaDB and MySQL databases.
8deb81
8deb81
8deb81
8deb81
%package devel
8deb81
Summary:        Development files for mariadb-connector-c
8deb81
Requires:       %{name} = %{version}-%{release}
169275
Requires:       openssl-devel zlib-devel
8deb81
BuildRequires:  multilib-rpm-config
169275
Conflicts:      mysql-devel
169275
169275
Requires:       ( mariadb-devel >= 3:10.3.27 if mariadb-devel )
8deb81
8deb81
%description devel
8deb81
Development files for mariadb-connector-c.
8deb81
Contains everything needed to build against libmariadb.so >=3 client library.
8deb81
8deb81
8deb81
8deb81
%package config
8deb81
Summary:        Configuration files for packages that use /etc/my.cnf as a configuration file
8deb81
BuildArch:      noarch
8deb81
Obsoletes:      mariadb-config <= 3:10.3.8-4
8deb81
8deb81
%description config
8deb81
This package delivers /etc/my.cnf that includes other configuration files
8deb81
from the /etc/my.cnf.d directory and ships this directory as well.
8deb81
Other packages should only put their files into /etc/my.cnf.d directory
8deb81
and require this package, so the /etc/my.cnf file is present.
8deb81
8deb81
8deb81
8deb81
%prep
169275
%setup -q -n %{name}-%{version}-src
8deb81
8deb81
# Remove unsused parts
169275
rm -r win zlib win-iconv
8deb81
8deb81
8deb81
8deb81
%build
169275
%{set_build_flags}
169275
169275
# Override all optimization flags when making a debug build
169275
%{?with_debug: CFLAGS="$CFLAGS -O0 -g"}
169275
CXXFLAGS="$CFLAGS"
169275
export CFLAGS CXXFLAGS
8deb81
8deb81
# https://jira.mariadb.org/browse/MDEV-13836:
8deb81
#   The server has (used to have for ages) some magic around the port number.
8deb81
#   If it's 0, the default port value will use getservbyname("mysql", "tcp"), that is, whatever is written in /etc/services.
8deb81
#   If it's a positive number, say, 3306, it will be 3306, no matter what /etc/services say.
8deb81
#   I don't know if that behavior makes much sense, /etc/services wasn't supposed to be a system configuration file.
8deb81
8deb81
# The INSTALL_xxx macros have to be specified relative to CMAKE_INSTALL_PREFIX
8deb81
# so we can't use %%{_datadir} and so forth here.
8deb81
8deb81
%cmake . \
169275
       -DCMAKE_BUILD_TYPE="%{?with_debug:Debug}%{!?with_debug:RelWithDebInfo}" \
8deb81
       -DCMAKE_SYSTEM_PROCESSOR="%{_arch}" \
8deb81
\
8deb81
       -DMARIADB_UNIX_ADDR=%{_sharedstatedir}/mysql/mysql.sock \
8deb81
       -DMARIADB_PORT=3306 \
8deb81
\
8deb81
       -DWITH_EXTERNAL_ZLIB=YES \
8deb81
       -DWITH_SSL=OPENSSL \
8deb81
       -DWITH_MYSQLCOMPAT=ON \
169275
       -DPLUGIN_CLIENT_ED25519=DYNAMIC \
8deb81
\
8deb81
       -DINSTALL_LAYOUT=RPM \
8deb81
       -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
8deb81
       -DINSTALL_BINDIR="bin" \
8deb81
       -DINSTALL_LIBDIR="%{_lib}" \
8deb81
       -DINSTALL_INCLUDEDIR="include/mysql" \
8deb81
       -DINSTALL_PLUGINDIR="%{_lib}/mariadb/plugin" \
169275
       -DINSTALL_PCDIR="%{_lib}/pkgconfig" \
8deb81
\
8deb81
       -DWITH_UNITTEST=ON
8deb81
8deb81
8deb81
8deb81
#cmake -LAH
8deb81
169275
%make_build
8deb81
8deb81
8deb81
8deb81
%install
169275
%make_install
8deb81
8deb81
%multilib_fix_c_header --file %{_includedir}/mysql/mariadb_version.h
8deb81
8deb81
# Remove static linked libraries and symlinks to them
8deb81
rm %{buildroot}%{_libdir}/lib*.a
8deb81
8deb81
# Add a compatibility symlinks
8deb81
ln -s mariadb_config %{buildroot}%{_bindir}/mysql_config
8deb81
ln -s mariadb_version.h %{buildroot}%{_includedir}/mysql/mysql_version.h
8deb81
8deb81
# Install config files
8deb81
install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/my.cnf
8deb81
install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf
8deb81
8deb81
8deb81
8deb81
%check
8deb81
# Check the generated configuration on the actual machine
8deb81
%{buildroot}%{_bindir}/mariadb_config
8deb81
8deb81
# Run the unit tests
8deb81
# - don't run mytap tests
8deb81
# - ignore the testsuite result for now. Enable tests now, fix them later.
169275
# Note: there must be a database called 'test' created for the testcases to be run
8deb81
pushd unittest/libmariadb/
8deb81
ctest || :
8deb81
popd
8deb81
8deb81
8deb81
8deb81
%files
169275
%{_libdir}/libmariadb.so.3
8deb81
8deb81
%dir %{_libdir}/mariadb
8deb81
%dir %{_libdir}/mariadb/plugin
8deb81
%{_libdir}/mariadb/plugin/*
8deb81
8deb81
%doc README
8deb81
%license COPYING.LIB
8deb81
8deb81
8deb81
8deb81
%files devel
8deb81
# Binary which provides compiler info for software compiling against this library
8deb81
%{_bindir}/mariadb_config
8deb81
%{_bindir}/mysql_config
8deb81
8deb81
# Symlinks to the versioned library
8deb81
%{_libdir}/libmariadb.so
8deb81
%{_libdir}/libmysqlclient.so
8deb81
%{_libdir}/libmysqlclient_r.so
8deb81
8deb81
# Pkgconfig
8deb81
%{_libdir}/pkgconfig/libmariadb.pc
8deb81
8deb81
# Header files
8deb81
%dir %{_includedir}/mysql
8deb81
%{_includedir}/mysql/*
8deb81
8deb81
%license COPYING.LIB
8deb81
8deb81
8deb81
%files config
8deb81
%dir %{_sysconfdir}/my.cnf.d
8deb81
%config(noreplace) %{_sysconfdir}/my.cnf
8deb81
%config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf
8deb81
8deb81
8deb81
8deb81
%changelog
169275
* Thu Dec 03 2020 Michal Schorm <mschorm@redhat.com> - 3.1.11-2
169275
- Require specific minimal version of the 'mariadb' package, if it is installed
169275
169275
* Tue Nov 10 2020 Michal Schorm <mschorm@redhat.com> - 3.1.11-1
169275
- Rebase to 3.1.11
169275
169275
* Wed Jun 24 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.9-1
169275
- Rebase to 3.1.9
169275
- Overlinking issues fixed by upstream in 3.1.3 release
169275
- Add explicit confict between mariadb-connector-c-devel and mysql-devel packages
169275
169275
* Fri Jul 12 2019 Michal Schorm <mschorm@redhat.com> - 3.1.2-1
169275
- Rebase to 3.1.2
169275
- Introducing ED25519 plugin
169275
- Plugindir issues (from 3.0.9 release) fixed by upstream
169275
  Resolves: #1691176
169275
169275
* Wed May 15 2019 Michal Schorm <mschorm@redhat.com> - 3.0.10-1
169275
- Rebase to 3.0.10
169275
- Use macro for tarball name
169275
- Use macro to set build flags
169275
- Use macros for make commands
169275
- Remove the scriptlets non relevant for RHEL-8
169275
- Add info for the testsuite execution
169275
- Remove glob from library version
169275
- Remove info about the upstream issues
169275
169275
* Fri Mar 29 2019 Michal Schorm <mschorm@redhat.com> - 3.0.8-2
169275
- Add "zlib-devel" requirement in "-devel" subpackage. MariaDB requires
169275
  linking with "-lz", which will fail without the zlib library
169275
- Resolves: #1710471
169275
169275
* Wed Jan 02 2019 Michal Schorm <mschorm@redhat.com> - 3.0.8-1
169275
- Rebase to 3.0.8
169275
8deb81
* Mon Dec 10 2018 Michal Schorm <mschorm@redhat.com> - 3.0.7-1
8deb81
- Rebase to 3.0.7
8deb81
8deb81
* Tue Sep 04 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-2
8deb81
- Fix parallel installability of x86_64 and i686 devel package
8deb81
- Resolves: #1637031
8deb81
8deb81
* Fri Aug 03 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-1
8deb81
- Rebase to 3.0.6
8deb81
8deb81
* Tue Jul 17 2018 Honza Horak <hhorak@redhat.com> - 3.0.5-2
8deb81
- Add -config sub-package that delivers system-wide /etc/my.cnf and
8deb81
  /etc/my.cnf.d directory, that other packages should use
8deb81
  This package also obsoletes mariadb-config
8deb81
8deb81
* Fri Jun 08 2018 Michal Schorm <mschorm@redhat.com> - 3.0.5-1
8deb81
- Rebase to 3.0.5
8deb81
8deb81
* Thu Apr 26 2018 Michal Schorm <mschorm@redhat.com> - 3.0.4-1
8deb81
- Rebase to 3.0.4
8deb81
8deb81
* Mon Apr 23 2018 Michal Schorm <mschorm@redhat.com> - 3.0.3-4
8deb81
- Further fix of the '--plugindir' output from the config binary
8deb81
  Realted: #1569159
8deb81
8deb81
* Wed Mar 21 2018 Richard W.M. Jones <rjones@redhat.com> - 3.0.3-3
8deb81
- Fix plugin install directory (INSTALL_PLUGINDIR not PLUGIN_INSTALL_DIR).
8deb81
8deb81
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-2
8deb81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
8deb81
8deb81
* Fri Jan 19 2018 Michal Schorm <mschorm@redhat.com> - 3.0.3-1
8deb81
- Rebase to 3.0.3
8deb81
8deb81
* Mon Nov 27 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-21
8deb81
- Remove unneeded dependency on xmlto
8deb81
8deb81
* Tue Nov 14 2017 Pavel Raiskup <praiskup@redhat.com> - 3.0.2-19
8deb81
- drop misleading provides
8deb81
8deb81
* Wed Nov 08 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-19
8deb81
- Move the scriptlet to the correct package
8deb81
8deb81
* Thu Nov 02 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-18
8deb81
- Fix typo in require
8deb81
8deb81
* Wed Nov 01 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-17
8deb81
- Use correct require for OpenSSL
8deb81
8deb81
* Wed Nov 01 2017 Merlin Mathesius <mmathesi@redhat.com> - 3.0.2-16
8deb81
- Correct typo in spec file conditional
8deb81
8deb81
* Tue Oct 31 2017 Merlin Mathesius <mmathesi@redhat.com> - 3.0.2-15
8deb81
- Cleanup spec file conditionals
8deb81
8deb81
* Tue Oct 31 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-14
8deb81
- Remove Requires for openssl. Managed by RPM.
8deb81
8deb81
* Mon Oct 30 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-13
8deb81
- Update scriplet dealing with symlinks as Guidelines suggests
8deb81
  Related: #1501933
8deb81
8deb81
* Thu Oct 26 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-12
8deb81
- Move library directly to libdir, don't create any symlinks to directories
8deb81
- Update scritplets, so they only check for old symlinks to directories
8deb81
  Related: #1501933
8deb81
- Add 'Conflicts' with mariadb package on F<28
8deb81
  Related: #1506441
8deb81
8deb81
* Mon Oct 09 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-11
8deb81
- Fix ldconfig path
8deb81
8deb81
* Wed Oct 04 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-10
8deb81
- Add scriptlets to handle errors in /usr/lib64/ created by older versions
8deb81
  of mariadb and mariadb-connector-c pakages
8deb81
8deb81
* Wed Sep 20 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-9
8deb81
- Add symlinks so more packages will build succesfully
8deb81
- Change libdir from .../lib64/mariadb to mysql
8deb81
  Related: #1497234
8deb81
8deb81
* Wed Sep 13 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-7
8deb81
- Move header files to the same location, as they would be in mariadb-server
8deb81
- Add provides "libmysqlclient.so"
8deb81
8deb81
* Tue Sep 05 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-5
8deb81
- Remove a symlink /usr/lib64/mysql that conflicts with mariadb-libs
8deb81
8deb81
* Mon Aug 14 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-4
8deb81
- Add compatibility symlinks
8deb81
8deb81
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-3
8deb81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
8deb81
8deb81
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
8deb81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
8deb81
8deb81
* Wed Jun 07 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-1
8deb81
- Rebase to version 3.0.2
8deb81
- Library libmariadb.so.3 introduced
8deb81
- Plugin Remote-IO enabled
8deb81
8deb81
* Wed Jun 07 2017 Michal Schorm <mschorm@redhat.com> - 2.3.3-1
8deb81
- Rebase to version 2.3.3
8deb81
- Patch dropped, solved by upstream; https://jira.mariadb.org/browse/CONC-231
8deb81
8deb81
* Tue Feb 07 2017 Michal Schorm <mschorm@redhat.com> - 2.3.2-2
8deb81
- Fix based on output from RPMLint in previous version
8deb81
8deb81
* Tue Jan 24 2017 Michal Schorm <mschorm@redhat.com> - 2.3.2-1
8deb81
- Rebase to version 2.3.2, patch needed (fixed by upstream in later versions)
8deb81
- Plugin dir moved from /libdir/plugin to /libdir/mariadb/plugin
8deb81
8deb81
* Thu Oct 27 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-3
8deb81
- Fixed ownership of {_libdir}/mariadb (this dir must me owned by package)
8deb81
- Fixed ownership of {_sysconfigdir}/ld.so.conf.d (this dir must me owned by package)
8deb81
- Fixed redundnace on lines with {_sysconfigdir}/ld.so.conf.d
8deb81
- Fixed ownership of {_bindir} (only one program is owned, so let's be accurate)
8deb81
- Some comments added, for me and future maintainers
8deb81
8deb81
* Mon Oct 17 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-2
8deb81
- Fixed ownership of {_libdir}/mariadb directory and cosmetic specfile changes
8deb81
8deb81
* Tue Sep 13 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-1
8deb81
- Rebase to version 2.3.1
8deb81
8deb81
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
8deb81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8deb81
8deb81
* Thu Jul 23 2015 Matej Mužila <mmuzila@redhat.com> - 2.1.0-1
8deb81
- Rebase to version 2.1.0
8deb81
8deb81
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-3
8deb81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
8deb81
8deb81
* Wed Sep 24 2014 Matej Mužila <mmuzila@redhat.com> - 2.0.0-2
8deb81
- Fixed html IDs in documentation
8deb81
8deb81
* Tue Aug 26 2014 Matej Mužila <mmuzila@redhat.com> - 2.0.0-2
8deb81
- Initial version for 2.0.0