From 0882e39c90bbc59e45e6896429ef9b70556a1c23 Mon Sep 17 00:00:00 2001 From: Ryan Brue Date: Sep 30 2024 02:12:19 +0000 Subject: define a cosmic_minver that resolves to the version without the git hash data Signed-off-by: Ryan Brue --- diff --git a/cosmic-packaging-tool/extra_scripts/build.sh b/cosmic-packaging-tool/extra_scripts/build.sh index bcd5513..740f19a 100755 --- a/cosmic-packaging-tool/extra_scripts/build.sh +++ b/cosmic-packaging-tool/extra_scripts/build.sh @@ -2,7 +2,8 @@ # Define a list of strings # list=("cosmic-app-library" "cosmic-applets" "cosmic-bg" "cosmic-comp" "cosmic-edit" "cosmic-files" "cosmic-greeter" "cosmic-icon-theme" "cosmic-osd" "cosmic-settings" "cosmic-settings-daemon" "cosmic-store" "cosmic-notifications" "cosmic-panel" "cosmic-randr" "cosmic-screenshot" "cosmic-workspaces" "xdg-desktop-portal-cosmic") -list=("cosmic-edit" "cosmic-files" "cosmic-greeter" "cosmic-icon-theme" "cosmic-osd" "cosmic-settings" "cosmic-settings-daemon" "cosmic-store" "cosmic-notifications" "cosmic-panel" "cosmic-randr" "cosmic-screenshot" "cosmic-workspaces" "xdg-desktop-portal-cosmic") +# list=("cosmic-edit" "cosmic-files" "cosmic-greeter" "cosmic-icon-theme" "cosmic-osd" "cosmic-settings" "cosmic-settings-daemon" "cosmic-store" "cosmic-notifications" "cosmic-panel" "cosmic-randr" "cosmic-screenshot" "cosmic-workspaces" "xdg-desktop-portal-cosmic") +list=("cosmic-session") # Loop through the list for item in "${list[@]}" diff --git a/rpms/cosmic-app-library/cosmic-app-library.spec b/rpms/cosmic-app-library/cosmic-app-library.spec index ee9b388..81bac54 100644 --- a/rpms/cosmic-app-library/cosmic-app-library.spec +++ b/rpms/cosmic-app-library/cosmic-app-library.spec @@ -7,6 +7,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### %global crate cosmic-app-library diff --git a/rpms/cosmic-applets/cosmic-applets.spec b/rpms/cosmic-applets/cosmic-applets.spec index 1b432b6..3ac4b61 100644 --- a/rpms/cosmic-applets/cosmic-applets.spec +++ b/rpms/cosmic-applets/cosmic-applets.spec @@ -7,6 +7,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-applets Version: ### diff --git a/rpms/cosmic-bg/cosmic-bg.spec b/rpms/cosmic-bg/cosmic-bg.spec index 0cebeea..5fb33c1 100644 --- a/rpms/cosmic-bg/cosmic-bg.spec +++ b/rpms/cosmic-bg/cosmic-bg.spec @@ -7,6 +7,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-bg Version: ### diff --git a/rpms/cosmic-comp/cosmic-comp.spec b/rpms/cosmic-comp/cosmic-comp.spec index e6b98c3..087be44 100644 --- a/rpms/cosmic-comp/cosmic-comp.spec +++ b/rpms/cosmic-comp/cosmic-comp.spec @@ -7,6 +7,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-comp Version: ### diff --git a/rpms/cosmic-edit/cosmic-edit.spec b/rpms/cosmic-edit/cosmic-edit.spec index 099f318..d3b7eae 100644 --- a/rpms/cosmic-edit/cosmic-edit.spec +++ b/rpms/cosmic-edit/cosmic-edit.spec @@ -9,6 +9,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-edit Version: ### diff --git a/rpms/cosmic-files/cosmic-files.spec b/rpms/cosmic-files/cosmic-files.spec index aa377a5..6736da1 100644 --- a/rpms/cosmic-files/cosmic-files.spec +++ b/rpms/cosmic-files/cosmic-files.spec @@ -10,6 +10,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-files Version: ### diff --git a/rpms/cosmic-greeter/cosmic-greeter.spec b/rpms/cosmic-greeter/cosmic-greeter.spec index 945afac..9bd1414 100644 --- a/rpms/cosmic-greeter/cosmic-greeter.spec +++ b/rpms/cosmic-greeter/cosmic-greeter.spec @@ -7,6 +7,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-greeter Version: ### @@ -51,7 +52,7 @@ Requires: greetd-selinux # fprintd-pam is required to start sessions (unclear why) Requires: fprintd-pam Requires: pam -Requires: cosmic-comp +Requires: cosmic-comp >= %{cosmic_minver} %global _description %{expand: %{summary}.} diff --git a/rpms/cosmic-icon-theme/cosmic-icon-theme.spec b/rpms/cosmic-icon-theme/cosmic-icon-theme.spec index 3b4281b..adfcf27 100644 --- a/rpms/cosmic-icon-theme/cosmic-icon-theme.spec +++ b/rpms/cosmic-icon-theme/cosmic-icon-theme.spec @@ -3,6 +3,7 @@ %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-icon-theme Version: ### diff --git a/rpms/cosmic-launcher/cosmic-launcher.spec b/rpms/cosmic-launcher/cosmic-launcher.spec index e924205..209fb2b 100644 --- a/rpms/cosmic-launcher/cosmic-launcher.spec +++ b/rpms/cosmic-launcher/cosmic-launcher.spec @@ -10,6 +10,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-launcher Version: ### diff --git a/rpms/cosmic-notifications/cosmic-notifications.spec b/rpms/cosmic-notifications/cosmic-notifications.spec index 487c977..b0fa8a4 100644 --- a/rpms/cosmic-notifications/cosmic-notifications.spec +++ b/rpms/cosmic-notifications/cosmic-notifications.spec @@ -7,6 +7,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-notifications Version: ### diff --git a/rpms/cosmic-osd/cosmic-osd.spec b/rpms/cosmic-osd/cosmic-osd.spec index 03ef4fd..7d5a387 100644 --- a/rpms/cosmic-osd/cosmic-osd.spec +++ b/rpms/cosmic-osd/cosmic-osd.spec @@ -10,6 +10,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-osd Version: ### diff --git a/rpms/cosmic-panel/cosmic-panel.spec b/rpms/cosmic-panel/cosmic-panel.spec index 18e1b39..047f288 100644 --- a/rpms/cosmic-panel/cosmic-panel.spec +++ b/rpms/cosmic-panel/cosmic-panel.spec @@ -7,6 +7,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-panel Version: ### diff --git a/rpms/cosmic-randr/cosmic-randr.spec b/rpms/cosmic-randr/cosmic-randr.spec index 4f8c1ee..5328bc9 100644 --- a/rpms/cosmic-randr/cosmic-randr.spec +++ b/rpms/cosmic-randr/cosmic-randr.spec @@ -7,6 +7,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-randr Version: ### diff --git a/rpms/cosmic-screenshot/cosmic-screenshot.spec b/rpms/cosmic-screenshot/cosmic-screenshot.spec index 0d4255d..e435a4a 100644 --- a/rpms/cosmic-screenshot/cosmic-screenshot.spec +++ b/rpms/cosmic-screenshot/cosmic-screenshot.spec @@ -10,6 +10,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-screenshot Version: ### diff --git a/rpms/cosmic-session/cosmic-session.spec b/rpms/cosmic-session/cosmic-session.spec index 1b91e06..f0a5e88 100644 --- a/rpms/cosmic-session/cosmic-session.spec +++ b/rpms/cosmic-session/cosmic-session.spec @@ -10,6 +10,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-session Version: ### @@ -38,24 +39,24 @@ BuildRequires: desktop-file-utils BuildRequires: systemd-rpm-macros -Requires: cosmic-app-library -Requires: cosmic-applets -Requires: cosmic-bg -Requires: cosmic-comp -Requires: cosmic-greeter -Requires: cosmic-icons -Requires: cosmic-launcher -Requires: cosmic-notifications -Requires: cosmic-osd -Requires: cosmic-panel -Requires: cosmic-randr -Requires: cosmic-screenshot -Requires: cosmic-settings -Requires: cosmic-settings-daemon -Requires: cosmic-workspaces +Requires: cosmic-app-library >= %{cosmic_minver} +Requires: cosmic-applets >= %{cosmic_minver} +Requires: cosmic-bg >= %{cosmic_minver} +Requires: cosmic-comp >= %{cosmic_minver} +Requires: cosmic-greeter >= %{cosmic_minver} +Requires: cosmic-icons >= %{cosmic_minver} +Requires: cosmic-launcher >= %{cosmic_minver} +Requires: cosmic-notifications >= %{cosmic_minver} +Requires: cosmic-osd >= %{cosmic_minver} +Requires: cosmic-panel >= %{cosmic_minver} +Requires: cosmic-randr >= %{cosmic_minver} +Requires: cosmic-screenshot >= %{cosmic_minver} +Requires: cosmic-settings >= %{cosmic_minver} +Requires: cosmic-settings-daemon >= %{cosmic_minver} +Requires: cosmic-workspaces >= %{cosmic_minver} +Requires: xdg-desktop-portal-cosmic >= %{cosmic_minver} Requires: mozilla-fira-mono-fonts Requires: mozilla-fira-sans-fonts -Requires: xdg-desktop-portal-cosmic Requires: xorg-x11-server-Xwayland %global _description %{expand: diff --git a/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec b/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec index b9032b9..4783c98 100644 --- a/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec +++ b/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec @@ -10,6 +10,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-settings-daemon Version: ### diff --git a/rpms/cosmic-settings/cosmic-settings.spec b/rpms/cosmic-settings/cosmic-settings.spec index 36377a8..5100450 100644 --- a/rpms/cosmic-settings/cosmic-settings.spec +++ b/rpms/cosmic-settings/cosmic-settings.spec @@ -9,6 +9,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-settings Version: ### diff --git a/rpms/cosmic-store/cosmic-store.spec b/rpms/cosmic-store/cosmic-store.spec index b253d2c..87fcf21 100644 --- a/rpms/cosmic-store/cosmic-store.spec +++ b/rpms/cosmic-store/cosmic-store.spec @@ -7,6 +7,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-store Version: ### diff --git a/rpms/cosmic-term/cosmic-term.spec b/rpms/cosmic-term/cosmic-term.spec index b60f4cc..3114709 100644 --- a/rpms/cosmic-term/cosmic-term.spec +++ b/rpms/cosmic-term/cosmic-term.spec @@ -9,6 +9,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-term Version: ### diff --git a/rpms/cosmic-workspaces/cosmic-workspaces.spec b/rpms/cosmic-workspaces/cosmic-workspaces.spec index c3a6e38..9daee7c 100644 --- a/rpms/cosmic-workspaces/cosmic-workspaces.spec +++ b/rpms/cosmic-workspaces/cosmic-workspaces.spec @@ -10,6 +10,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: cosmic-workspaces Version: ### diff --git a/rpms/pop-launcher/pop-launcher.spec b/rpms/pop-launcher/pop-launcher.spec index f7c274e..f5ef4bb 100644 --- a/rpms/pop-launcher/pop-launcher.spec +++ b/rpms/pop-launcher/pop-launcher.spec @@ -7,6 +7,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: pop-launcher Version: ### diff --git a/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec b/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec index c439c05..65da68f 100644 --- a/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec +++ b/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec @@ -10,6 +10,7 @@ ExcludeArch: %{ix86} %global shortcommit %{sub %{commit} 1 7} %global commitdatestring ### %global commitdate ### +%global cosmic_minver ### Name: xdg-desktop-portal-cosmic Version: ### diff --git a/scripts/no-source-srpm.sh b/scripts/no-source-srpm.sh index 3848ad3..31842d9 100755 --- a/scripts/no-source-srpm.sh +++ b/scripts/no-source-srpm.sh @@ -27,3 +27,5 @@ if [ "$NIGHTLY" -eq 1 ]; then else sed -i "/^Version: / s/.*/Version: ${VERSION}^${CURRENT_DATE}/" $NAME.spec fi + +sed -i "/^%global cosmic_minver / s/.*/%global cosmic_minver $VERSION/" $NAME.spec \ No newline at end of file diff --git a/scripts/srpm.sh b/scripts/srpm.sh index 33d71af..504ccd6 100755 --- a/scripts/srpm.sh +++ b/scripts/srpm.sh @@ -79,6 +79,7 @@ if [ "$NIGHTLY" -eq 1 ]; then else sed -i "/^Version: / s/.*/Version: $VERSION/" $NAME.spec fi +sed -i "/^%global cosmic_minver / s/.*/%global cosmic_minver $VERSION/" $NAME.spec sed -i "/^%global commit / s/.*/%global commit $COMMIT/" $NAME.spec sed -i "/^%global commitdate / s/.*/%global commitdate $COMMITDATE/" $NAME.spec sed -i "/^%global commitdatestring / s/.*/%global commitdatestring $COMMITDATESTRING/" $NAME.spec