# RPM spec for cirro (Fedora). The sources are prepared with packaging/make-srpm.sh, which creates # from the git repository the code tarball, the Rust dependencies one (cargo vendor: not all # crates are packaged in Fedora, the build is offline) and the SRPM; see "RPM package" in the README. # make-srpm.sh rewrites these two lines: the version from Cargo.toml and, for builds taken from git # (not from a tag), the snapshot in the form YYYYMMDDgit %global crate_version 0.1.0 %global snapshot 20261111gite48ee3a %if "%{snapshot}" != "" %global srcname %{name}-%{crate_version}-%{snapshot} %else %global srcname %{name}-%{crate_version} %endif Name: cirro %global shell_uuid cirro@symonrod.github.io %if "%{snapshot}" != "" Version: %{crate_version}^%{snapshot} %else Version: %{crate_version} %endif Release: 1%{?dist} Summary: Lightweight Nextcloud client with on-demand files (FUSE + WebDAV) Summary(it): Client leggero per Nextcloud con file on-demand (FUSE + WebDAV) # cirro is GPL-3.0-or-later (LICENSE file). The others are those of the crates # compiled into the binary, from %%{cargo_license_summary} (plus "blessing" for sqlite, compiled by # libsqlite3-sys). License: GPL-3.0-or-later AND Apache-2.0 AND BSD-3-Clause AND CDLA-Permissive-2.0 AND ISC AND MIT AND Unicode-3.0 AND blessing AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR LGPL-2.1-or-later) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) URL: https://github.com/SymonRod/Cirro Source0: %{srcname}.tar.gz Source1: %{srcname}-vendor.tar.xz BuildRequires: cargo-rpm-macros >= 26 # rusqlite compiles sqlite (bundled) and ring its C code BuildRequires: gcc BuildRequires: systemd-rpm-macros BuildRequires: python3-devel BuildRequires: desktop-file-utils # msgfmt: translations (po/) and the translated .desktop file BuildRequires: gettext # fusermount3 to mount and unmount (fuser without libfuse) Requires: fuse3 # secret-tool (libsecret): app passwords are stored in the keyring Requires: /usr/bin/secret-tool Requires: dbus-common # xdg-open opens the browser for `cirro login` Recommends: xdg-utils # account folder icon: `gio set` (glib2) and the gvfsd-metadata metadata Recommends: /usr/bin/gio Recommends: gvfs # tray icons in the hicolor theme (directories owned by hicolor-icon-theme) Requires: hicolor-icon-theme Suggests: %{name}-app = %{version}-%{release} # Summary and %%description in English as Fedora requires, with the Italian translation %description cirro mounts a Nextcloud account as a folder: every file is listed, but its content is downloaded only when first opened and then kept in a cache. Pinned files always stay on the device. Includes the daemon, a user service that is also started on demand over D-Bus as io.github.symonrod.Cirro.Daemon, used by the app and by the Nautilus extension. The daemon also shows a status icon in the system tray (StatusNotifierItem: KDE, or GNOME with the AppIndicator extension). %description -l it cirro monta un account Nextcloud come cartella: si vedono tutti i file, ma il contenuto viene scaricato solo alla prima apertura e resta in cache. I file "pinnati" restano sempre sul dispositivo. Comprende il demone (servizio utente systemd, attivabile via D-Bus come io.github.symonrod.Cirro.Daemon) usato dalla app e dall'estensione di Nautilus. Il demone mostra anche un'icona di stato nella tray (StatusNotifierItem: KDE, o GNOME con l'estensione AppIndicator). %package app Summary: Lightweight Nextcloud client with on-demand files (FUSE + WebDAV) Summary(it): Client leggero per Nextcloud con file on-demand (FUSE + WebDAV) License: GPL-3.0-or-later BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: python3 Requires: python3-gobject Requires: gtk4 >= 4.14 Requires: libadwaita >= 1.6 Requires: hicolor-icon-theme %description app Small GTK 4 app to manage the accounts of the cirro daemon: status, cache usage, adding (browser login) and removing accounts, notifications about conflicts and failed uploads. %description app -l it Piccola app GTK 4 / libadwaita per gestire gli account del demone cirro: stato, spazio in cache, aggiunta (login nel browser) e rimozione degli account, notifiche di conflitti e upload falliti. %package nautilus Summary: Lightweight Nextcloud client with on-demand files (FUSE + WebDAV) Summary(it): Client leggero per Nextcloud con file on-demand (FUSE + WebDAV) License: GPL-3.0-or-later BuildArch: noarch Requires: %{name} = %{version}-%{release} # nautilus-python carica l'estensione; usa l'API Nautilus 4.1 (nautilus-extensions >= 43) Requires: nautilus-python >= 4 Requires: nautilus-extensions >= 43 Requires: python3 Requires: python3-gobject-base Recommends: nautilus # notify-send for the "Libera spazio" and conflict notifications Recommends: libnotify %description nautilus nautilus-python extension that shows the state of the files of a cirro mount in GNOME Files (online only, downloaded, always on this device) and adds the pin, unpin and free space actions to the context menu. %description nautilus -l it Estensione nautilus-python che mostra in GNOME File lo stato dei file di un mount cirro (solo online, scaricato, sempre sul dispositivo) e aggiunge al menu contestuale "Mantieni sempre su questo dispositivo", "Non mantenere più sul dispositivo" e "Libera spazio". %package gnome-shell Summary: Lightweight Nextcloud client with on-demand files (FUSE + WebDAV) Summary(it): Client leggero per Nextcloud con file on-demand (FUSE + WebDAV) License: GPL-3.0-or-later BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: gnome-shell >= 45 Recommends: %{name}-app = %{version}-%{release} %description gnome-shell GNOME Shell extension that adds a "Nextcloud" button to the Quick Settings (status of the cirro accounts, mount and unmount, open folder) and a panel indicator shown while syncing, offline or on errors. It is installed but not enabled: enable it with "gnome-extensions enable %{shell_uuid}" or from the cirro app. %description gnome-shell -l it Estensione GNOME Shell che aggiunge ai Quick Settings un pulsante "Nextcloud" (stato degli account di cirro, monta/smonta, apri cartella) e un indicatore nel pannello durante la sincronizzazione, offline o in caso di errore. Viene installata ma non abilitata: si abilita con "gnome-extensions enable %{shell_uuid}" o dalla app di cirro. %prep %autosetup -n %{srcname} -a1 %cargo_prep -v vendor %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{cargo_vendor_manifest} %install install -Dpm0755 target/rpm/cirro %{buildroot}%{_bindir}/cirro install -Dpm0644 data/cirro.service %{buildroot}%{_userunitdir}/cirro.service install -Dpm0644 data/io.github.symonrod.Cirro.Daemon.service %{buildroot}%{_datadir}/dbus-1/services/io.github.symonrod.Cirro.Daemon.service install -Dpm0644 data/io.github.symonrod.Cirro.Daemon1.xml %{buildroot}%{_datadir}/dbus-1/interfaces/io.github.symonrod.Cirro.Daemon1.xml # account folders icon (the daemon looks for it in $XDG_DATA_DIRS/cirro) install -Dpm0644 data/icons/cirro-folder.svg %{buildroot}%{_datadir}/cirro/cirro-folder.svg # tray status icons (StatusNotifierItem), variants of io.github.symonrod.Cirro-symbolic for f in data/icons/tray/*.svg; do install -Dpm0644 "$f" %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps/"$(basename "$f")" done # app: private modules in /usr/share/cirro-app, the launcher finds them next to its real file install -d %{buildroot}%{_datadir}/cirro-app cp -pr app/cirro_app %{buildroot}%{_datadir}/cirro-app/ find %{buildroot}%{_datadir}/cirro-app -name __pycache__ -type d -prune -exec rm -rf {} + install -pm0755 app/cirro-app %{buildroot}%{_datadir}/cirro-app/cirro-app %py3_shebang_fix %{buildroot}%{_datadir}/cirro-app/cirro-app install -d %{buildroot}%{_bindir} ln -s ../share/cirro-app/cirro-app %{buildroot}%{_bindir}/cirro-app install -d %{buildroot}%{_datadir}/applications msgfmt --desktop --template=app/io.github.symonrod.Cirro.desktop.in -d po \ -o %{buildroot}%{_datadir}/applications/io.github.symonrod.Cirro.desktop install -Dpm0644 app/icons/io.github.symonrod.Cirro.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/io.github.symonrod.Cirro.svg install -Dpm0644 app/icons/io.github.symonrod.Cirro-symbolic.svg %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps/io.github.symonrod.Cirro-symbolic.svg %py_byte_compile %{python3} %{buildroot}%{_datadir}/cirro-app/cirro_app # extension: nautilus-python looks for it in /usr/share/nautilus-python/extensions install -Dpm0644 nautilus/cirro_nautilus.py %{buildroot}%{_datadir}/nautilus-python/extensions/cirro_nautilus.py %py_byte_compile %{python3} %{buildroot}%{_datadir}/nautilus-python/extensions # translations of every component (text domain "cirro"), in the main package po/build.sh %{buildroot}%{_datadir}/locale %find_lang %{name} # GNOME Shell extension: installed but not enabled (the user does it, or the app via D-Bus) install -d %{buildroot}%{_datadir}/gnome-shell/extensions cp -pr gnome-shell/%{shell_uuid} %{buildroot}%{_datadir}/gnome-shell/extensions/ %check %cargo_test desktop-file-validate %{buildroot}%{_datadir}/applications/io.github.symonrod.Cirro.desktop # at least the Python modules compile (the real tests need a bus and a display) %{python3} -m py_compile app/cirro_app/*.py nautilus/cirro_nautilus.py # no gjs in the buildroot: only the extension's metadata.json is checked %{python3} -m json.tool gnome-shell/%{shell_uuid}/metadata.json >/dev/null # The service is not enabled: it starts by itself on the first D-Bus call (app, Nautilus), # or at every login after `systemctl --user enable --now cirro.service`. It is not restarted # on updates (that would unmount the folders): the new binary takes effect on the next start. %post %systemd_user_post cirro.service %preun %systemd_user_preun cirro.service %files -f %{name}.lang %license LICENSE %license LICENSE.dependencies %license cargo-vendor.txt %doc README.md %{_bindir}/cirro %{_userunitdir}/cirro.service %{_datadir}/dbus-1/services/io.github.symonrod.Cirro.Daemon.service %{_datadir}/dbus-1/interfaces/io.github.symonrod.Cirro.Daemon1.xml %{_datadir}/cirro/ %{_datadir}/icons/hicolor/symbolic/apps/io.github.symonrod.Cirro-*-symbolic.svg %files app %license LICENSE %doc app/README.md %{_bindir}/cirro-app %{_datadir}/cirro-app/ %{_datadir}/applications/io.github.symonrod.Cirro.desktop %{_datadir}/icons/hicolor/scalable/apps/io.github.symonrod.Cirro.svg %{_datadir}/icons/hicolor/symbolic/apps/io.github.symonrod.Cirro-symbolic.svg %files nautilus %license LICENSE %doc nautilus/README.md %{_datadir}/nautilus-python/extensions/cirro_nautilus.py # __pycache__ does not belong to nautilus-python: it is shared by the extensions that use it %dir %{_datadir}/nautilus-python/extensions/__pycache__ %{_datadir}/nautilus-python/extensions/__pycache__/cirro_nautilus.* %files gnome-shell %license LICENSE %doc gnome-shell/README.md %{_datadir}/gnome-shell/extensions/%{shell_uuid}/ %changelog * Tue Nov 10 2026 Simone Rodino - 0.1.0^20261111gite48ee3a-1 - First package: cirro, cirro-app, cirro-nautilus