## START: Set by rpmautospec ## (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 %if 0%{?rhel} <= 9 %global debug_package %{nil} %global _enable_debug_packages 0 %endif %global crate cosmic-classic-menu %global crateid com.championpeak87.%{crate} %global shortversion 0.0.2 %global commit ba68b3dfd6aac25ae43551d7bac48bef5805440c %global commitversion %{?commit:%{commit}}%{?!commit:%{shortversion}} %global shortcommitversion %{?commit:%(c=%{commit}; echo ${c:0:7})}%{?!commit:%{shortversion}} %global commitdatestring 2025-07-16 19:43:09 +0200 %global commitdate 20250716 %global commitgit %{?commit:~^%{commitdate}git%(c=%{commit}; echo ${c:0:7})} Name: cosmic-classic-menu Version: %{shortversion}%{commitgit} Release: 1%{?dist} Summary: COSMIC Classic Menu Application License: GPLv3 URL: https://github.com/championpeak87/cosmic-classic-menu Source0: %{crate}-%{shortcommitversion}.tar.gz # To create the below sources: # * git clone https://github.com/championpeak87/cosmic-classic-menu.git at the specified commit # * cargo vendor > vendor-config-%%{shortcommitversion}.toml # * tar -pczf vendor-%%{shortcommitversion}.tar.xz vendor Source1: vendor-%{shortcommitversion}.tar.xz # * mv vendor-config-%%{shortcommitversion}.toml .. Source2: vendor-config-%{shortcommitversion}.toml Source3: %{crateid}.desktop Source4: %{crateid}.svg BuildRequires: rust BuildRequires: cargo BuildRequires: rust-xkbcommon-devel Requires: cosmic-osd %description COSMIC Classic Menu is a Rust-based applet for COSMIC Desktop, providing an app menu launcher with apps divided into their respective categories. %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 strip target/release/%{name} %install install -Dm755 target/release/%{name} %{buildroot}%{_bindir}/%{crate} install -Dm0644 %{SOURCE3} %{buildroot}%{_datadir}/applications/%{crateid}.desktop install -Dm0644 %{SOURCE4} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{crateid}.svg %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 %changelog * Mon Aug 11 2025 Jean-Marc Liger - 0.0.2^20250716gitba68b3d - Update to latest snapshot - Switch from GPLv2 to GPLv3 * Sun Mar 09 2025 Kamil Lihan 0.0.2-1 - Initial package of COSMIC Classic Menu applet * Wed Feb 19 2025 Kamil Lihan - 0.0.1 - Initial package