From 64a9fda6fffd8135a6a9124695aede5654271e26 Mon Sep 17 00:00:00 2001
From: Ryan Brue <ryanbrue@gmail.com>
Date: Aug 06 2024 01:43:50 +0000
Subject: fix: more review


Signed-off-by: Ryan Brue <ryanbrue@gmail.com>

---

diff --git a/rpms/cosmic-app-library/cosmic-app-library.spec b/rpms/cosmic-app-library/cosmic-app-library.spec
index ae492dd..85e2a9a 100644
--- a/rpms/cosmic-app-library/cosmic-app-library.spec
+++ b/rpms/cosmic-app-library/cosmic-app-library.spec
@@ -95,12 +95,6 @@ export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
 export VERGEN_GIT_SHA="%{commit}"
 just rootdir=%{buildroot} prefix=%{_prefix} install
 
-%if %{with check}
-%check
-# Set vergen environment variables
-export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
-export VERGEN_GIT_SHA="%{commit}"
-%cargo_test
 # COSMIC is not a valid category pre-fedora 41
 %if %{defined fedora} && 0%{?fedora} < 41
 desktop-file-install \
@@ -110,7 +104,14 @@ desktop-file-install \
 --dir %{buildroot}%{_datadir}/applications \
 %{buildroot}%{_datadir}/applications/com.system76.CosmicAppLibrary.desktop
 %endif
+
+%check
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppLibrary.desktop
+%if %{with check}
+# Set vergen environment variables
+export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
+export VERGEN_GIT_SHA="%{commit}"
+%cargo_test
 %endif
 
 %files
diff --git a/rpms/cosmic-applets/cosmic-applets.spec b/rpms/cosmic-applets/cosmic-applets.spec
index 7041c33..f4a3a9c 100644
--- a/rpms/cosmic-applets/cosmic-applets.spec
+++ b/rpms/cosmic-applets/cosmic-applets.spec
@@ -104,12 +104,6 @@ export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
 export VERGEN_GIT_SHA="%{commit}"
 just rootdir=%{buildroot} prefix=%{_prefix} install
 
-%if %{with check}
-%check
-# Set vergen environment variables
-export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
-export VERGEN_GIT_SHA="%{commit}"
-%cargo_test
 # COSMIC is not a valid category pre-fedora 41
 %if %{defined fedora} && 0%{?fedora} < 41
 
@@ -226,6 +220,8 @@ desktop-file-install \
 %{buildroot}%{_datadir}/applications/com.system76.CosmicPanelLauncherButton.desktop
 
 %endif
+
+%check
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppList.desktop
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletAudio.desktop
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletBattery.desktop
@@ -242,6 +238,11 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAp
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicPanelAppButton.desktop
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicPanelWorkspacesButton.desktop
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicPanelLauncherButton.desktop
+%if %{with check}
+# Set vergen environment variables
+export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
+export VERGEN_GIT_SHA="%{commit}"
+%cargo_test
 %endif
 
 %files
diff --git a/rpms/cosmic-bg/cosmic-bg.spec b/rpms/cosmic-bg/cosmic-bg.spec
index 09f20d2..959a2a3 100644
--- a/rpms/cosmic-bg/cosmic-bg.spec
+++ b/rpms/cosmic-bg/cosmic-bg.spec
@@ -88,12 +88,6 @@ export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
 export VERGEN_GIT_SHA="%{commit}"
 just rootdir=%{buildroot} prefix=%{_prefix} install
 
-%if %{with check}
-%check
-# Set vergen environment variables
-export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
-export VERGEN_GIT_SHA="%{commit}"
-%cargo_test
 # COSMIC is not a valid category pre-fedora 41
 %if %{defined fedora} && 0%{?fedora} < 41
 desktop-file-install \
@@ -103,7 +97,14 @@ desktop-file-install \
 --dir %{buildroot}%{_datadir}/applications \
 %{buildroot}%{_datadir}/applications/com.system76.CosmicBackground.desktop
 %endif
+
+%check
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicBackground.desktop
+%if %{with check}
+# Set vergen environment variables
+export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
+export VERGEN_GIT_SHA="%{commit}"
+%cargo_test
 %endif
 
 %files
diff --git a/rpms/cosmic-edit/cosmic-edit.spec b/rpms/cosmic-edit/cosmic-edit.spec
index bae2630..a8a2d89 100644
--- a/rpms/cosmic-edit/cosmic-edit.spec
+++ b/rpms/cosmic-edit/cosmic-edit.spec
@@ -98,12 +98,6 @@ export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
 export VERGEN_GIT_SHA="%{commit}"
 just rootdir=%{buildroot} prefix=%{_prefix} install
 
-%if %{with check}
-%check
-# Set vergen environment variables
-export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
-export VERGEN_GIT_SHA="%{commit}"
-%cargo_test
 # COSMIC is not a valid category pre-fedora 41
 %if %{defined fedora} && 0%{?fedora} < 41
 desktop-file-install \
@@ -113,7 +107,14 @@ desktop-file-install \
 --dir %{buildroot}%{_datadir}/applications \
 %{buildroot}%{_datadir}/applications/com.system76.CosmicEdit.desktop
 %endif
+
+%check
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicEdit.desktop
+%if %{with check}
+# Set vergen environment variables
+export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
+export VERGEN_GIT_SHA="%{commit}"
+%cargo_test
 %endif
 
 %files
diff --git a/rpms/cosmic-files/cosmic-files.spec b/rpms/cosmic-files/cosmic-files.spec
index 4ed268f..27894ab 100644
--- a/rpms/cosmic-files/cosmic-files.spec
+++ b/rpms/cosmic-files/cosmic-files.spec
@@ -101,11 +101,6 @@ export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
 export VERGEN_GIT_SHA="%{commit}"
 just rootdir=%{buildroot} prefix=%{_prefix} install
 
-%if %{with check}
-%check
-export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
-export VERGEN_GIT_SHA="%{commit}"
-%cargo_test
 # COSMIC is not a valid category pre-fedora 41
 %if %{defined fedora} && 0%{?fedora} < 41
 desktop-file-install \
@@ -115,7 +110,13 @@ desktop-file-install \
 --dir %{buildroot}%{_datadir}/applications \
 %{buildroot}%{_datadir}/applications/com.system76.CosmicFiles.desktop
 %endif
+
+%check
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicFiles.desktop
+%if %{with check}
+export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
+export VERGEN_GIT_SHA="%{commit}"
+%cargo_test
 %endif
 
 %files
diff --git a/rpms/cosmic-launcher/cosmic-launcher.spec b/rpms/cosmic-launcher/cosmic-launcher.spec
index 9377e3c..569179c 100644
--- a/rpms/cosmic-launcher/cosmic-launcher.spec
+++ b/rpms/cosmic-launcher/cosmic-launcher.spec
@@ -100,12 +100,6 @@ export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
 export VERGEN_GIT_SHA="%{commit}"
 just rootdir=%{buildroot} prefix=%{_prefix} install
 
-%if %{with check}
-%check
-# Set vergen environment variables
-export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
-export VERGEN_GIT_SHA="%{commit}"
-%cargo_test
 # COSMIC is not a valid category pre-fedora 41
 %if %{defined fedora} && 0%{?fedora} < 41
 desktop-file-install \
@@ -115,7 +109,14 @@ desktop-file-install \
 --dir %{buildroot}%{_datadir}/applications \
 %{buildroot}%{_datadir}/applications/com.system76.CosmicLauncher.desktop
 %endif
+
+%check
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicLauncher.desktop
+%if %{with check}
+# Set vergen environment variables
+export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
+export VERGEN_GIT_SHA="%{commit}"
+%cargo_test
 %endif
 
 %files
diff --git a/rpms/cosmic-notifications/cosmic-notifications.spec b/rpms/cosmic-notifications/cosmic-notifications.spec
index 3c4bd82..f2e2e35 100644
--- a/rpms/cosmic-notifications/cosmic-notifications.spec
+++ b/rpms/cosmic-notifications/cosmic-notifications.spec
@@ -95,12 +95,6 @@ export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
 export VERGEN_GIT_SHA="%{commit}"
 just rootdir=%{buildroot} prefix=%{_prefix} install
 
-%if %{with check}
-%check
-# Set vergen environment variables
-export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
-export VERGEN_GIT_SHA="%{commit}"
-%cargo_test
 # COSMIC is not a valid category pre-fedora 41
 %if %{defined fedora} && 0%{?fedora} < 41
 desktop-file-install \
@@ -110,7 +104,14 @@ desktop-file-install \
 --dir %{buildroot}%{_datadir}/applications \
 %{buildroot}%{_datadir}/applications/com.system76.CosmicNotifications.desktop
 %endif
+
+%check
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicNotifications.desktop
+%if %{with check}
+# Set vergen environment variables
+export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
+export VERGEN_GIT_SHA="%{commit}"
+%cargo_test
 %endif
 
 %files
diff --git a/rpms/cosmic-screenshot/cosmic-screenshot.spec b/rpms/cosmic-screenshot/cosmic-screenshot.spec
index 6ce706a..87bc6ba 100644
--- a/rpms/cosmic-screenshot/cosmic-screenshot.spec
+++ b/rpms/cosmic-screenshot/cosmic-screenshot.spec
@@ -83,12 +83,6 @@ export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
 export VERGEN_GIT_SHA="%{commit}"
 just rootdir=%{buildroot} prefix=%{_prefix} install
 
-%if %{with check}
-%check
-# Set vergen environment variables
-export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
-export VERGEN_GIT_SHA="%{commit}"
-%cargo_test
 # COSMIC is not a valid category pre-fedora 41
 %if %{defined fedora} && 0%{?fedora} < 41
 desktop-file-install \
@@ -98,7 +92,14 @@ desktop-file-install \
 --dir %{buildroot}%{_datadir}/applications \
 %{buildroot}%{_datadir}/applications/com.system76.CosmicScreenshot.desktop
 %endif
+
+%check
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicScreenshot.desktop
+%if %{with check}
+# Set vergen environment variables
+export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
+export VERGEN_GIT_SHA="%{commit}"
+%cargo_test
 %endif
 
 %files
diff --git a/rpms/cosmic-settings/cosmic-settings.spec b/rpms/cosmic-settings/cosmic-settings.spec
index 027cf53..f37d3d6 100644
--- a/rpms/cosmic-settings/cosmic-settings.spec
+++ b/rpms/cosmic-settings/cosmic-settings.spec
@@ -101,12 +101,6 @@ export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
 export VERGEN_GIT_SHA="%{commit}"
 just rootdir=%{buildroot} install
 
-%if %{with check}
-%check
-# Set vergen environment variables
-export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
-export VERGEN_GIT_SHA="%{commit}"
-%cargo_test
 # COSMIC is not a valid category pre-fedora 41
 %if %{defined fedora} && 0%{?fedora} < 41
 
@@ -237,6 +231,8 @@ desktop-file-install \
 %{buildroot}%{_datadir}/applications/com.system76.CosmicSettings.Workspaces.desktop
 
 %endif
+
+%check
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicSettings.desktop
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicSettings.About.desktop
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicSettings.Appearance.desktop
@@ -255,6 +251,11 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicSe
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicSettings.Users.desktop
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicSettings.Wallpaper.desktop
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicSettings.Workspaces.desktop
+%if %{with check}
+# Set vergen environment variables
+export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
+export VERGEN_GIT_SHA="%{commit}"
+%cargo_test
 %endif
 
 %files
diff --git a/rpms/cosmic-store/cosmic-store.spec b/rpms/cosmic-store/cosmic-store.spec
index b28ef46..3d8e5ab 100644
--- a/rpms/cosmic-store/cosmic-store.spec
+++ b/rpms/cosmic-store/cosmic-store.spec
@@ -100,12 +100,6 @@ export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
 export VERGEN_GIT_SHA="%{commit}"
 just rootdir=%{buildroot} prefix=%{_prefix} install
 
-%if %{with check}
-%check
-# Set vergen environment variables
-export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
-export VERGEN_GIT_SHA="%{commit}"
-%cargo_test
 # COSMIC is not a valid category pre-fedora 41
 %if %{defined fedora} && 0%{?fedora} < 41
 desktop-file-install \
@@ -115,7 +109,14 @@ desktop-file-install \
 --dir %{buildroot}%{_datadir}/applications \
 %{buildroot}%{_datadir}/applications/com.system76.CosmicStore.desktop
 %endif
+
+%check
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicStore.desktop
+%if %{with check}
+# Set vergen environment variables
+export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
+export VERGEN_GIT_SHA="%{commit}"
+%cargo_test
 %endif
 
 %files
diff --git a/rpms/cosmic-term/cosmic-term.spec b/rpms/cosmic-term/cosmic-term.spec
index ca1d596..db09bcd 100644
--- a/rpms/cosmic-term/cosmic-term.spec
+++ b/rpms/cosmic-term/cosmic-term.spec
@@ -97,12 +97,6 @@ export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
 export VERGEN_GIT_SHA="%{commit}"
 just rootdir=%{buildroot} prefix=%{_prefix} install
 
-%if %{with check}
-%check
-# Set vergen environment variables
-export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
-export VERGEN_GIT_SHA="%{commit}"
-%cargo_test
 # COSMIC is not a valid category pre-fedora 41
 %if %{defined fedora} && 0%{?fedora} < 41
 desktop-file-install \
@@ -112,7 +106,14 @@ desktop-file-install \
 --dir %{buildroot}%{_datadir}/applications \
 %{buildroot}%{_datadir}/applications/com.system76.CosmicTerm.desktop
 %endif
+
+%check
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicTerm.desktop
+%if %{with check}
+# Set vergen environment variables
+export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
+export VERGEN_GIT_SHA="%{commit}"
+%cargo_test
 %endif
 
 %files
diff --git a/rpms/cosmic-workspaces/cosmic-workspaces.spec b/rpms/cosmic-workspaces/cosmic-workspaces.spec
index 82113fd..1e7d9bc 100644
--- a/rpms/cosmic-workspaces/cosmic-workspaces.spec
+++ b/rpms/cosmic-workspaces/cosmic-workspaces.spec
@@ -103,12 +103,6 @@ export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
 export VERGEN_GIT_SHA="%{commit}"
 make install DESTDIR=%{buildroot} prefix=%{_prefix}
 
-%if %{with check}
-%check
-# Set vergen environment variables
-export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
-export VERGEN_GIT_SHA="%{commit}"
-%cargo_test
 # COSMIC is not a valid category pre-fedora 41
 %if %{defined fedora} && 0%{?fedora} < 41
 desktop-file-install \
@@ -118,7 +112,14 @@ desktop-file-install \
 --dir %{buildroot}%{_datadir}/applications \
 %{buildroot}%{_datadir}/applications/com.system76.CosmicWorkspaces.desktop
 %endif
+
+%check
 desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicWorkspaces.desktop
+%if %{with check}
+# Set vergen environment variables
+export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'"
+export VERGEN_GIT_SHA="%{commit}"
+%cargo_test
 %endif
 
 %files

