ExcludeArch: %{ix86} # Generated by rust2rpm 26 %bcond_without check %global commit cf06e14545fecdffb8d7dd78ccf5789648eacf58 %global shortcommit cf06e14 %global commitdatestring 2024-09-06 17:56:11 +0200 %global commitdate 20240906 Name: cosmic-applets Version: 0.1.0~^%{commitdate}git%{shortcommit} Release: %autorelease Summary: Applets for the COSMIC Desktop Environment # 0BSD OR MIT OR Apache-2.0 # Apache-2.0 # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # BSD-2-Clause # BSD-3-Clause # BSL-1.0 # CC0-1.0 # GPL-3.0 # GPL-3.0-or-later # ISC # MIT # MIT OR Apache-2.0 # MIT OR Apache-2.0 OR CC0-1.0 # MIT OR Apache-2.0 OR Zlib # MIT OR Zlib OR Apache-2.0 # MPL-2.0 # Unlicense OR MIT # Zlib # Zlib OR Apache-2.0 OR MIT License: 0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR MIT AND Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND CC0-1.0 AND GPL-3.0 AND GPL-3.0-or-later AND ISC AND MIT AND MIT OR Apache-2.0 AND MIT OR Apache-2.0 OR CC0-1.0 AND MIT OR Apache-2.0 OR Zlib AND MIT OR Zlib OR Apache-2.0 AND MPL-2.0 AND Unlicense OR MIT AND Zlib AND Zlib OR Apache-2.0 OR MIT # LICENSE.dependencies contains a full license breakdown 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 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-icons Requires: cosmic-panel Requires: hicolor-icon-theme %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 # 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.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.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-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.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 %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