## 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 url https://github.com/xarbit %global crate Calendar %global crateid dev.xarbit.apps.%{crate} %global shortversion 0.1.0 %global commit 55afa103cb40aae033638c4d332ceea8afe76464 %global committag 1 %global commitversion %{?committag:%{commit}}%{?!committag:%{shortversion}} %global shortcommitversion %{?committag:%(c=%{commit}; echo ${c:0:7})}%{?!committag:%{shortversion}} %global commitdatestring 2025-12-03 00:52:12 +0100 %global commitdate 20251203 %global commitgit %{?committag:~git%{commitdate}.%(c=%{commit}; echo ${c:0:7})} Name: cosmic-ext-xcalendar Version: %{shortversion}%{commitgit} Release: 1%{?dist} Summary: A Calendar made for the COSMIC Desktop License: GPL-3.0 URL: %{url}/%{crate} Source0: %{url}/%{crate}/archive/refs/tags/%{commitversion}/%{crate}-%{shortcommitversion}.tar.gz # To create the below sources: # * git clone %%{url}/%%{crate}.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 BuildRequires: cargo-rpm-macros >= 26 BuildRequires: rustc BuildRequires: cargo BuildRequires: just BuildRequires: dbus-devel BuildRequires: openssl-devel BuildRequires: libxkbcommon-devel BuildRequires: desktop-file-utils Requires: dbus %description Calendar is a native calendar application designed for the COSMIC desktop environment. Built using libcosmic's widget system, it provides a clean, intuitive interface inspired by other popular calendar applications while following COSMIC's design language and responsive layout patterns. The application will support CalDAV protocol for synchronizing events with calendar servers like Nextcloud, Radicale, and other standard CalDAV-compatible services. %prep %autosetup -n %{crate}-%{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 # Set vergen environment variables export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'" export VERGEN_GIT_SHA="%{commit}" %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{cargo_vendor_manifest} sed 's/\(.*\) (.*#\(.*\))/\1+git\2/' -i cargo-vendor.txt sed 's/^\([^+]*\)+.*+\([^+]*\)$/\1+\2/' -i cargo-vendor.txt %install # Set vergen environment variables export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'" export VERGEN_GIT_SHA="%{commit}" just rootdir=%{buildroot} prefix=%{_prefix} install %check desktop-file-validate %{buildroot}%{_datadir}/applications/%{crateid}.desktop %if %{with check} # Set vergen environment variables export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'" export VERGEN_GIT_SHA="%{commit}" %cargo_test %endif %files %license LICENSE %license LICENSE.dependencies %license cargo-vendor.txt %doc README.md CLAUDE.md %{_bindir}/xcalendar %{_datadir}/dbus-1/system.d/%{crateid}.conf %{_datadir}/applications/%{crateid}.desktop %{_metainfodir}/%{crateid}.metainfo.xml %{_datadir}/icons/hicolor/scalable/apps/%{crateid}*.svg %changelog * Sat Dec 13 2025 Jean-Marc Liger - 0.1.0~git20251203.55afa10-1 - Initial package