From 0155cd150f4732a9f71dd99c21fb67d16d6a368a Mon Sep 17 00:00:00 2001 From: olf Date: Fri, 5 Jul 2024 00:00:26 +0200 Subject: [PATCH 1/9] [rpm/meecast.spec] Beautify No altered functionality! --- rpm/meecast.spec | 58 ++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/rpm/meecast.spec b/rpm/meecast.spec index b8c145fd0..a3de0b8d4 100644 --- a/rpm/meecast.spec +++ b/rpm/meecast.spec @@ -4,7 +4,7 @@ %{?qtc_builddir:%define _builddir %qtc_builddir} Name: harbour-meecast -Summary: Weather forecast application for SailfishOS +Summary: MeeCast for SailfishOS Version: 1.1.39 Release: 2 Group: Utility @@ -42,15 +42,15 @@ BuildRequires: qml(Sailfish.Silica) #Requires: zlib %description -MeeCast - multiplatform highly customizable open source weather forecast client based on OMWeather code +MeeCast is a multiplatform, highly customizable, open source, weather forecast client based on OMWeather code. -%if "%{?vendor}" == "chum" -PackageName: Meecast +%if 0%{?_chum} +PackageName: MeeCast Type: desktop-application Categories: - Science - News -DeveloperName: Uladzislau Vasilyeu and OMWeather team +DeveloperName: Vasvlad, OMWeather team and contributors Custom: - Repo: %{url} Icon: %{url}/raw/master/meecast/core/data/desktop/Icon/128/meecast.png @@ -60,19 +60,19 @@ Icon: %{url}/raw/master/meecast/core/data/desktop/Icon/128/meecast.png %package daemon Version: 1.10 Release: 2 -Summary: Daemon for Weather forecast application MeeCast on SailfishOS +Summary: MeeCast background daemon for SailfishOS Group: Utility License: LGPL-2.1-only Requires: harbour-meecast Requires: systemd BuildRequires: pkgconfig(contentaction5) %description daemon -MeeCast daemon for multiplatform highly customizable open source weather forecast client based on OMWeather code +MeeCast daemon obtains weather data in the background. %package lockscreen Version: 0.5 Release: 2 -Summary: Lockscreen Widget for Weather forecast application MeeCast on SailfishOS +Summary: MeeCast widget for SailfishOS' lockscreen Group: Utility License: LGPL-2.1-only Requires: harbour-meecast @@ -80,12 +80,12 @@ Requires: harbour-meecast-daemon => 0.3 Requires: patchmanager Requires: systemd %description lockscreen -MeeCast Lockscreen widget for multiplatform highly customizable open source weather forecast client based on OMWeather code +MeeCast's lockscreen widget displays weather information on SailfishOS' lockscreen. -%package event +%package eventview Version: 1.1 Release: 5 -Summary: Event Widget for Weather forecast application MeeCast on SailfishOS +Summary: MeeCast widget for SailfishOS' eventsview Group: Utility License: LGPL-2.1-only Requires: harbour-meecast @@ -104,8 +104,8 @@ Requires: coreutils Requires: systemd Requires: dconf %endif -%description event -MeeCast event widget for multiplatform highly customizable open source weather forecast client based on OMWeather code +%description eventview +MeeCast eventview widget displays weather information at the top of SailfishOS' eventsview. %prep @@ -139,6 +139,16 @@ if [ "$1" = "0" ]; then fi exit 0 +%preun eventview +%if 0%{?add_weather_widget} +# Removal: +if [ "$1" = "0" ] +# See https://forum.sailfishos.org/t/sfos-4-6-foreca-meecast-how-to-re-enable-the-weather-infos-in-events-view/18678/25 : +# then su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | cut -f 4 -d ' ')" --command='dconf write /desktop/lipstick-jolla-home/force_weather_loading false' || true +then su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | cut -f 4 -d ' ')" --command='dconf reset /desktop/lipstick-jolla-home/force_weather_loading' || true +fi +%endif + %preun lockscreen if [ -f %{_sbindir}/patchmanager ]; then %{_sbindir}/patchmanager -u sailfishos-lockscreen-meecast-patch || true @@ -151,16 +161,6 @@ fi #systemctl-user daemon-reload #exit 0 -%postun event -%if 0%{?add_weather_widget} -# Removal: -if [ "$1" = "0" ] -# See https://forum.sailfishos.org/t/sfos-4-6-foreca-meecast-how-to-re-enable-the-weather-infos-in-events-view/18678/25 : -# then su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | cut -f 4 -d ' ')" --command='dconf write /desktop/lipstick-jolla-home/force_weather_loading false' || true -then su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | cut -f 4 -d ' ')" --command='dconf reset /desktop/lipstick-jolla-home/force_weather_loading' || true -fi -%endif - %post daemon if ps -A | grep "meecastd" ; then killall meecastd ; fi systemctl-user enable meecastd.service @@ -173,7 +173,7 @@ systemctl-user enable meecastd.service systemctl-user start meecastd.service exit 0 -%post event +%post eventview # Activate Lipstick Weather Widget on SFOS > 4.6.0 %if 0%{?add_weather_widget} su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | cut -f 4 -d ' ')" --command='dconf write /desktop/lipstick-jolla-home/force_weather_loading true' || true @@ -184,7 +184,7 @@ su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | c %{_datadir}/applications/harbour-meecast.desktop %{_bindir}/harbour-meecast /usr/share/harbour-meecast -#%{_datadir}/iconsets +#%%{_datadir}/iconsets %{_datadir}/icons/hicolor #/opt/com.meecast.omweather/share @@ -199,7 +199,7 @@ su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | c %defattr(-,root,root,-) %{_datadir}/patchmanager/patches/sailfishos-lockscreen-meecast-patch -%files event +%files eventview %defattr(-,root,root,-) #/usr/lib/qt5/qml/Sailfish/Weather %{_libdir}/qt5/qml/Sailfish/Weather @@ -229,7 +229,7 @@ su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | c - Fixed - Bom.gov.au as weather source shows the previous day. #41 (@vasvlad) * Wed Sep 06 2023 Vlad Vasilyeu - 1.1.34 -- The new version of packages: daemon, lockscreen, event +- The new version of packages: daemon, lockscreen, eventview - Trying to fix segmentation fault in openweathermap.org source - Trying to fix segmentation fault in weather.com source @@ -274,7 +274,7 @@ su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | c * Wed Jan 30 2019 Vlad Vasilyeu - 1.1.21 - Fixed text color on cover and main pages for various themes -- Adapted eventsView for Sailfish 3.0.1.11 +- Adapted eventview for Sailfish 3.0.1.11 - Added refreshing for Icon in lock screen * Sun Nov 11 2018 Vlad Vasilyeu - 1.1.20 @@ -374,7 +374,7 @@ su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | c - Updated Germany, Danish translations * Sun Apr 12 2015 Vlad Vasilyeu - 1.1.0 -- Added event widget +- Added eventview widget * Sun Apr 12 2015 Vlad Vasilyeu - 1.0.4 - Fixed problem with sunrise in fmi source From f2a667d3a9df13bb0d0fafc6321f3cbf2488f57c Mon Sep 17 00:00:00 2001 From: olf Date: Fri, 5 Jul 2024 00:03:19 +0200 Subject: [PATCH 2/9] =?UTF-8?q?[rpm/meecast.spec]=20Increase=20release=20v?= =?UTF-8?q?ersions=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … due to editorial changes all over the spec file. --- rpm/meecast.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpm/meecast.spec b/rpm/meecast.spec index a3de0b8d4..e18f91d96 100644 --- a/rpm/meecast.spec +++ b/rpm/meecast.spec @@ -6,7 +6,7 @@ Name: harbour-meecast Summary: MeeCast for SailfishOS Version: 1.1.39 -Release: 2 +Release: 3 Group: Utility License: LGPL-2.1-only URL: https://github.com/Meecast/meecast @@ -59,7 +59,7 @@ Icon: %{url}/raw/master/meecast/core/data/desktop/Icon/128/meecast.png %package daemon Version: 1.10 -Release: 2 +Release: 3 Summary: MeeCast background daemon for SailfishOS Group: Utility License: LGPL-2.1-only @@ -71,7 +71,7 @@ MeeCast daemon obtains weather data in the background. %package lockscreen Version: 0.5 -Release: 2 +Release: 3 Summary: MeeCast widget for SailfishOS' lockscreen Group: Utility License: LGPL-2.1-only @@ -84,7 +84,7 @@ MeeCast's lockscreen widget displays weather information on SailfishOS' lockscre %package eventview Version: 1.1 -Release: 5 +Release: 6 Summary: MeeCast widget for SailfishOS' eventsview Group: Utility License: LGPL-2.1-only From 78298f7b7cfcf9717b7db680139036ed9025bae9 Mon Sep 17 00:00:00 2001 From: olf Date: Thu, 11 Jul 2024 04:26:46 +0200 Subject: [PATCH 3/9] [rpm/meecast.spec] Overhaul spec file --- rpm/meecast.spec | 77 ++++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 35 deletions(-) diff --git a/rpm/meecast.spec b/rpm/meecast.spec index e18f91d96..b573a038d 100644 --- a/rpm/meecast.spec +++ b/rpm/meecast.spec @@ -5,8 +5,8 @@ Name: harbour-meecast Summary: MeeCast for SailfishOS -Version: 1.1.39 -Release: 3 +Version: 1.1.40 +Release: 1 Group: Utility License: LGPL-2.1-only URL: https://github.com/Meecast/meecast @@ -41,6 +41,15 @@ BuildRequires: qml(Sailfish.Silica) #Requires: qt5-qtdeclarative-import-models2 #Requires: zlib +# Detect missing Lipstick Weather Widget on SailfishOS >= 4.6.0 +# %%{sailfishos_version} is defined in the Sailfish-SDK and in e.g. +# https://build.sailfishos.org/project/prjconf/sailfishos:4.6 +%if %{defined sailfishos_version} && 0%{?sailfishos_version} >= 40600 +%global add_weather_widget 1 +%endif + +# This %%description section includes metadata for SailfishOS:Chum, see +# https://github.com/sailfishos-chum/main/blob/main/Metadata.md %description MeeCast is a multiplatform, highly customizable, open source, weather forecast client based on OMWeather code. @@ -58,53 +67,51 @@ Icon: %{url}/raw/master/meecast/core/data/desktop/Icon/128/meecast.png %package daemon -Version: 1.10 -Release: 3 +Version: 1.10.1 +Release: 1 Summary: MeeCast background daemon for SailfishOS Group: Utility License: LGPL-2.1-only -Requires: harbour-meecast +Requires: %{name} Requires: systemd BuildRequires: pkgconfig(contentaction5) %description daemon MeeCast daemon obtains weather data in the background. %package lockscreen -Version: 0.5 -Release: 3 +Version: 0.5.1 +Release: 1 Summary: MeeCast widget for SailfishOS' lockscreen Group: Utility License: LGPL-2.1-only -Requires: harbour-meecast -Requires: harbour-meecast-daemon => 0.3 +Requires: %{name} +Requires: %{name}-daemon >= 0.3 Requires: patchmanager Requires: systemd %description lockscreen MeeCast's lockscreen widget displays weather information on SailfishOS' lockscreen. -%package eventview -Version: 1.1 -Release: 6 +%package %{?add_weather_widget:eventview}%{!?add_weather_widget:event} +Version: 1.1.1 +Release: 1 Summary: MeeCast widget for SailfishOS' eventsview Group: Utility License: LGPL-2.1-only -Requires: harbour-meecast -Requires: harbour-meecast-daemon => 0.9 -# Detect missing Lipstick Weather Widget on SailfishOS >= 4.6.0 -# %%{sailfishos_version} is defined in the Sailfish-SDK and in e.g. -# https://build.sailfishos.org/project/prjconf/sailfishos:4.6 -%if %{defined sailfishos_version} && 0%{?sailfishos_version} >= 40600 -%define add_weather_widget 1 -%endif +Requires: %{name} +Requires: %{name}-daemon >= 0.9 # Require Lipstick Weather Widget on SailfishOS >= 4.6.0 %if 0%{?add_weather_widget} +Requires: sailfish-version >= 4.6.0 Requires: lipstick-jolla-home-qt5-weather-widget-settings -# Require these to be able to set a dconf key of the primary user +# Require these to be able to set a dconf key of the primary user in %%post and %%preun scriplets Requires: coreutils Requires: systemd Requires: dconf +Provides: %{name}-event +Obsoletes: %{name}-event +Conflicts: %{name}-event %endif -%description eventview +%description %{?add_weather_widget:eventview}%{!?add_weather_widget:event} MeeCast eventview widget displays weather information at the top of SailfishOS' eventsview. @@ -137,9 +144,11 @@ if [ "$1" = "0" ]; then systemctl-user disable meecastd.service systemctl-user stop meecastd.service fi +#if ps -A | grep "meecastd" ; then killall meecastd ; fi +#systemctl-user daemon-reload exit 0 -%preun eventview +%preun %{?add_weather_widget:eventview}%{!?add_weather_widget:event} %if 0%{?add_weather_widget} # Removal: if [ "$1" = "0" ] @@ -154,13 +163,6 @@ if [ -f %{_sbindir}/patchmanager ]; then %{_sbindir}/patchmanager -u sailfishos-lockscreen-meecast-patch || true fi -%postun daemon -#systemctl-user disable meecastd.service -#systemctl-user stop meecastd.service -#if ps -A | grep "meecastd" ; then killall meecastd ; fi -#systemctl-user daemon-reload -#exit 0 - %post daemon if ps -A | grep "meecastd" ; then killall meecastd ; fi systemctl-user enable meecastd.service @@ -173,7 +175,7 @@ systemctl-user enable meecastd.service systemctl-user start meecastd.service exit 0 -%post eventview +%post %{?add_weather_widget:eventview}%{!?add_weather_widget:event} # Activate Lipstick Weather Widget on SFOS > 4.6.0 %if 0%{?add_weather_widget} su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | cut -f 4 -d ' ')" --command='dconf write /desktop/lipstick-jolla-home/force_weather_loading true' || true @@ -181,9 +183,9 @@ su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | c %files %defattr(-,root,root,-) -%{_datadir}/applications/harbour-meecast.desktop -%{_bindir}/harbour-meecast -/usr/share/harbour-meecast +%{_datadir}/applications/%{name}.desktop +%{_bindir}/%{name} +/usr/share/%{name} #%%{_datadir}/iconsets %{_datadir}/icons/hicolor #/opt/com.meecast.omweather/share @@ -199,13 +201,18 @@ su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | c %defattr(-,root,root,-) %{_datadir}/patchmanager/patches/sailfishos-lockscreen-meecast-patch -%files eventview +%files %{?add_weather_widget:eventview}%{!?add_weather_widget:event} %defattr(-,root,root,-) #/usr/lib/qt5/qml/Sailfish/Weather %{_libdir}/qt5/qml/Sailfish/Weather %changelog +* Thu Jul 11 2024 Vlad Vasilyeu - 1.1.40 +- Overhauled spec file +- A build fix (999d41f), closes issue #56 +- Another build fix (6ae896b), closes issue #58 + * Thu Jun 13 2024 Vlad Vasilyeu - 1.1.39-2 - Adapted to SailfishOS 4.6 - Fixed license From 2149a677a19bec4654b622aeeaacdc616663e44b Mon Sep 17 00:00:00 2001 From: olf Date: Thu, 11 Jul 2024 04:30:02 +0200 Subject: [PATCH 4/9] [rpm/meecast.spec] Enhance a single changelog entry --- rpm/meecast.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/meecast.spec b/rpm/meecast.spec index b573a038d..bc37ca893 100644 --- a/rpm/meecast.spec +++ b/rpm/meecast.spec @@ -209,7 +209,7 @@ su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | c %changelog * Thu Jul 11 2024 Vlad Vasilyeu - 1.1.40 -- Overhauled spec file +- Overhauled spec file, see PR #57 - A build fix (999d41f), closes issue #56 - Another build fix (6ae896b), closes issue #58 From e42a8f44b62073049875eb88b9ab4343b6f813a2 Mon Sep 17 00:00:00 2001 From: olf Date: Fri, 12 Jul 2024 01:27:00 +0200 Subject: [PATCH 5/9] =?UTF-8?q?[rpm/meecast.spec]=20Simplify=20structure?= =?UTF-8?q?=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … and build both sub packages `eventview` and `event` when macro `sailfishos_version` is undefined. --- rpm/meecast.spec | 115 ++++++++++++++++++++++++++++------------------- 1 file changed, 70 insertions(+), 45 deletions(-) diff --git a/rpm/meecast.spec b/rpm/meecast.spec index bc37ca893..d18029170 100644 --- a/rpm/meecast.spec +++ b/rpm/meecast.spec @@ -3,6 +3,7 @@ %{!?qtc_make:%define qtc_make make} %{?qtc_builddir:%define _builddir %qtc_builddir} + Name: harbour-meecast Summary: MeeCast for SailfishOS Version: 1.1.40 @@ -41,18 +42,10 @@ BuildRequires: qml(Sailfish.Silica) #Requires: qt5-qtdeclarative-import-models2 #Requires: zlib -# Detect missing Lipstick Weather Widget on SailfishOS >= 4.6.0 -# %%{sailfishos_version} is defined in the Sailfish-SDK and in e.g. -# https://build.sailfishos.org/project/prjconf/sailfishos:4.6 -%if %{defined sailfishos_version} && 0%{?sailfishos_version} >= 40600 -%global add_weather_widget 1 -%endif - # This %%description section includes metadata for SailfishOS:Chum, see # https://github.com/sailfishos-chum/main/blob/main/Metadata.md %description MeeCast is a multiplatform, highly customizable, open source, weather forecast client based on OMWeather code. - %if 0%{?_chum} PackageName: MeeCast Type: desktop-application @@ -75,9 +68,11 @@ License: LGPL-2.1-only Requires: %{name} Requires: systemd BuildRequires: pkgconfig(contentaction5) + %description daemon MeeCast daemon obtains weather data in the background. + %package lockscreen Version: 0.5.1 Release: 1 @@ -88,10 +83,16 @@ Requires: %{name} Requires: %{name}-daemon >= 0.3 Requires: patchmanager Requires: systemd + %description lockscreen MeeCast's lockscreen widget displays weather information on SailfishOS' lockscreen. -%package %{?add_weather_widget:eventview}%{!?add_weather_widget:event} + +# Detect building for SailfishOS >= 4.6.0 or build subpackage eventview any way +# %%{sailfishos_version} is defined in the Sailfish-SDK and in e.g. +# https://build.sailfishos.org/project/prjconf/sailfishos:4.6 +%if %{undefined sailfishos_version} || 0%{?sailfishos_version} >= 40600 +%package eventview Version: 1.1.1 Release: 1 Summary: MeeCast widget for SailfishOS' eventsview @@ -100,19 +101,35 @@ License: LGPL-2.1-only Requires: %{name} Requires: %{name}-daemon >= 0.9 # Require Lipstick Weather Widget on SailfishOS >= 4.6.0 -%if 0%{?add_weather_widget} -Requires: sailfish-version >= 4.6.0 Requires: lipstick-jolla-home-qt5-weather-widget-settings # Require these to be able to set a dconf key of the primary user in %%post and %%preun scriplets Requires: coreutils Requires: systemd Requires: dconf +# Provide, obsolete and conflict with the event subpackage for SailfishOS < 4.6.0 Provides: %{name}-event Obsoletes: %{name}-event Conflicts: %{name}-event + +%description eventview +MeeCast eventview widget displays weather information at the top of SailfishOS' eventsview. %endif -%description %{?add_weather_widget:eventview}%{!?add_weather_widget:event} + +# Detect building for SailfishOS < 4.6.0 or build subpackage event any way +%if 0%{?sailfishos_version} < 40600 +%package event +Version: 1.1.1 +Release: 1 +Summary: MeeCast widget for SailfishOS' eventsview +Group: Utility +License: LGPL-2.1-only +Requires: %{name} +Requires: %{name}-daemon >= 0.9 +Requires: sailfish-version < 4.6.0 + +%description event MeeCast eventview widget displays weather information at the top of SailfishOS' eventsview. +%endif %prep @@ -131,12 +148,11 @@ desktop-file-install --delete-original \ %{buildroot}%{_datadir}/applications/*.desktop -%pre lockscreen -if [ -f %{_sbindir}/patchmanager ]; then - %{_sbindir}/patchmanager -u sailfishos-lockscreen-meecast-patch || true -fi - -%pre daemon +%post daemon +pkill meecastd +systemctl-user enable meecastd.service +systemctl-user start meecastd.service +exit 0 %preun daemon # Removal @@ -144,43 +160,43 @@ if [ "$1" = "0" ]; then systemctl-user disable meecastd.service systemctl-user stop meecastd.service fi -#if ps -A | grep "meecastd" ; then killall meecastd ; fi +#pkill meecastd #systemctl-user daemon-reload exit 0 -%preun %{?add_weather_widget:eventview}%{!?add_weather_widget:event} -%if 0%{?add_weather_widget} -# Removal: -if [ "$1" = "0" ] -# See https://forum.sailfishos.org/t/sfos-4-6-foreca-meecast-how-to-re-enable-the-weather-infos-in-events-view/18678/25 : -# then su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | cut -f 4 -d ' ')" --command='dconf write /desktop/lipstick-jolla-home/force_weather_loading false' || true -then su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | cut -f 4 -d ' ')" --command='dconf reset /desktop/lipstick-jolla-home/force_weather_loading' || true -fi -%endif -%preun lockscreen +%pre lockscreen if [ -f %{_sbindir}/patchmanager ]; then - %{_sbindir}/patchmanager -u sailfishos-lockscreen-meecast-patch || true + %{_sbindir}/patchmanager -u sailfishos-lockscreen-meecast-patch || true fi -%post daemon -if ps -A | grep "meecastd" ; then killall meecastd ; fi -systemctl-user enable meecastd.service -systemctl-user start meecastd.service -exit 0 - %post lockscreen -if ps -A | grep "meecastd" ; then killall meecastd ; fi +pkill meecastd systemctl-user enable meecastd.service systemctl-user start meecastd.service exit 0 -%post %{?add_weather_widget:eventview}%{!?add_weather_widget:event} -# Activate Lipstick Weather Widget on SFOS > 4.6.0 -%if 0%{?add_weather_widget} +%preun lockscreen +if [ -f %{_sbindir}/patchmanager ]; then + %{_sbindir}/patchmanager -u sailfishos-lockscreen-meecast-patch || true +fi + + +%if %{undefined sailfishos_version} || 0%{?sailfishos_version} >= 40600 +%post eventview +# Activate Lipstick Weather Widget on SFOS >= 4.6.0 su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | cut -f 4 -d ' ')" --command='dconf write /desktop/lipstick-jolla-home/force_weather_loading true' || true + +%preun eventview +# Removal: +if [ "$1" = "0" ]; then +# See https://forum.sailfishos.org/t/sfos-4-6-foreca-meecast-how-to-re-enable-the-weather-infos-in-events-view/18678/25 : +# su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | cut -f 4 -d ' ')" --command='dconf write /desktop/lipstick-jolla-home/force_weather_loading false' || true + su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | cut -f 4 -d ' ')" --command='dconf reset /desktop/lipstick-jolla-home/force_weather_loading' || true +fi %endif + %files %defattr(-,root,root,-) %{_datadir}/applications/%{name}.desktop @@ -201,17 +217,26 @@ su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | c %defattr(-,root,root,-) %{_datadir}/patchmanager/patches/sailfishos-lockscreen-meecast-patch -%files %{?add_weather_widget:eventview}%{!?add_weather_widget:event} +%if %{undefined sailfishos_version} || 0%{?sailfishos_version} >= 40600 +%files eventview %defattr(-,root,root,-) #/usr/lib/qt5/qml/Sailfish/Weather %{_libdir}/qt5/qml/Sailfish/Weather +%endif + +%if 0%{?sailfishos_version} < 40600 +%files event +%defattr(-,root,root,-) +#/usr/lib/qt5/qml/Sailfish/Weather +%{_libdir}/qt5/qml/Sailfish/Weather +%endif %changelog * Thu Jul 11 2024 Vlad Vasilyeu - 1.1.40 -- Overhauled spec file, see PR #57 -- A build fix (999d41f), closes issue #56 -- Another build fix (6ae896b), closes issue #58 +- Overhaul spec file, see PR #57 +- A build fix (999d41f) closes issue #56 +- Another build fix (6ae896b) closes issue #58 * Thu Jun 13 2024 Vlad Vasilyeu - 1.1.39-2 - Adapted to SailfishOS 4.6 @@ -614,7 +639,7 @@ su --login "$(loginctl --no-legend list-sessions | grep -F seat0 | tr -s ' ' | c - Fixed problem with refreshing weather forecast * Fri Jan 17 2014 Vlad Vasilyeu - 0.8.4.1 -- First release SailfishOS +- First release for SailfishOS # Changelog format: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/SF4VVE4NBEDQJDJZ4DJ6YW2DTGMWP23E/#6O6DFC6GDOLCU7QC3QJKJ3VCUGAOTD24 From 55aed6bb3d051eb99ee6e65ea4d11bd2fa86053b Mon Sep 17 00:00:00 2001 From: olf Date: Fri, 12 Jul 2024 01:32:09 +0200 Subject: [PATCH 6/9] [rpm/meecast.spec] Always use `pkill` with its `-x` option --- rpm/meecast.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rpm/meecast.spec b/rpm/meecast.spec index d18029170..457aac2e9 100644 --- a/rpm/meecast.spec +++ b/rpm/meecast.spec @@ -149,7 +149,7 @@ desktop-file-install --delete-original \ %post daemon -pkill meecastd +pkill -x meecastd systemctl-user enable meecastd.service systemctl-user start meecastd.service exit 0 @@ -160,7 +160,7 @@ if [ "$1" = "0" ]; then systemctl-user disable meecastd.service systemctl-user stop meecastd.service fi -#pkill meecastd +#pkill -x meecastd #systemctl-user daemon-reload exit 0 @@ -171,7 +171,7 @@ if [ -f %{_sbindir}/patchmanager ]; then fi %post lockscreen -pkill meecastd +pkill -x meecastd systemctl-user enable meecastd.service systemctl-user start meecastd.service exit 0 From dc3a7a1c011d2147b5e3c4c493dd974f349d46b1 Mon Sep 17 00:00:00 2001 From: olf Date: Sun, 14 Jul 2024 16:19:09 +0200 Subject: [PATCH 7/9] [rpm/meecast.spec] Set compatible RPM compression etc. See https://forum.sailfishos.org/t/sfos-4-5-0-switches-rpm-compression-what-does-that-mean-for-existing-rpms/13153/23?u=olf --- rpm/meecast.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/rpm/meecast.spec b/rpm/meecast.spec index 457aac2e9..602ef51eb 100644 --- a/rpm/meecast.spec +++ b/rpm/meecast.spec @@ -3,9 +3,12 @@ %{!?qtc_make:%define qtc_make make} %{?qtc_builddir:%define _builddir %qtc_builddir} +%define _binary_payload w2.xzdio Name: harbour-meecast Summary: MeeCast for SailfishOS +# Versioning for all (sub-)packages adheres to Semantic Versioning 2.0.0, see https://semver.org/ +# Mind that Sailfish-OBS sets the version of all subpackages to the one of the primary package. Version: 1.1.40 Release: 1 Group: Utility @@ -54,8 +57,8 @@ Categories: - News DeveloperName: Vasvlad, OMWeather team and contributors Custom: - - Repo: %{url} -Icon: %{url}/raw/master/meecast/core/data/desktop/Icon/128/meecast.png + - Repo: %{url}/tree/sailfishos +Icon: %{url}/raw/sailfishos/meecast/core/data/desktop/Icon/meecast.svg %endif @@ -88,7 +91,7 @@ Requires: systemd MeeCast's lockscreen widget displays weather information on SailfishOS' lockscreen. -# Detect building for SailfishOS >= 4.6.0 or build subpackage eventview any way +# Detect building for SailfishOS >= 4.6.0 or build subpackage eventview any way. # %%{sailfishos_version} is defined in the Sailfish-SDK and in e.g. # https://build.sailfishos.org/project/prjconf/sailfishos:4.6 %if %{undefined sailfishos_version} || 0%{?sailfishos_version} >= 40600 @@ -115,7 +118,7 @@ Conflicts: %{name}-event MeeCast eventview widget displays weather information at the top of SailfishOS' eventsview. %endif -# Detect building for SailfishOS < 4.6.0 or build subpackage event any way +# Detect building for SailfishOS < 4.6.0 or build subpackage event any way. %if 0%{?sailfishos_version} < 40600 %package event Version: 1.1.1 From ad21ba4942ab4e1589d89716603efa8859e20b61 Mon Sep 17 00:00:00 2001 From: olf Date: Sun, 8 Sep 2024 21:14:17 +0200 Subject: [PATCH 8/9] [meecast.spec] Update rsp. create metadata for SailfishOS:Chum --- rpm/meecast.spec | 95 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 2 deletions(-) diff --git a/rpm/meecast.spec b/rpm/meecast.spec index 602ef51eb..f4666ab8c 100644 --- a/rpm/meecast.spec +++ b/rpm/meecast.spec @@ -53,12 +53,24 @@ MeeCast is a multiplatform, highly customizable, open source, weather forecast c PackageName: MeeCast Type: desktop-application Categories: + - Network - Science + - Utility - News + - DataVisualization + - Qt DeveloperName: Vasvlad, OMWeather team and contributors Custom: - - Repo: %{url}/tree/sailfishos -Icon: %{url}/raw/sailfishos/meecast/core/data/desktop/Icon/meecast.svg + Repo: %{url}/tree/sailfishos +PackageIcon: %{url}/raw/sailfishos/meecast/core/data/desktop/Icon/meecast.svg +Screenshots: + - https://openrepos.net/sites/default/files/packages/13090/screenshot-sailfishosemulator2.png + - https://openrepos.net/sites/default/files/packages/13090/screenshot-sailfishosemulator.png + - https://openrepos.net/sites/default/files/packages/13090/screenshot-cover.png +Links: + Homepage: https://openrepos.net/content/vasvlad/meecast-sailfishos + Help: https://openrepos.net/content/vasvlad/meecast-sailfishos#comments + Bugtracker: %{url}/issues %endif @@ -74,6 +86,25 @@ BuildRequires: pkgconfig(contentaction5) %description daemon MeeCast daemon obtains weather data in the background. +%if 0%{?_chum} +PackageName: MeeCast daemon +Type: desktop-application +Categories: + - Network + - Science + - Utility + - News + - DataVisualization + - Qt +DeveloperName: Vasvlad, OMWeather team and contributors +Custom: + Repo: %{url}/tree/sailfishos +PackageIcon: %{url}/raw/sailfishos/meecast/core/data/desktop/Icon/meecast.svg +Links: + Homepage: https://openrepos.net/content/vasvlad/meecast-daemon + Help: https://openrepos.net/content/vasvlad/meecast-daemon#comments + Bugtracker: %{url}/issues +%endif %package lockscreen @@ -89,6 +120,26 @@ Requires: systemd %description lockscreen MeeCast's lockscreen widget displays weather information on SailfishOS' lockscreen. +%if 0%{?_chum} +PackageName: MeeCast lockscreen widget +Type: desktop-application +Categories: + - Network + - Science + - Utility + - News + - DataVisualization + - Qt + - Applet +DeveloperName: Vasvlad, OMWeather team and contributors +Custom: + Repo: %{url}/tree/sailfishos +PackageIcon: %{url}/raw/sailfishos/meecast/core/data/desktop/Icon/meecast.svg +Links: + Homepage: https://openrepos.net/content/vasvlad/meecast-lockscreen + Help: https://openrepos.net/content/vasvlad/meecast-lockscreen#comments + Bugtracker: %{url}/issues +%endif # Detect building for SailfishOS >= 4.6.0 or build subpackage eventview any way. @@ -116,6 +167,26 @@ Conflicts: %{name}-event %description eventview MeeCast eventview widget displays weather information at the top of SailfishOS' eventsview. +%if 0%{?_chum} +PackageName: MeeCast eventsview widget for SailfishOS ≥ 4.6.0 +Type: desktop-application +Categories: + - Network + - Science + - Utility + - News + - DataVisualization + - Qt + - Applet +DeveloperName: Vasvlad, OMWeather team and contributors +Custom: + Repo: %{url}/tree/sailfishos +PackageIcon: %{url}/raw/sailfishos/meecast/core/data/desktop/Icon/meecast.svg +Links: + Homepage: https://openrepos.net/content/vasvlad/meecast-event-view + Help: https://openrepos.net/content/vasvlad/meecast-event-view#comments + Bugtracker: %{url}/issues +%endif %endif # Detect building for SailfishOS < 4.6.0 or build subpackage event any way. @@ -132,6 +203,26 @@ Requires: sailfish-version < 4.6.0 %description event MeeCast eventview widget displays weather information at the top of SailfishOS' eventsview. +%if 0%{?_chum} +PackageName: MeeCast eventsview widget for SailfishOS < 4.6.0 +Type: desktop-application +Categories: + - Network + - Science + - Utility + - News + - DataVisualization + - Qt + - Applet +DeveloperName: Vasvlad, OMWeather team and contributors +Custom: + Repo: %{url}/tree/sailfishos +PackageIcon: %{url}/raw/sailfishos/meecast/core/data/desktop/Icon/meecast.svg +Links: + Homepage: https://openrepos.net/content/vasvlad/meecast-event-view + Help: https://openrepos.net/content/vasvlad/meecast-event-view#comments + Bugtracker: %{url}/issues +%endif %endif From c634ff7ffc545008322b81d3d106e9e8b2b07652 Mon Sep 17 00:00:00 2001 From: olf Date: Mon, 9 Sep 2024 00:30:31 +0200 Subject: [PATCH 9/9] [rpm/meecast.spec] Add screenshots for all sub-packages --- rpm/meecast.spec | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/rpm/meecast.spec b/rpm/meecast.spec index b9699d856..7c58c136c 100644 --- a/rpm/meecast.spec +++ b/rpm/meecast.spec @@ -100,6 +100,8 @@ DeveloperName: Vasvlad, OMWeather team and contributors Custom: Repo: %{url}/tree/sailfishos PackageIcon: %{url}/raw/sailfishos/meecast/core/data/desktop/Icon/meecast.svg +Screenshots: + - https://openrepos.net/sites/default/files/packages/13234/screenshot-20150114135243.png Links: Homepage: https://openrepos.net/content/vasvlad/meecast-daemon Help: https://openrepos.net/content/vasvlad/meecast-daemon#comments @@ -135,6 +137,8 @@ DeveloperName: Vasvlad, OMWeather team and contributors Custom: Repo: %{url}/tree/sailfishos PackageIcon: %{url}/raw/sailfishos/meecast/core/data/desktop/Icon/meecast.svg +Screenshots: + - https://openrepos.net/sites/default/files/packages/678/screenshot-20150201162807.png Links: Homepage: https://openrepos.net/content/vasvlad/meecast-lockscreen Help: https://openrepos.net/content/vasvlad/meecast-lockscreen#comments @@ -182,6 +186,10 @@ DeveloperName: Vasvlad, OMWeather team and contributors Custom: Repo: %{url}/tree/sailfishos PackageIcon: %{url}/raw/sailfishos/meecast/core/data/desktop/Icon/meecast.svg +Screenshots: + - https://openrepos.net/sites/default/files/packages/13234/screenshot-20151006090340.png + - https://openrepos.net/sites/default/files/packages/13234/screenshot-20151011183657.png + - https://openrepos.net/sites/default/files/packages/13234/screenshot-20151014084258.png Links: Homepage: https://openrepos.net/content/vasvlad/meecast-event-view Help: https://openrepos.net/content/vasvlad/meecast-event-view#comments @@ -218,6 +226,10 @@ DeveloperName: Vasvlad, OMWeather team and contributors Custom: Repo: %{url}/tree/sailfishos PackageIcon: %{url}/raw/sailfishos/meecast/core/data/desktop/Icon/meecast.svg +Screenshots: + - https://openrepos.net/sites/default/files/packages/13234/screenshot-20151006090340.png + - https://openrepos.net/sites/default/files/packages/13234/screenshot-20151011183657.png + - https://openrepos.net/sites/default/files/packages/13234/screenshot-20151014084258.png Links: Homepage: https://openrepos.net/content/vasvlad/meecast-event-view Help: https://openrepos.net/content/vasvlad/meecast-event-view#comments