Fix flatpak build

The primary reason for building this in /app is for mariadb-embedded as
a dependency of the amarok flatpak. PAM modules are not useful in
flatpaks, and their installation directory would need to be changed. The
pcre2 and lz4 dependencies are part of the runtime, and therefore are in
/usr even for flatpaks.
This commit is contained in:
Yaakov Selkowitz 2024-01-02 23:50:18 -05:00
parent 9fe7f4029b
commit f6fef0c961

View File

@ -56,7 +56,9 @@
%bcond_without oqgraph %bcond_without oqgraph
# PAM authentication plugin # PAM authentication plugin
%if !0%{?flatpak}
%bcond_without pam %bcond_without pam
%endif
# Other plugins # Other plugins
# S3 storage engine # S3 storage engine
@ -86,7 +88,9 @@
%bcond_without client %bcond_without client
%bcond_without common %bcond_without common
%bcond_without errmsg %bcond_without errmsg
%if !0%{?flatpak}
%bcond_without test %bcond_without test
%endif
%bcond_without galera %bcond_without galera
%bcond_without backup %bcond_without backup
@ -797,7 +801,7 @@ if [ %{pcre_bundled_version} != "$pcre_version" ] ; then
fi fi
%else %else
# Check if the PCRE version that upstream use, is the same as the one present in system # Check if the PCRE version that upstream use, is the same as the one present in system
pcre_system_version=`pkgconf %{_libdir}/pkgconfig/libpcre2-*.pc --modversion 2>/dev/null | head -n 1` pcre_system_version=`pkgconf /usr/%{_lib}/pkgconfig/libpcre2-*.pc --modversion 2>/dev/null | head -n 1`
if [ "$pcre_system_version" != "$pcre_version" ] ; then if [ "$pcre_system_version" != "$pcre_version" ] ; then
echo -e "\n Warning: Error: Bundled PCRE version is not correct. \n\tSystem version number: $pcre_system_version \n\tUpstream version number: $pcre_version\n" echo -e "\n Warning: Error: Bundled PCRE version is not correct. \n\tSystem version number: $pcre_system_version \n\tUpstream version number: $pcre_version\n"
@ -860,8 +864,8 @@ fi
-DCONC_WITH_SSL=%{?with_clibrary:ON}%{!?with_clibrary:NO} \ -DCONC_WITH_SSL=%{?with_clibrary:ON}%{!?with_clibrary:NO} \
-DWITH_SSL=system \ -DWITH_SSL=system \
-DWITH_ZLIB=system \ -DWITH_ZLIB=system \
-DLZ4_LIBS=%{_libdir}/liblz4.so \ -DLZ4_LIBS=/usr/%{_lib}/liblz4.so \
-DLZ4_LIBS=%{?with_lz4:%{_libdir}/liblz4.so}%{!?with_lz4:} \ -DLZ4_LIBS=%{?with_lz4:/usr/%{_lib}/liblz4.so}%{!?with_lz4:} \
-DWITH_INNODB_LZ4=%{?with_lz4:ON}%{!?with_lz4:OFF} \ -DWITH_INNODB_LZ4=%{?with_lz4:ON}%{!?with_lz4:OFF} \
-DWITH_ROCKSDB_LZ4=%{?with_lz4:ON}%{!?with_lz4:OFF} \ -DWITH_ROCKSDB_LZ4=%{?with_lz4:ON}%{!?with_lz4:OFF} \
-DPLUGIN_MROONGA=%{?with_mroonga:DYNAMIC}%{!?with_mroonga:NO} \ -DPLUGIN_MROONGA=%{?with_mroonga:DYNAMIC}%{!?with_mroonga:NO} \