Do not expect mariadb-service-convert on non-systemd system and do not create ld.so.conf.d entry if no client library is shipped

This commit is contained in:
Honza Horak 2017-08-28 21:20:37 +02:00
parent 2039ee9607
commit 8955559189

View File

@ -876,10 +876,11 @@ mkdir -p %{buildroot}%{logrotateddir}
mv %{buildroot}%{_datadir}/%{pkg_name}/mysql-log-rotate %{buildroot}%{logrotateddir}/%{daemon_name} mv %{buildroot}%{_datadir}/%{pkg_name}/mysql-log-rotate %{buildroot}%{logrotateddir}/%{daemon_name}
chmod 644 %{buildroot}%{logrotateddir}/%{daemon_name} chmod 644 %{buildroot}%{logrotateddir}/%{daemon_name}
# TODO: check, what's in CONC/C %if %{with clibrary}
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
# Save a name of the directory that contains libraries to this file # Save a name of the directory that contains libraries to this file
echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%endif
# copy additional docs into build tree so %%doc will find them # copy additional docs into build tree so %%doc will find them
install -p -m 0644 %{SOURCE5} %{basename:%{SOURCE5}} install -p -m 0644 %{SOURCE5} %{basename:%{SOURCE5}}
@ -931,7 +932,6 @@ install -p -m 0644 mysql-test/unstable-tests %{buildroot}%{_datadir}/mysql-test
ln -s unstable-tests %{buildroot}%{_datadir}/mysql-test/rh-skipped-tests.list ln -s unstable-tests %{buildroot}%{_datadir}/mysql-test/rh-skipped-tests.list
%if %{without clibrary} %if %{without clibrary}
rm -r %{buildroot}%{_sysconfdir}/ld.so.conf.d
unlink %{buildroot}%{_libdir}/mysql/libmariadb.so unlink %{buildroot}%{_libdir}/mysql/libmariadb.so
rm %{buildroot}%{_libdir}/mysql/libmariadb*.so.* rm %{buildroot}%{_libdir}/mysql/libmariadb*.so.*
rm %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf rm %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf
@ -1246,7 +1246,9 @@ fi
%{_bindir}/aria_pack %{_bindir}/aria_pack
%{_bindir}/aria_read_log %{_bindir}/aria_read_log
%{_bindir}/mariabackup %{_bindir}/mariabackup
%if %{with init_systemd}
%{_bindir}/mariadb-service-convert %{_bindir}/mariadb-service-convert
%endif
%{_bindir}/mbstream %{_bindir}/mbstream
%{_bindir}/myisamchk %{_bindir}/myisamchk
%{_bindir}/myisam_ftdump %{_bindir}/myisam_ftdump