diff --git a/0001-Install-the-application-icon-in-the-right-directory.patch b/0001-Install-the-application-icon-in-the-right-directory.patch new file mode 100644 index 0000000..6f7c65e --- /dev/null +++ b/0001-Install-the-application-icon-in-the-right-directory.patch @@ -0,0 +1,24 @@ +From 121ffde065273508a63b34fe9633e324a245fdd3 Mon Sep 17 00:00:00 2001 +From: Christophe Giboudeaux +Date: Tue, 19 Jan 2021 10:50:48 +0100 +Subject: [PATCH] Install the application icon in the right directory + +--- + app/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt +index 20afc5e..76ee819 100644 +--- a/app/CMakeLists.txt ++++ b/app/CMakeLists.txt +@@ -35,6 +35,6 @@ target_link_libraries( diskmonitor + ) + + install(TARGETS diskmonitor ${INSTALL_TARGETS_DEFAULT_ARGS} ) +-install(FILES icon.svg RENAME diskmonitor.svg DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/" ) ++install(FILES icon.svg RENAME diskmonitor.svg DESTINATION "${ICON_INSTALL_DIR}/hicolor/scalable/apps/" ) + install(FILES diskmonitor.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications/" ) + +-- +2.29.2 + diff --git a/diskmonitor-desktop.patch b/diskmonitor-desktop.patch deleted file mode 100644 index 9f2e90c..0000000 --- a/diskmonitor-desktop.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/app/diskmonitor.desktop b/app/diskmonitor.desktop -index a24b401..3afa79d 100644 ---- a/app/diskmonitor.desktop -+++ b/app/diskmonitor.desktop -@@ -2,8 +2,10 @@ - Name=DisKMonitor - GenericName=Tool to monitor SMART devices and MDRaid health status - Comment=Tool to monitor SMART devices and MDRaid health status --Exec=diskmonitor -+Exec=/usr/bin/xdg-su -c /usr/sbin/diskmonitor - Terminal=false - Icon=diskmonitor - Type=Application --Categories=Qt;KDE;System; -+Categories=Qt;KDE;System;Monitor; -+X-KDE-StartupNotify=true -+X-SuSE-translate=true diff --git a/diskmonitor-installdirs.patch b/diskmonitor-installdirs.patch deleted file mode 100644 index 1fde32e..0000000 --- a/diskmonitor-installdirs.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt -index 20afc5e..f1f31b5 100644 ---- a/app/CMakeLists.txt -+++ b/app/CMakeLists.txt -@@ -34,7 +34,7 @@ target_link_libraries( diskmonitor - KF5::XmlGui - ) - --install(TARGETS diskmonitor ${INSTALL_TARGETS_DEFAULT_ARGS} ) --install(FILES icon.svg RENAME diskmonitor.svg DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/" ) -+install(TARGETS diskmonitor DESTINATION "${SBIN_INSTALL_DIR}" ) -+install(FILES icon.svg RENAME diskmonitor.svg DESTINATION "${ICON_INSTALL_DIR}/hicolor/scalable/apps/" ) - install(FILES diskmonitor.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications/" ) - diff --git a/diskmonitor.changes b/diskmonitor.changes index bfebbc3..e0f9847 100644 --- a/diskmonitor.changes +++ b/diskmonitor.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jan 19 09:54:36 UTC 2021 - Christophe Giboudeaux + +- Replace diskmonitor-installdirs.patch with + 0001-Install-the-application-icon-in-the-right-directory.patch +- Drop diskmonitor-desktop.patch + ------------------------------------------------------------------- Sun Aug 16 17:50:53 UTC 2020 - Christophe Giboudeaux diff --git a/diskmonitor.spec b/diskmonitor.spec index c24bab5..bb225a8 100644 --- a/diskmonitor.spec +++ b/diskmonitor.spec @@ -23,11 +23,10 @@ License: GPL-2.0-only Group: Hardware/Other URL: https://github.com/papylhomme/diskmonitor Source0: https://github.com/papylhomme/diskmonitor/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch1: diskmonitor-desktop.patch -Patch2: diskmonitor-installdirs.patch +# PATCH-FIX-UPSTREAM +Patch0: 0001-Install-the-application-icon-in-the-right-directory.patch BuildRequires: extra-cmake-modules BuildRequires: fdupes -BuildRequires: unzip BuildRequires: update-desktop-files BuildRequires: cmake(KF5ConfigWidgets) BuildRequires: cmake(KF5CoreAddons) @@ -42,7 +41,6 @@ BuildRequires: cmake(Qt5DBus) BuildRequires: cmake(Qt5Quick) BuildRequires: cmake(Qt5Widgets) Requires: udisks2 >= 2.1 -Requires: xdg-utils Recommends: diskmonitor-lang = %{version} %description @@ -70,11 +68,13 @@ Applet: %build %cmake_kf5 -d build -%make_jobs +%cmake_build %install %kf5_makeinstall -C build +%suse_update_desktop_file diskmonitor Monitor + %find_lang diskmonitor diskmonitor.lang %find_lang plasma_applet_org.papylhomme.diskmonitor diskmonitor.lang @@ -86,16 +86,15 @@ Applet: %dir %{_kf5_configkcfgdir} %dir %{_kf5_qmldir}/org/ %{_kf5_appstreamdir}/org.papylhomme.diskmonitor.appdata.xml +%{_kf5_bindir}/diskmonitor %{_kf5_configkcfgdir}/diskmonitor.kcfg %{_kf5_iconsdir}/hicolor/scalable/apps/diskmonitor.svg %{_kf5_notifydir}/diskmonitor.notifyrc %{_kf5_plasmadir}/plasmoids/ %{_kf5_qmldir}/org/papylhomme/ -%{_kf5_sbindir}/diskmonitor %{_kf5_servicesdir}/plasma-applet-org.papylhomme.diskmonitor.desktop %{_kf5_sharedir}/applications/diskmonitor.desktop - %files lang -f diskmonitor.lang %changelog