Improve compatibility with new CMake macro

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Raits 2020-07-20 12:22:38 +02:00
parent 97079f55ec
commit a8e8708a2a
No known key found for this signature in database
GPG Key ID: 115D5AB89C5C1E1E

View File

@ -248,9 +248,6 @@ cat data/org.gnome.Evolution.desktop.in.i | sed -e "s/Icon=evolution/Icon=org.gn
%build %build
mkdir -p _build
cd _build
# define all of our flags, this is kind of ugly :( # define all of our flags, this is kind of ugly :(
%if %{ldap_support} %if %{ldap_support}
%define ldap_flags -DWITH_OPENLDAP=ON %define ldap_flags -DWITH_OPENLDAP=ON
@ -290,14 +287,12 @@ CFLAGS="$RPM_OPT_FLAGS -fPIC -DLDAP_DEPRECATED -Wno-sign-compare -Wno-deprecated
-DVERSION_SUBSTRING=" (%{version}-%{release})" \ -DVERSION_SUBSTRING=" (%{version}-%{release})" \
%ldap_flags %ssl_flags %gtkdoc_flags %tests_flags %tnef_flags \ %ldap_flags %ssl_flags %gtkdoc_flags %tests_flags %tnef_flags \
-DENABLE_PLUGINS=all \ -DENABLE_PLUGINS=all \
.. %{nil}
make %{?_smp_mflags} %cmake_build
%if %{with_docs} %if %{with_docs}
cd ..
# Replace identical images in the help by links. # Replace identical images in the help by links.
# This reduces the RPM size by several megabytes. # This reduces the RPM size by several megabytes.
helpdir=$RPM_BUILD_ROOT%{_datadir}/gnome/help/%{name} helpdir=$RPM_BUILD_ROOT%{_datadir}/gnome/help/%{name}
@ -319,9 +314,7 @@ done
%endif %endif
%install %install
rm -rf $RPM_BUILD_ROOT %cmake_install
cd _build
make DESTDIR=$RPM_BUILD_ROOT install
%if 0%{?flatpak} %if 0%{?flatpak}
%{S:1} <%{S:2} >flatpak-evolution-wrapper.sh %{S:1} <%{S:2} >flatpak-evolution-wrapper.sh
@ -533,10 +526,10 @@ grep -v "%{_datadir}/locale" evolution.lang > help.lang
%endif %endif
%files langpacks -f _build/translations.lang %files langpacks -f translations.lang
%if %{with_docs} %if %{with_docs}
%files help -f _build/help.lang %files help -f help.lang
%endif %endif
%files bogofilter %files bogofilter