## 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 %bcond_without check %global debug_package %{nil} %global _enable_debug_packages 0 #global __mangle_shebangs_exclude rust %global crate cosmic-ext-tweaks %global crateid dev.edfloreshz.CosmicTweaks %global shortversion 0.1.3 #global commit %global commitversion %{?commit:%{commit}}%{?!commit:%{shortversion}} %global shortcommitversion %{?commit:%(c=%{commit}; echo ${c:0:7})}%{?!commit:%{shortversion}} %global commitdatestring 2024-11-06 12:49:47 +0100 %global commitdate 20241106 %global commitgit %{?commit:~^git%{commitdate}.%(c=%{commit}; echo ${c:0:7})} Name: cosmic-ext-tweaks Version: %{shortversion}%{commitgit} Release: %autorelease Summary: A tweaking tool for the COSMIC DE License: GPL-3.0-only Group: Utility/COSMIC URL: https://github.com/cosmic-utils/tweaks Source0: https://github.com/cosmic-utils/tweaks/archive/refs/tags/%{version}/tweaks-%{version}.tar.gz Source1: vendor-%{shortcommitversion}.tar.xz Source2: vendor-config-%{shortcommitversion}.toml BuildRequires: cargo-rpm-macros >= 26 BuildRequires: rustc BuildRequires: cargo BuildRequires: just BuildRequires: pkgconfig BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(xkbcommon) %description This is a tool which gives you advanced tweaking options for the Cosmic Desktop %prep %autosetup -n tweaks-%{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 just rootdir=%{buildroot} prefix=%{_prefix} 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 %changelog * Tue Aug 19 2025 Jean-Marc Liger - 0.1.3 - Initial package of COSMIC Tweaks