# Generated using the scripts at https://pagure.io/fedora-cosmic/cosmic-packaging/blob/main/f/scripts ExcludeArch: %{ix86} # Generated by rust2rpm 26 %bcond_without check %global commit 09062c10c9748569d8de90f9c9eaed758522b0c6 %global shortcommit %{sub %{commit} 1 7} %global commitdatestring 2024-11-11 11:05:10 -0500 %global commitdate 20241111 %global cosmic_minver 1.0.0~alpha.3 Name: cosmic-applets Version: 1.0.0~alpha.3^git%{commitdate}.%{shortcommit} Release: %autorelease Summary: Applets for the COSMIC Desktop Environment License: (0BSD OR Apache-2.0 OR MIT) AND Apache-2.0 AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT) AND (Apache-2.0 OR BSD-2-Clause OR MIT) AND (Apache-2.0 OR BSD-3-Clause) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR CC0-1.0 OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 OR MIT OR Zlib) AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND CC0-1.0 AND GPL-3.0-only AND GPL-3.0-or-later AND ISC AND MIT AND (MIT OR Unlicense) AND MPL-2.0 AND Unicode-3.0 AND Unlicense AND Zlib URL: https://github.com/pop-os/cosmic-applets Source0: https://github.com/pop-os/cosmic-applets/archive/%{commit}/cosmic-applets-%{shortcommit}.tar.gz # To create the below sources: # * git clone https://github.com/pop-os/cosmic-applets at the specified commit # * cargo vendor > vendor-config-%%{shortcommit}.toml # * tar -pczf vendor-%%{shortcommit}.tar.gz vendor Source1: vendor-%{shortcommit}.tar.gz # * mv vendor-config-%%{shortcommit}.toml .. Source2: vendor-config-%{shortcommit}.toml # required to compile applets in a reasonable amount of time # necessary even with the multi-binary feature + 8h timeout Patch: better_compile.patch Patch: symlink.patch BuildRequires: cargo-rpm-macros >= 25 BuildRequires: rustc BuildRequires: lld BuildRequires: cargo BuildRequires: dbus-devel BuildRequires: wayland-devel BuildRequires: libinput-devel BuildRequires: libudev-devel BuildRequires: pulseaudio-libs-devel BuildRequires: mesa-libEGL-devel BuildRequires: libxkbcommon-devel BuildRequires: just BuildRequires: desktop-file-utils Requires: cosmic-icon-theme >= %{cosmic_minver} Requires: cosmic-panel %global _description %{expand: %{summary}.} %description %{_description} %prep %autosetup -n cosmic-applets-%{commit} -p1 -a1 %cargo_prep -N # Check if .cargo/config.toml exists if [ -f .cargo/config.toml ]; then # If it exists, append the contents of %%{SOURCE2} to .cargo/config.toml cat %{SOURCE2} >> .cargo/config.toml echo "Appended %{SOURCE2} to .cargo/config.toml" else # If it does not exist, append the contents of %%{SOURCE2} to .cargo/config cat %{SOURCE2} >> .cargo/config echo "Appended %{SOURCE2} to .cargo/config" fi %build # Set vergen environment variables export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'" export VERGEN_GIT_SHA="%{commit}" %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{cargo_vendor_manifest} sed 's/\(.*\) (.*#\(.*\))/\1+git\2/' -i cargo-vendor.txt %install # Set vergen environment variables export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'" export VERGEN_GIT_SHA="%{commit}" just rootdir=%{buildroot} prefix=%{_prefix} install # Fix Firefox desktop file reference sed -e 's/"firefox"/"org.mozilla.firefox"/' -i %{buildroot}%{_datadir}/cosmic/com.system76.CosmicAppList/v1/favorites # COSMIC is not a valid category pre-fedora 41 %if %{defined fedora} && 0%{?fedora} < 41 desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicAppList.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletA11y.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletAudio.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletBattery.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletBluetooth.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletInputSources.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletMinimize.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletNetwork.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletNotifications.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletPower.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletStatusArea.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletTiling.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletTime.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletWorkspaces.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicPanelAppButton.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/com.system76.CosmicPanelWorkspacesButton.desktop desktop-file-install \ --remove-category COSMIC \ --add-category X-COSMIC \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{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.CosmicAppletA11y.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletAudio.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletBattery.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletBluetooth.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletInputSources.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletMinimize.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletNetwork.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletNotifications.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletPower.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletStatusArea.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletTiling.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletTime.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/com.system76.CosmicAppletWorkspaces.desktop 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 %license LICENSE %license LICENSE.dependencies %license cargo-vendor.txt %{_bindir}/cosmic-applets %{_bindir}/cosmic-panel-button %{_bindir}/cosmic-app-list %{_bindir}/cosmic-applet-a11y %{_bindir}/cosmic-applet-audio %{_bindir}/cosmic-applet-battery %{_bindir}/cosmic-applet-bluetooth %{_bindir}/cosmic-applet-input-sources %{_bindir}/cosmic-applet-minimize %{_bindir}/cosmic-applet-network %{_bindir}/cosmic-applet-notifications %{_bindir}/cosmic-applet-power %{_bindir}/cosmic-applet-status-area %{_bindir}/cosmic-applet-tiling %{_bindir}/cosmic-applet-time %{_bindir}/cosmic-applet-workspaces %{_datadir}/applications/com.system76.CosmicAppList.desktop %{_datadir}/applications/com.system76.CosmicAppletA11y.desktop %{_datadir}/applications/com.system76.CosmicAppletAudio.desktop %{_datadir}/applications/com.system76.CosmicAppletBattery.desktop %{_datadir}/applications/com.system76.CosmicAppletBluetooth.desktop %{_datadir}/applications/com.system76.CosmicAppletInputSources.desktop %{_datadir}/applications/com.system76.CosmicAppletMinimize.desktop %{_datadir}/applications/com.system76.CosmicAppletNetwork.desktop %{_datadir}/applications/com.system76.CosmicAppletNotifications.desktop %{_datadir}/applications/com.system76.CosmicAppletPower.desktop %{_datadir}/applications/com.system76.CosmicAppletStatusArea.desktop %{_datadir}/applications/com.system76.CosmicAppletTiling.desktop %{_datadir}/applications/com.system76.CosmicAppletTime.desktop %{_datadir}/applications/com.system76.CosmicAppletWorkspaces.desktop %{_datadir}/applications/com.system76.CosmicPanelAppButton.desktop %{_datadir}/applications/com.system76.CosmicPanelWorkspacesButton.desktop %{_datadir}/applications/com.system76.CosmicPanelLauncherButton.desktop %{_datadir}/metainfo/com.system76.CosmicApplets.metainfo.xml %dir %{_datadir}/cosmic/com.system76.CosmicAppList %{_datadir}/cosmic/com.system76.CosmicAppList/v1/favorites %{_datadir}/cosmic/com.system76.CosmicAppList/v1/filter_top_levels %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicAppletStatusArea.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicAppList.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicAppletAudio-symbolic.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicAppletBattery-symbolic.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicAppletBluetooth-symbolic.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicAppletInputSources-symbolic.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicAppletMinimize.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicAppletNetwork-symbolic.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicAppletNotifications-symbolic.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicAppletPower-symbolic.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicAppletTiling.Off.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicAppletTiling.On.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicAppletTiling-symbolic.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicAppletTime-symbolic.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicAppletWorkspaces-symbolic.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicPanelAppButton.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicPanelWorkspacesButton.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-display-brightness-high-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-display-brightness-low-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-display-brightness-medium-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-display-brightness-off-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-0-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-0-limited-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-0-limited-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-0-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-10-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-10-limited-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-10-limited-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-10-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-100-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-100-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-20-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-20-limited-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-20-limited-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-20-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-35-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-35-limited-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-35-limited-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-35-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-5-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-5-limited-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-5-limited-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-5-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-50-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-50-limited-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-50-limited-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-50-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-65-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-65-limited-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-65-limited-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-65-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-80-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-80-limited-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-80-limited-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-80-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-90-charging-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-battery-level-90-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-bluetooth-active-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-bluetooth-disabled-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-notification-disabled-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-notification-new-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/cosmic-applet-notification-symbolic.svg %{_datadir}/icons/hicolor/scalable/apps/com.system76.CosmicPanelLauncherButton.svg %changelog %autochangelog