Fix flatpak build
mariadb-connector-c is not part of the flatpak runtime, and therefore is built in /app as a dependency of flatpaks which require it. Therefore, my.cnf must respect %_sysconfdir rather than use /etc.
This commit is contained in:
parent
9b1f4f62a0
commit
e95c4b70f5
@ -15,7 +15,7 @@ Release: 1%{?with_debug:.debug}%{?dist}
|
|||||||
Summary: The MariaDB Native Client library (C driver)
|
Summary: The MariaDB Native Client library (C driver)
|
||||||
License: LGPL-2.1-or-later
|
License: LGPL-2.1-or-later
|
||||||
Source: https://archive.mariadb.org/connector-c-%{version}/%{name}-%{version}-src.tar.gz
|
Source: https://archive.mariadb.org/connector-c-%{version}/%{name}-%{version}-src.tar.gz
|
||||||
Source2: my.cnf
|
Source2: my.cnf.in
|
||||||
Source3: client.cnf
|
Source3: client.cnf
|
||||||
Url: http://mariadb.org/
|
Url: http://mariadb.org/
|
||||||
# More information: https://mariadb.com/kb/en/mariadb/building-connectorc-from-source/
|
# More information: https://mariadb.com/kb/en/mariadb/building-connectorc-from-source/
|
||||||
@ -143,6 +143,7 @@ cmake -B %__cmake_builddir -LAH
|
|||||||
|
|
||||||
%cmake_build
|
%cmake_build
|
||||||
|
|
||||||
|
sed -e 's|@SYSCONFDIR@|%{_sysconfdir}|' %{SOURCE2} > my.cnf
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -158,7 +159,7 @@ ln -s mariadb_config %{buildroot}%{_bindir}/mysql_config
|
|||||||
ln -s mariadb_version.h %{buildroot}%{_includedir}/mysql/mysql_version.h
|
ln -s mariadb_version.h %{buildroot}%{_includedir}/mysql/mysql_version.h
|
||||||
|
|
||||||
# Install config files
|
# Install config files
|
||||||
install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/my.cnf
|
install -D -p -m 0644 my.cnf %{buildroot}%{_sysconfdir}/my.cnf
|
||||||
install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf
|
install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
#
|
#
|
||||||
# include all files from the config directory
|
# include all files from the config directory
|
||||||
#
|
#
|
||||||
!includedir /etc/my.cnf.d
|
!includedir @SYSCONFDIR@/my.cnf.d
|
||||||
|
|
Loading…
Reference in New Issue
Block a user