ExcludeArch: %{ix86} # Generated by rust2rpm 26 %bcond_without check # prevent library files from being installed %global cargo_install_lib 0 %global crate cosmic-ext-applet-ollama %global ver 0.1.0 %global commit d1b3238eb003047cf5986f58c5ea6d9cbdd90387 %global date 20240629.19 Name: cosmic-ext-applet-ollama Version: %{ver}~git%{date}.%{sub %{commit} 1 7} Release: %autorelease Summary: Ollama applet for COSMIC Desktop SourceLicense: GPL-3.0 License: GPL-3.0 URL: https://github.com/elevenhsoft/cosmic-ext-applet-ollama.git Source: %{crate}-%{commit}.tar.xz Source: %{crate}-%{commit}-vendor.tar.xz 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 %{crate}-%{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 .vendor/config.toml to .cargo/config.toml cat .vendor/config.toml >> .cargo/config.toml echo "Appended .vendor/config.toml to .cargo/config.toml" else # If it does not exist, append the contents of .vendor/config.toml to .cargo/config cat .vendor/config.toml >> .cargo/config echo "Appended .vendor/config.toml 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/io.github.elevenhsoft.CosmicExtAppletOllama.desktop %{_datadir}/icons/hicolor/scalable/apps/io.github.elevenhsoft.CosmicExtAppletOllama-symbolic.svg %changelog %autochangelog