ExcludeArch: %{ix86} %bcond_without check %global url https://github.com/cosmic-utils %global crate cosmic-ext-storage %global crateid com.cosmic.ext.Storage %global shortversion 0.1.0 %global commit 3f8c340e8a6cc17ea854ef244b0c3b3bb1028128 %global committag 1 %global commitversion %{?committag:%{commit}}%{?!committag:%{shortversion}} %global shortcommitversion %{?committag:%(c=%{commit}; echo ${c:0:7})}%{?!committag:%{shortversion}} %global commitdatestring 2026-02-26 21:47:53 +0100 %global commitdate 20260226 %global commitgit %{?committag:^git%{commitdate}.%(c=%{commit}; echo ${c:0:7})} Name: %{crate} Version: %{shortversion}%{commitgit} Release: 1%{?dist} Summary: A storage utility for the COSMIC Desktop # Main sources are GPL-3.0, rest are rust licenses License: GPL-3.0 AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND BSD-3-Clause AND (BSD-3-Clause OR Apache-2.0) AND BSL-1.0 AND CC0-1.0 AND ISC AND MIT AND (MIT OR Apache-2.0 OR CC0-1.0) AND (MIT OR Apache-2.0 OR LGPL-2.1-or-later) AND (MIT OR Apache-2.0 OR Zlib) AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) AND ZLib 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 > %%{crate}-%%{shortcommitversion}-vendor-config.toml # * tar -pczf %%{crate}-%%{shortcommitversion}-vendor.tar.xz vendor Source1: %{crate}-%{shortcommitversion}-vendor.tar.xz # * mv %%{crate}-%%{shortcommitversion}-vendor-config.toml .. Source2: %{crate}-%{shortcommitversion}-vendor-config.toml Patch0: %{crate}-%{shortcommitversion}-install.patch BuildRequires: cargo-rpm-macros >= 26 BuildRequires: systemd-rpm-macros BuildRequires: rustc BuildRequires: cargo BuildRequires: just BuildRequires: clang-devel BuildRequires: btrfs-progs-devel BuildRequires: libxkbcommon-devel BuildRequires: desktop-file-utils Requires: udisks2 # For partition type support: # NTFS Support Recommends: (ntfsprogs or ntfs-3g) # exFAT Support Recommends: exfatprogs # FAT32 Support Recommends: dosfstools # SMB, FTP, S3, etc. mount support Recommends: rclone # Optional : # XFS Support - Untested but "should" work Recommends: xfsprogs # BTRFS support Recommends: btrfs-progs # F2FS support - Untested but "should" work Recommends: f2fs-tools # UDF Support - Untested but "should" work Recommends: udftools Obsoletes: cosmic-ext-disks < 0.1.0^git20260215 Provides: cosmic-ext-disks = %{version}-%{release} %description %{summary}. * Important : By using this software, you fully accept all responsibility for any data loss or corruption caused whilst using this software. * Warning : This software is in early beta, and has not yet been tested against many drive type, partition type, and partition scheme combinations. %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_INCREMENTAL=0 CARGO_FEATURE_VENDORED=1 RUSTFLAGS="-Clink-arg=-Wl,-z,relro,-z,now -C debuginfo=2 -C strip=none" cargo build --release --workspace %{cargo_build} --workspace %{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}" cd storage-app ; 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 %post %systemd_post %{crate}-daemon.service %preun %systemd_preun %{crate}-daemon.service %postun %systemd_postun_with_restart %{crate}-daemon.service %files %license LICENSE %license LICENSE.dependencies %license cargo-vendor.txt %doc README.md %{_bindir}/%{crate} %{_bindir}/%{crate}-daemon %{_unitdir}/%{crate}-daemon.service %{_unitdir}/%{crate}-daemon.socket %{_datadir}/dbus-1/system.d/%{crateid}.conf %{_datadir}/polkit-1/actions/%{crateid}.policy %{_datadir}/applications/%{crateid}.desktop %{_datadir}/icons/hicolor/*/apps/%{crateid}.svg %{_datadir}/icons/providers/*.svg %{_metainfodir}/%{crateid}.metainfo.xml %changelog * Tue Mar 03 2026 Jean-Marc Liger - 0.1.0^git20260226.3f8c340-1 - Rename to cosmic-ext-storage - Update to latest snapshot (big refactor) - Add systemd, dbus and polkit integration - Update french translation * Sat Feb 14 2026 Jean-Marc Liger - 0.1.0^git20260213.20dab0f-1 - Update to latest snapshot (enable BTRFS support) - Update french translation * Fri Feb 13 2026 Jean-Marc Liger - 0.1.0^git20260212.f95b278-1 - Update to latest snapshot - Add french translation * Sun Feb 08 2026 Jean-Marc Liger - 0.1.0^git20260207.89d96b9-1 - Initial package