Commit 9507ce64 authored by Ghislain MARY's avatar Ghislain MARY

Set install prefix in Exec= line of .desktop file + register icon and menu...

Set install prefix in Exec= line of .desktop file + register icon and menu entry when installing RPM package.
parent 2107ddff
......@@ -420,7 +420,9 @@ foreach (target ${TARGET_NAME} ${TESTER_TARGET_NAME})
)
endforeach ()
install(FILES "assets/linphone.desktop"
configure_file("assets/linphone.desktop.cmake" "linphone.desktop" @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/linphone.desktop"
DESTINATION "${CMAKE_INSTALL_DATADIR}/applications"
)
install(FILES "${ASSETS_DIR}/images/linphone_logo.svg"
......
......@@ -3,7 +3,7 @@ Name=Linphone
GenericName=SIP Phone
Comment=Linphone is a libre SIP client
Type=Application
Exec=linphone %u
Exec=@CMAKE_INSTALL_PREFIX@/linphone %u
Icon=linphone
Terminal=false
Categories=Network;Telephony;
......
......@@ -57,8 +57,15 @@ make install DESTDIR=%{buildroot}
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post
/sbin/ldconfig
xdg-icon-resource install --novendor --mode system --context apps %{_datarootdir}/icons/hicolor/scalable/apps/linphone.svg linphone;
xdg-desktop-menu install --novendor --mode system %{_datarootdir}/applications/linphone.desktop
%postun
xdg-desktop-menu uninstall --mode system linphone.desktop
xdg-icon-resource uninstall --mode system linphone
/sbin/ldconfig
%files
%defattr(-,root,root,-)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment