Name: immich_ml Version: 2.1.0 Release: 1%{?dist} Summary: Self-hosted photo and video management solution # One file is Apache 2.0 licensed: # - immich_ml/sessions/rknn/rknnpool.py License: AGPL-3.0 and Apache-2.0 URL: https://immich.app/ # Generated by running ./generate_tarball.sh %%{version} Source0: v%{version}.tar.xz # Service files Source1: sysusers Source2: systemd.service Source3: environment BuildArch: noarch BuildRequires: systemd-rpm-macros %global _description %{expand: Easily back up, organize, and manage your photos on your own server. Immich helps you browse, search and organize your photos and videos with ease, without sacrificing your privacy.} %description %_description %package -n python3-%{name} Summary: %{summary} %description -n python3-%{name} %_description %pyproject_extras_subpkg -n python3-%{name} cpu %prep %autosetup -p1 -n %{name}-%{version} # Fix dep on opencv sed -i -e 's/opencv-python-headless/opencv/' pyproject.toml # Fix dep on pillow sed -i -e '/pillow/s/11/12/' pyproject.toml # Fix dep on numpy sed -i -e '/numpy/s/<2//' pyproject.toml # Call python3 explicitly sed -i -e 's/"python"/"python3"/' immich_ml/__main__.py %generate_buildrequires %pyproject_buildrequires -g test -x cpu %build %pyproject_wheel %install # User/Group configuration install -Dpm 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf # Systemd unit configuration install -Dpm 0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service install -Dpm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/%{name} # Cache directory where models are downloaded install -dm 0750 %{buildroot}%{_localstatedir}/cache/immich_ml # Service working directory install -dm 0750 %{buildroot}%{_localstatedir}/lib/immich_ml %pyproject_install %pyproject_save_files immich_ml %check %pyproject_check_import %pytest %post -n python3-%{name} %systemd_post %{name}.service %preun -n python3-%{name} %systemd_preun %{name}.service %postun -n python3-%{name} %systemd_postun_with_restart %{name}.service %files -n python3-%{name} -f %{pyproject_files} %license LICENSE %doc README.md %{_sysusersdir}/%{name}.conf %{_unitdir}/%{name}.service %{_sysconfdir}/sysconfig/%{name} %dir %attr(750,immich_ml,immich_ml) %{_localstatedir}/cache/immich_ml %dir %attr(750,immich_ml,immich_ml) %{_localstatedir}/lib/immich_ml %changelog * Tue Nov 11 2025 Mat Booth - 2.1.0-1 - Split machine learning into discrete package - Update to 2.1.0 release