# COPR Ligenix's spec file for OxiCloud # # This spec file is mostly the doc file # # Copyright (c) 2026-2026 Jean-Marc Liger # # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # ExcludeArch: %{ix86} %bcond_without check %global url https://github.com/AtalayaLabs %global crate OxiCloud %global shortversion 0.10.0 %global commit 496d25b89f672ffe3395042a0584f24d490ed761 #global committag 1 %global commitversion %{?committag:%{commit}}%{?!committag:%{shortversion}} %global shortcommitversion %{?committag:%(c=%{commit}; echo ${c:0:7})}%{?!committag:%{shortversion}} %global commitdatestring 2026-10-25 16:08:18 +0100 %global commitdate 20261025 %global commitgit %{?committag:^git%{commitdate}.%(c=%{commit}; echo ${c:0:7})} Name: oxicloud Version: %{shortversion}%{commitgit} Release: 1%{?dist} Summary: Ultra-fast, secure & lightweight self-hosted cloud storage — your files, photos, calendars & contacts, all in one place. # Main sources are GPLv3+, rest are rust licenses License: GPLv3+ 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}-install.patch BuildRequires: cargo-rpm-macros >= 26 BuildRequires: rustc >= 1.95 BuildRequires: cargo BuildRequires: nodejs >= 1:24 BuildRequires: npm BuildRequires: systemd Requires: ca-certificates Requires: tzdata Requires: postgresql-server Requires: postgresql-contrib Requires(post): systemd Requires(preun): systemd Requires(postun): systemd %description OxiCloud is aimed at self-hosters, home labs, and small teams who want the useful parts of a cloud suite without the operational drag of a traditional PHP stack. What pulls people in: - Standard protocols first: WebDAV, CalDAV, and CardDAV are built in - Useful product surface already there: files, previews, sharing, trash, search, favorites, and recent items - Modern auth and admin basics: OIDC/SSO, quotas, roles, and shared links - Better interoperability: native desktop and mobile clients work without custom sync tooling for basic access This package provides all features with static files bundled in binary. %package static Summary: Provides static files for customization purposes only Requires: %{name} = %{version}-%{release} %description static This package provides static files for customization purposes only. %package thumbnail Summary: Provides dependency to extract a thumbnail frame from uploaded videos Requires: %{name} = %{version}-%{release} Requires: (ffmpeg-free or ffmpeg) %description thumbnail This package provides dependency to extract a thumbnail frame from uploaded videos. %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 # create service file cat >%{name}.service < 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}" install -Dpm 0755 target/release/%{name} %{buildroot}%{_bindir}/%{name} install -Dcm 0640 example.env %{buildroot}%{_sysconfdir}/default/%{name} install -Dpm 0644 %{name}.service %{buildroot}%{_unitdir}/%{name}.service install -Ddm 0770 %{buildroot}%{_datadir}/%{name} install -Ddm 0770 %{buildroot}%{_datadir}/%{name}/proxy install -Ddm 0770 %{buildroot}%{_datadir}/%{name}/scripts install -Dpm 0750 scripts/backup.sh %{buildroot}%{_datadir}/%{name}/scripts/backup.sh install -Dpm 0750 scripts/restore.sh %{buildroot}%{_datadir}/%{name}/scripts/restore.sh install -Ddm 0770 %{buildroot}%{_sharedstatedir}/%{name} install -Ddm 0770 %{buildroot}%{_sharedstatedir}/%{name}/storage install -Ddm 0770 %{buildroot}%{_sharedstatedir}/%{name}/tmp rm -rf static-dist/.gitkeep cp -rp static-dist %{buildroot}%{_sharedstatedir}/%{name}/static %check %if %{with check} # Set vergen environment variables export VERGEN_GIT_COMMIT_DATE="date --utc '%{commitdatestring}'" export VERGEN_GIT_SHA="%{commit}" %cargo_test %endif %pre getent group %{name} >/dev/null || groupadd --system %{name} getent passwd %{name} >/dev/null || useradd --system --gid %{name} \ --home %{_sharedstatedir}/%{name} --no-create-home \ --shell /usr/sbin/nologin --comment "OxiCloud self-hosted cloud storage" %{name} %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun %{name}.service %files %license LICENSE %license LICENSE.dependencies %license cargo-vendor.txt %doc *.md docs/*.md %{_bindir}/%{name} %{_unitdir}/%{name}.service %config(noreplace) %attr(640,root,%{name}) %{_sysconfdir}/default/%{name} %attr(0770,root,%{name}) %dir %{_datadir}/%{name} %attr(0770,root,%{name}) %dir %{_datadir}/%{name}/proxy %attr(0770,root,%{name}) %dir %{_datadir}/%{name}/scripts %attr(0750,root,%{name}) %{_datadir}/%{name}/scripts/{backup,restore}.sh %attr(0770,root,%{name}) %dir %{_sharedstatedir}/%{name} %attr(0770,root,%{name}) %dir %{_sharedstatedir}/%{name}/storage %attr(0770,root,%{name}) %dir %{_sharedstatedir}/%{name}/tmp %files static %attr(0770,root,%{name}) %dir %{_sharedstatedir}/%{name}/static %attr(0770,root,%{name}) %{_sharedstatedir}/%{name}/static/* %files thumbnail %changelog * Mon Oct 26 2026 Jean-Marc Liger - 0.10.0-1 - Update to 0.10.0 * Sun Oct 25 2026 Jean-Marc Liger - 0.9.3-1 - Initial package - Build all features with static files bundled in binary - Add user oxicloud, systemd service and postgresql scripts