## (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-ollama %global crateid dev.heppen.ollama %global shortversion 0.0.1 %global commit 60079c33211d8f2b9a7dd5fa2e788c80dd5cfbbf %global commitversion %{?commit:%{commit}}%{?!commit:%{shortversion}} %global shortcommitversion %{?commit:%(c=%{commit}; echo ${c:0:7})}%{?!commit:%{shortversion}} %global commitdatestring 2025-06-23 18:53:09 +0200 %global commitdate 20250623 %global commitdatestring 2025-10-08 07:33:10 +0200 %global commitdate 20251008 %global commitgit %{?commit:~git%{commitdate}.%(c=%{commit}; echo ${c:0:7})} Name: cosmic-ext-applet-ollama Version: %{shortversion}%{commitgit} Release: %autorelease Summary: Ollama applet for COSMIC Desktop License: GPL-3.0 URL: https://github.com/cosmic-utils/cosmic-ext-applet-ollama.git Source0: https://github.com/cosmic-utils/%{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: lld BuildRequires: cargo BuildRequires: just BuildRequires: libxkbcommon-devel BuildRequires: git-core BuildRequires: openssl-devel %global _description %{expand: %{summary}.} %description %{_description} %prep %autosetup -n %{name}-%{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 %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} 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 * Sat Oct 11 2025 Jean-Marc Liger - 0.0.1~git20251008.60079c3 - Update to latest snapshot * Sun Aug 17 2025 Jean-Marc Liger - 0.0.1~git20250623.3f83ad0 - Update to latest snapshot