Enable flatpak configuration in flatpak builds

The previous commit allowed dolphin to build (e.g. for inclusion of
dolphin-part in other flatpaks) but this is needed for the dolphin
flatpak itself.
epel9
Yaakov Selkowitz 1 year ago
parent dbdf7fb809
commit 5328dcfe42

@ -103,6 +103,7 @@ Requires: kf5-kio-devel%{?_isa}
%build %build
%cmake_kf5 \ %cmake_kf5 \
%{?flatpak:-DFLATPAK:BOOL=ON} \
-DKDE_INSTALL_SYSTEMDUSERUNITDIR=%{_userunitdir} \ -DKDE_INSTALL_SYSTEMDUSERUNITDIR=%{_userunitdir} \
-DBUILD_TESTING:BOOL=%{?tests:ON}%{!?tests:OFF} -DBUILD_TESTING:BOOL=%{?tests:ON}%{!?tests:OFF}
@ -125,6 +126,13 @@ desktop-file-edit \
%{buildroot}%{_kf5_sysconfdir}/xdg/autostart/org.kde.%{name}.desktop %{buildroot}%{_kf5_sysconfdir}/xdg/autostart/org.kde.%{name}.desktop
%endif %endif
%if 0%{?flatpak}
for i in 16 22 32 48 64 128; do
install -D -m0644 src/icons/${i}-system-file-manager.png %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/system-file-manager.png
done
install -D -m0644 src/icons/system-file-manager.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/system-file-manager.svg
%endif
%check %check
appstream-util validate-relax --nonet %{buildroot}%{_kf5_metainfodir}/org.kde.%{name}.appdata.xml ||: appstream-util validate-relax --nonet %{buildroot}%{_kf5_metainfodir}/org.kde.%{name}.appdata.xml ||:
@ -147,8 +155,12 @@ make test ARGS="--output-on-failure --timeout 10" -C %{_target_platform} ||:
%if 0%{?dolphin_autostart} %if 0%{?dolphin_autostart}
%{_kf5_sysconfdir}/xdg/autostart/org.kde.%{name}.desktop %{_kf5_sysconfdir}/xdg/autostart/org.kde.%{name}.desktop
%else %else
%if 0%{?flatpak}
%{_datadir}/dbus-1/services/org.freedesktop.FileManager1.service
%else
%{_datadir}/dbus-1/services/org.kde.dolphin.FileManager1.service %{_datadir}/dbus-1/services/org.kde.dolphin.FileManager1.service
%endif %endif
%endif
%{_userunitdir}/* %{_userunitdir}/*
%{_kf5_metainfodir}/org.kde.%{name}.appdata.xml %{_kf5_metainfodir}/org.kde.%{name}.appdata.xml
%{_kf5_datadir}/applications/org.kde.%{name}.desktop %{_kf5_datadir}/applications/org.kde.%{name}.desktop
@ -159,6 +171,9 @@ make test ARGS="--output-on-failure --timeout 10" -C %{_target_platform} ||:
%dir %{_kf5_datadir}/dolphin %dir %{_kf5_datadir}/dolphin
%{_kf5_datadir}/dolphin/dolphinpartactions.desktop %{_kf5_datadir}/dolphin/dolphinpartactions.desktop
%{_kf5_datadir}/zsh/site-functions/_dolphin %{_kf5_datadir}/zsh/site-functions/_dolphin
%if 0%{?flatpak}
%{_datadir}/icons/hicolor/*/apps/system-file-manager.*
%endif
%files libs %files libs
%{_kf5_libdir}/libdolphinprivate.so.* %{_kf5_libdir}/libdolphinprivate.so.*

Loading…
Cancel
Save