## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec ExcludeArch: %{ix86} # Generated by rust2rpm 26 %bcond_without check %global crate cosmic-ext-applet-system-monitor %global crateid dev.DBrox.CosmicSystemMonitor %global shortversion 0.2.6 %global commit 1f643d62ef5bc46db4adfd25711705de49b6ed94 #global committag 1 %global commitversion %{?committag:%{commit}}%{?!committag:%{shortversion}} %global shortcommitversion %{?committag:%(c=%{commit}; echo ${c:0:7})}%{?!committag:%{shortversion}} %global commitdatestring 2025-08-24 05:58:25 +0200 %global commitdate 20250824 %global commitgit %{?committag:^git%{commitdate}.%(c=%{commit}; echo ${c:0:7})} Name: cosmic-ext-applet-system-monitor Version: %{shortversion}%{commitgit} Release: %autorelease Summary: System monitor applet for the COSMIC DE License: GPL-3.0 URL: https://github.com/D-Brox/cosmic-ext-applet-system-monitor.git Source0: https://github.com/D-Brox/%{name}/archive/%{commitversion}/%{name}-%{shortcommitversion}.tar.gz Source1: vendor-%{shortcommitversion}.tar.xz Source2: vendor-config-%{shortcommitversion}.toml BuildRequires: cargo-rpm-macros >= 26 BuildRequires: rustc BuildRequires: cargo BuildRequires: just BuildRequires: libxkbcommon-devel %global _description %{expand: %{summary}.} %description %{_description} %prep %autosetup -n %{name}-%{commitversion} -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 %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{cargo_vendor_manifest} sed 's/\(.*\) (.*#\(.*\))/\1+git\2/' -i cargo-vendor.txt %install just rootdir=%{buildroot} install %if %{with check} %check %cargo_test %endif %files %license LICENSE %license LICENSE.dependencies %license cargo-vendor.txt %doc README.md %{_bindir}/%{crate} %{_datadir}/applications/%{crateid}.desktop %{_datadir}/icons/hicolor/scalable/apps/%{crateid}*.svg %{_metainfodir}/%{crateid}.metainfo.xml %changelog * Sun Nov 09 2025 Jean-Marc Liger - 0.2.6 - Initial package