# Disable debuginfo, since we package some stripped upstream binaries %global debug_package %{nil} Name: immich Version: 2.1.0 Release: 1%{?dist} Summary: Self-hosted photo and video management solution License: AGPL-3.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 # Geodata Source10: https://download.geonames.org/export/dump/cities500.zip Source11: https://download.geonames.org/export/dump/admin1CodesASCII.txt Source12: https://download.geonames.org/export/dump/admin2Codes.txt Source13: https://raw.githubusercontent.com/nvkelso/natural-earth-vector/v5.1.2/geojson/ne_10m_admin_0_countries.geojson # Prefer to use the opentype fonts already packaged in Fedora Patch: 0001-use-opentype-fonts.patch # We don't care about iOS, remove these bulky splash screens Patch: 0002-remove-apple-header.patch # Some timestamp tests appear to fail by one hour, maybe TZ issue but do not appear to be important Patch: 0003-skip-failing-off-by-one-hour-tests.patch # Fix some hardcoded assumptions about PATH contents Patch: 0004-more-robust-scripts.patch ExclusiveArch: %{nodejs_arches} Requires: nodejs Requires: python3-immich_ml+cpu = %{version} Requires: valkey Requires: VectorChord BuildRequires: gcc-c++ BuildRequires: pnpm BuildRequires: nodejs-devel BuildRequires: python3-devel BuildRequires: vips-devel BuildRequires: systemd-rpm-macros # Needed by the web component BuildRequires: overpass-fonts BuildRequires: overpass-mono-fonts %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 %prep %autosetup -p1 -n %{name}-%{version} # Pin sharp version to 0.34.2 to match Fedora's version of vips sed -i -e '/sharp/s/\^0\.34\../0.34.2/' $(find -name package.json) pnpm-workspace.yaml # Use distro-packaged fonts rm -f web/src/lib/assets/fonts/overpass/*.ttf cp %{_datadir}/fonts/overpass-fonts/overpass-regular.otf web/src/lib/assets/fonts/overpass/ cp %{_datadir}/fonts/overpass-mono-fonts/overpass-mono-regular.otf web/src/lib/assets/fonts/overpass/ %build # These build steps essentially mirror those performed in the Dockerfile # Build server component SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm --filter immich build SHARP_FORCE_GLOBAL_LIBVIPS=true pnpm --filter immich --prod --no-optional deploy %{_builddir}/server-pruned # Remove pre-built binaries for other platforms and libc variants rm -r %{_builddir}/server-pruned/node_modules/.pnpm/bcrypt*/node_modules/bcrypt/prebuilds/linux-arm rm -r %{_builddir}/server-pruned/node_modules/.pnpm/bcrypt*/node_modules/bcrypt/prebuilds/linux*/bcrypt.musl.node rm -r %{_builddir}/server-pruned/node_modules/.pnpm/bcrypt*/node_modules/bcrypt/prebuilds/darwin* rm -r %{_builddir}/server-pruned/node_modules/.pnpm/bcrypt*/node_modules/bcrypt/prebuilds/win32* # Build web component SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm --filter @immich/sdk --filter immich-web --frozen-lockfile --force install pnpm --filter @immich/sdk --filter immich-web build # Build CLI component pnpm --filter @immich/sdk --filter @immich/cli --frozen-lockfile install pnpm --filter @immich/sdk --filter @immich/cli build pnpm --filter @immich/cli --prod --no-optional deploy %{_builddir}/cli-pruned %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} # Install server component install -m 0755 -d %{buildroot}%{_prefix}/lib/immich/app/server cp -pr %{_builddir}/server-pruned/* %{buildroot}%{_prefix}/lib/immich/app/server # Install command line client install -m 0755 -d %{buildroot}%{_prefix}/lib/immich/app/cli cp -pr %{_builddir}/cli-pruned/* %{buildroot}%{_prefix}/lib/immich/app/cli #install -Dpm 0755 immich-cli/bin/%{name} %{buildroot}%{_bindir}/%{name} # Install web component install -m 0755 -d %{buildroot}%{_prefix}/lib/immich/www cp -pr web/build/* %{buildroot}%{_prefix}/lib/immich/www # Install geodata install -m 0755 -d %{buildroot}%{_prefix}/lib/immich/geodata unzip %{SOURCE10} install -Dpm 0444 cities500.txt %{buildroot}%{_prefix}/lib/immich/geodata install -Dpm 0444 %{SOURCE11} %{buildroot}%{_prefix}/lib/immich/geodata install -Dpm 0444 %{SOURCE12} %{buildroot}%{_prefix}/lib/immich/geodata install -Dpm 0444 %{SOURCE13} %{buildroot}%{_prefix}/lib/immich/geodata date --iso-8601=seconds | tr -d "\n" > geodata-date.txt install -Dpm 0444 geodata-date.txt %{buildroot}%{_prefix}/lib/immich/geodata # User data directory install -d %{buildroot}%{_sharedstatedir}/immich %check (cd server && pnpm test) (cd cli && pnpm test) %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %files %license LICENSE %doc README.md SECURITY.md %{_sysusersdir}/%{name}.conf %{_unitdir}/%{name}.service %{_sysconfdir}/sysconfig/%{name} %dir %{_prefix}/lib/immich %{_prefix}/lib/immich/app %{_prefix}/lib/immich/geodata %{_prefix}/lib/immich/www %dir %attr(0750,immich,immich) %{_sharedstatedir}/immich %changelog * Tue Nov 11 2025 Mat Booth - 2.1.0-1 - Update to 2.1.0 release - Move machine learning parts to discrete package * Thu Mar 13 2025 Mat Booth - 1.129.0-3 - Package additional __pycache__ files and customise python path in service file * Thu Mar 13 2025 Mat Booth - 1.129.0-2 - Add ml service conf files * Tue Mar 11 2025 Mat Booth - 1.129.0-1 - Update to latest release * Tue Mar 11 2025 Mat Booth - 1.128.0-3 - Add machine learning parts * Wed Mar 05 2025 Mat Booth - 1.128.0-2 - Add geo data * Mon Mar 03 2025 Mat Booth - 1.128.0-1 - Initial release