Name: jellyseerr Version: 2.5.0 Release: 3%{?dist} Summary: Fork of overseerr for jellyfin support License: MIT URL: https://github.com/Fallenbagel/jellyseerr Source: https://github.com/Fallenbagel/jellyseerr/archive/refs/tags/v%{version}.tar.gz Source1: %{name}-npm-%{version}.tar.xz Source2: %{name}-pnpm-lock-%{version}.yaml # Jellyseerr uses pnpm that needs the Internet to download dependencies. # Koji / Mock disable Internet access by default so download the required dependencies beforehand. # The following script requires the 'pnpm' package to be installed to run. Source3: %{name}-offline.sh # Use this to make sure the necessary macros are available like _unitdir BuildRequires: systemd BuildRequires: systemd-rpm-macros BuildRequires: tar BuildRequires: gzip BuildRequires: pnpm < 10 Requires: pnpm < 10 Requires: nodejs(engine) >= 22 Requires(post): systemd Requires(preun): systemd Requires(postun): systemd # Turn off debugging %global debug_package %{nil} # Turn off scanning node_modules for dependencies %global __requires_exclude_from ^.*node_modules/.*$ # Tells RPM not to fail the build if it finds binaries in noarch packages %global _binaries_in_noarch_packages_terminate_build 0 # Tells the shebang mangler script to skip files in node_modules %global __brp_mangle_shebangs_exclude_from node_modules %description Jellyseerr is a free and open source software application for managing requests for your media library. It is a a fork of Overseerr built to bring support for Jellyfin & Emby media servers! %prep %autosetup tar xf %{SOURCE1} cp -p %{SOURCE2} pnpm-lock.yaml %if 0%{?fedora} && 0%{?fedora} < 41 # fix up node executable name sed -i -e 's/\([" ]node\) /\1-22 /g' package.json # make a node alias from node-22 mkdir -p bin ln -s $(command -v node-22) bin/node %endif %build PATH=%{_builddir}/%{name}-%{version}/node_modules/.bin/:${PATH}:$PWD/bin # Set up for offline build pnpm config set store-dir .pnpm-store # Install packages CYPRESS_INSTALL_BINARY=0 pnpm install --offline --frozen-lockfile # Compile everything pnpm build # Prune unneeded deps pnpm prune --prod --ignore-scripts # Clean out un-needed files rm -rf ./src ./server ./.next/cache # Create env file echo PORT=5055 > ./jellyseerr.conf echo HOST=127.0.0.1 >> ./jellyseerr.conf # Create systemd file cat <> %{name}.service [Unit] Description=Jellyseerr Service Wants=network-online.target After=network-online.target [Service] EnvironmentFile=%{_sysconfdir}/%{name}/jellyseerr.conf Environment=NODE_ENV=production Type=exec Restart=on-failure WorkingDirectory=%{_datadir}/%{name} ExecStart=pnpm start [Install] WantedBy=multi-user.target EOT %install rm -rf %{buildroot} mkdir -m 755 -p %{buildroot}%{_datadir}/%{name} mkdir -m 755 -p %{buildroot}%{_sysconfdir}/%{name} # Install the config file where the systemd unit expects it install -p -D -m 0644 jellyseerr.conf %{buildroot}%{_sysconfdir}/%{name}/ # Install systemd unit file install -p -D -m 0644 %{name}.service %{buildroot}%{_unitdir}/%{name}.service mv package.json %{buildroot}%{_datadir}/%{name}/ mv pnpm-lock.yaml %{buildroot}%{_datadir}/%{name}/ mv *.js %{buildroot}%{_datadir}/%{name}/ mv *.ts %{buildroot}%{_datadir}/%{name}/ mv jellyseerr-api.yml %{buildroot}%{_datadir}/%{name}/ mv node_modules %{buildroot}%{_datadir}/%{name}/ mv dist/ %{buildroot}%{_datadir}/%{name}/ mv public/ %{buildroot}%{_datadir}/%{name}/ mv .next/ %{buildroot}%{_datadir}/%{name}/ %post %systemd_post jellyseerr.service %preun %systemd_preun jellyseerr.service %postun %systemd_postun_with_restart jellyseerr.service # TODO Get perms right %files %config(noreplace) %{_sysconfdir}/%{name} %{_datadir}/%{name} %{_unitdir}/%{name}.service %changelog * Wed Mar 12 2025 Brian J. Murrell - 2.5.0-3 - R: nodejs(engine) >= 22 - restore mv jellyseerr-api.yml %%{buildroot}%%{_datadir}/%%{name}/ * Tue Mar 11 2025 Brian J. Murrell - 2.5.0-2 - Build offline from pre-build pnpm store cache - Fix up node binary names for Fedora < 41 * Tue Mar 11 2025 Brian J. Murrell - 2.5.0-1 - Update to 2.5.0 - drop mv overseerr-api.yml %%{buildroot}%%{_datadir}/%%{name}/ * Mon Jan 20 2025 Brian J. Murrell - 2.3.0-3 - Use RPM packaged pnpm instead of installing with npm * Mon Jan 20 2025 Brian J. Murrell - 2.3.0-2 - Restrict pnpm version < 10 * Thu Jan 16 2025 Brian J. Murrell - 2.3.0-1 - Update to 2.3.0 - Bump nodejs verison up to 22 - Fix up node binary name in installed pnpm * Mon Dec 30 2024 Brian J. Murrell - 2.2.2-2 - BR: nodejs20-npm and use npm-20 for fedora > 40