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}) ...@@ -420,7 +420,9 @@ foreach (target ${TARGET_NAME} ${TESTER_TARGET_NAME})
) )
endforeach () 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" DESTINATION "${CMAKE_INSTALL_DATADIR}/applications"
) )
install(FILES "${ASSETS_DIR}/images/linphone_logo.svg" install(FILES "${ASSETS_DIR}/images/linphone_logo.svg"
......
...@@ -3,7 +3,7 @@ Name=Linphone ...@@ -3,7 +3,7 @@ Name=Linphone
GenericName=SIP Phone GenericName=SIP Phone
Comment=Linphone is a libre SIP client Comment=Linphone is a libre SIP client
Type=Application Type=Application
Exec=linphone %u Exec=@CMAKE_INSTALL_PREFIX@/linphone %u
Icon=linphone Icon=linphone
Terminal=false Terminal=false
Categories=Network;Telephony; Categories=Network;Telephony;
......
...@@ -57,8 +57,15 @@ make install DESTDIR=%{buildroot} ...@@ -57,8 +57,15 @@ make install DESTDIR=%{buildroot}
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig %post
%postun -p /sbin/ldconfig /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 %files
%defattr(-,root,root,-) %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