Simplify flatpak conditionals

There's no need to exclude systemd unit files: instead we can just pass
the directory where they should go and avoid flatpak conditionals.

https://bugzilla.redhat.com/show_bug.cgi?id=1728303
This commit is contained in:
Kalev Lember 2021-02-09 15:58:49 +01:00
parent f2629ec293
commit 85e63c0b03

View File

@ -89,9 +89,7 @@ BuildRequires: gtk-doc >= %{gtk_doc_version}
BuildRequires: intltool >= %{intltool_version} BuildRequires: intltool >= %{intltool_version}
BuildRequires: make BuildRequires: make
BuildRequires: vala BuildRequires: vala
%if ! 0%{?flatpak}
BuildRequires: systemd BuildRequires: systemd
%endif
BuildRequires: pkgconfig(gcr-3) >= %{gcr_version} BuildRequires: pkgconfig(gcr-3) >= %{gcr_version}
BuildRequires: pkgconfig(gcr-base-3) >= %{gcr_version} BuildRequires: pkgconfig(gcr-base-3) >= %{gcr_version}
@ -264,9 +262,7 @@ export CFLAGS="$RPM_OPT_FLAGS -DLDAP_DEPRECATED -fPIC -I%{_includedir}/et -Wno-d
-DENABLE_INTROSPECTION=ON \ -DENABLE_INTROSPECTION=ON \
-DENABLE_VALA_BINDINGS=ON \ -DENABLE_VALA_BINDINGS=ON \
-DENABLE_INSTALLED_TESTS=ON \ -DENABLE_INSTALLED_TESTS=ON \
%if 0%{?flatpak} -DWITH_SYSTEMDUSERUNITDIR=%{_userunitdir} \
-DWITH_SYSTEMDUSERUNITDIR=OFF \
%endif
%if "%{?_eds_dbus_services_prefix}" != "" %if "%{?_eds_dbus_services_prefix}" != ""
-DDBUS_SERVICES_PREFIX=%{?_eds_dbus_services_prefix} \ -DDBUS_SERVICES_PREFIX=%{?_eds_dbus_services_prefix} \
%endif %endif
@ -356,12 +352,10 @@ find $RPM_BUILD_ROOT -name '*.so.*' -exec chmod +x {} \;
%{_datadir}/dbus-1/services/%{dbus_service_name_user_prompter}.service %{_datadir}/dbus-1/services/%{dbus_service_name_user_prompter}.service
%{_datadir}/pixmaps/evolution-data-server %{_datadir}/pixmaps/evolution-data-server
%if ! 0%{?flatpak}
%{_userunitdir}/evolution-addressbook-factory.service %{_userunitdir}/evolution-addressbook-factory.service
%{_userunitdir}/evolution-calendar-factory.service %{_userunitdir}/evolution-calendar-factory.service
%{_userunitdir}/evolution-source-registry.service %{_userunitdir}/evolution-source-registry.service
%{_userunitdir}/evolution-user-prompter.service %{_userunitdir}/evolution-user-prompter.service
%endif
%dir %{_libdir}/evolution-data-server %dir %{_libdir}/evolution-data-server
%dir %{credential_modules_dir} %dir %{credential_modules_dir}