2019-01-05 10:14:24 +00:00
|
|
|
%global debug_package %{nil}
|
2019-02-02 17:20:04 +00:00
|
|
|
# Set the dotnet runtime
|
|
|
|
%if 0%{?fedora}
|
|
|
|
%global dotnet_runtime fedora-x64
|
|
|
|
%else
|
|
|
|
%global dotnet_runtime centos-x64
|
|
|
|
%endif
|
2019-01-05 10:14:24 +00:00
|
|
|
|
|
|
|
Name: jellyfin
|
2019-09-01 01:39:10 +00:00
|
|
|
Version: 10.4.0
|
2019-02-28 20:34:08 +00:00
|
|
|
Release: 1%{?dist}
|
2019-01-12 00:49:46 +00:00
|
|
|
Summary: The Free Software Media Browser
|
2019-01-05 10:14:24 +00:00
|
|
|
License: GPLv2
|
|
|
|
URL: https://jellyfin.media
|
2019-01-12 00:49:46 +00:00
|
|
|
Source0: %{name}-%{version}.tar.gz
|
2019-01-05 10:14:24 +00:00
|
|
|
Source1: jellyfin.service
|
|
|
|
Source2: jellyfin.env
|
|
|
|
Source3: jellyfin.sudoers
|
|
|
|
Source4: restart.sh
|
2019-01-12 00:49:46 +00:00
|
|
|
Source5: jellyfin.override.conf
|
|
|
|
Source6: jellyfin-firewalld.xml
|
2019-01-05 10:14:24 +00:00
|
|
|
|
|
|
|
%{?systemd_requires}
|
|
|
|
BuildRequires: systemd
|
|
|
|
Requires(pre): shadow-utils
|
|
|
|
BuildRequires: libcurl-devel, fontconfig-devel, freetype-devel, openssl-devel, glibc-devel, libicu-devel
|
|
|
|
Requires: libcurl, fontconfig, freetype, openssl, glibc libicu
|
|
|
|
# Requirements not packaged in main repos
|
|
|
|
# COPR @dotnet-sig/dotnet
|
2019-02-21 06:30:51 +00:00
|
|
|
BuildRequires: dotnet-runtime-2.2, dotnet-sdk-2.2
|
2019-01-05 10:14:24 +00:00
|
|
|
# RPMfusion free
|
|
|
|
Requires: ffmpeg
|
|
|
|
|
|
|
|
# Fedora has openssl1.1 which is incompatible with dotnet
|
|
|
|
%{?fedora:Requires: compat-openssl10}
|
2019-02-02 18:05:49 +00:00
|
|
|
|
|
|
|
# Disable Automatic Dependency Processing
|
|
|
|
AutoReqProv: no
|
2019-01-05 10:14:24 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Jellyfin is a free software media system that puts you in control of managing and streaming your media.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2019-01-05 21:44:46 +00:00
|
|
|
%autosetup -n %{name}-%{version}
|
2019-01-05 10:14:24 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
|
|
|
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
|
|
|
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
2019-02-22 12:52:32 +00:00
|
|
|
dotnet publish --configuration Release --output='%{buildroot}%{_libdir}/jellyfin' --self-contained --runtime %{dotnet_runtime} \
|
|
|
|
"-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" Jellyfin.Server
|
2019-01-05 10:14:24 +00:00
|
|
|
%{__install} -D -m 0644 LICENSE %{buildroot}%{_datadir}/licenses/%{name}/LICENSE
|
2019-01-12 00:49:46 +00:00
|
|
|
%{__install} -D -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/override.conf
|
2019-01-11 15:15:06 +00:00
|
|
|
%{__install} -D -m 0644 Jellyfin.Server/Resources/Configuration/logging.json %{buildroot}%{_sysconfdir}/%{name}/logging.json
|
2019-01-05 10:14:24 +00:00
|
|
|
%{__mkdir} -p %{buildroot}%{_bindir}
|
|
|
|
tee %{buildroot}%{_bindir}/jellyfin << EOF
|
|
|
|
#!/bin/sh
|
|
|
|
exec %{_libdir}/%{name}/%{name} \${@}
|
|
|
|
EOF
|
|
|
|
%{__mkdir} -p %{buildroot}%{_sharedstatedir}/jellyfin
|
2019-01-07 17:51:37 +00:00
|
|
|
%{__mkdir} -p %{buildroot}%{_sysconfdir}/%{name}
|
|
|
|
%{__mkdir} -p %{buildroot}%{_var}/log/jellyfin
|
2019-02-02 19:01:29 +00:00
|
|
|
%{__mkdir} -p %{buildroot}%{_var}/cache/jellyfin
|
2019-01-07 17:51:37 +00:00
|
|
|
|
2019-01-05 10:14:24 +00:00
|
|
|
%{__install} -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
|
|
|
|
%{__install} -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
2019-01-05 20:30:45 +00:00
|
|
|
%{__install} -D -m 0600 %{SOURCE3} %{buildroot}%{_sysconfdir}/sudoers.d/%{name}-sudoers
|
2019-01-11 15:58:41 +00:00
|
|
|
%{__install} -D -m 0755 %{SOURCE4} %{buildroot}%{_libexecdir}/%{name}/restart.sh
|
2019-08-20 18:27:31 +00:00
|
|
|
%{__install} -D -m 0644 %{SOURCE6} %{buildroot}%{_prefix}/lib/firewalld/services/%{name}.xml
|
2019-01-05 10:14:24 +00:00
|
|
|
|
|
|
|
%files
|
2019-01-12 00:49:46 +00:00
|
|
|
%{_libdir}/%{name}/jellyfin-web/*
|
2019-01-05 10:14:24 +00:00
|
|
|
%attr(755,root,root) %{_bindir}/%{name}
|
2019-01-11 15:58:41 +00:00
|
|
|
%{_libdir}/%{name}/*.json
|
|
|
|
%{_libdir}/%{name}/*.dll
|
|
|
|
%{_libdir}/%{name}/*.so
|
|
|
|
%{_libdir}/%{name}/*.a
|
|
|
|
%{_libdir}/%{name}/createdump
|
2019-01-11 19:21:40 +00:00
|
|
|
# Needs 755 else only root can run it since binary build by dotnet is 722
|
2019-01-11 19:06:08 +00:00
|
|
|
%attr(755,root,root) %{_libdir}/%{name}/jellyfin
|
2019-01-11 15:58:41 +00:00
|
|
|
%{_libdir}/%{name}/sosdocsunix.txt
|
|
|
|
%{_unitdir}/%{name}.service
|
|
|
|
%{_libexecdir}/%{name}/restart.sh
|
2019-08-20 18:27:31 +00:00
|
|
|
%{_prefix}/lib/firewalld/services/%{name}.xml
|
2019-01-07 17:51:37 +00:00
|
|
|
%attr(755,jellyfin,jellyfin) %dir %{_sysconfdir}/%{name}
|
2019-01-08 17:56:55 +00:00
|
|
|
%config %{_sysconfdir}/sysconfig/%{name}
|
2019-01-05 20:30:45 +00:00
|
|
|
%config(noreplace) %attr(600,root,root) %{_sysconfdir}/sudoers.d/%{name}-sudoers
|
2019-01-05 10:14:24 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/systemd/system/%{name}.service.d/override.conf
|
2019-01-07 17:51:37 +00:00
|
|
|
%config(noreplace) %attr(644,jellyfin,jellyfin) %{_sysconfdir}/%{name}/logging.json
|
2019-02-02 19:01:29 +00:00
|
|
|
%attr(750,jellyfin,jellyfin) %dir %{_sharedstatedir}/jellyfin
|
2019-01-07 17:51:37 +00:00
|
|
|
%attr(-,jellyfin,jellyfin) %dir %{_var}/log/jellyfin
|
2019-02-02 19:01:29 +00:00
|
|
|
%attr(750,jellyfin,jellyfin) %dir %{_var}/cache/jellyfin
|
2019-01-05 10:14:24 +00:00
|
|
|
%if 0%{?fedora}
|
|
|
|
%license LICENSE
|
|
|
|
%else
|
|
|
|
%{_datadir}/licenses/%{name}/LICENSE
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%pre
|
|
|
|
getent group jellyfin >/dev/null || groupadd -r jellyfin
|
|
|
|
getent passwd jellyfin >/dev/null || \
|
|
|
|
useradd -r -g jellyfin -d %{_sharedstatedir}/jellyfin -s /sbin/nologin \
|
|
|
|
-c "Jellyfin default user" jellyfin
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%post
|
2019-02-02 19:01:29 +00:00
|
|
|
# Move existing configuration cache and logs to their new locations and symlink them.
|
2019-01-08 17:56:55 +00:00
|
|
|
if [ $1 -gt 1 ] ; then
|
2019-01-08 18:44:51 +00:00
|
|
|
service_state=$(systemctl is-active jellyfin.service)
|
|
|
|
if [ "${service_state}" = "active" ]; then
|
|
|
|
systemctl stop jellyfin.service
|
|
|
|
fi
|
2019-01-08 17:56:55 +00:00
|
|
|
if [ ! -L %{_sharedstatedir}/%{name}/config ]; then
|
|
|
|
mv %{_sharedstatedir}/%{name}/config/* %{_sysconfdir}/%{name}/
|
|
|
|
rmdir %{_sharedstatedir}/%{name}/config
|
|
|
|
ln -sf %{_sysconfdir}/%{name} %{_sharedstatedir}/%{name}/config
|
2019-01-08 18:44:51 +00:00
|
|
|
fi
|
|
|
|
if [ ! -L %{_sharedstatedir}/%{name}/logs ]; then
|
|
|
|
mv %{_sharedstatedir}/%{name}/logs/* %{_var}/log/jellyfin
|
|
|
|
rmdir %{_sharedstatedir}/%{name}/logs
|
|
|
|
ln -sf %{_var}/log/jellyfin %{_sharedstatedir}/%{name}/logs
|
|
|
|
fi
|
2019-02-02 19:01:29 +00:00
|
|
|
if [ ! -L %{_sharedstatedir}/%{name}/cache ]; then
|
|
|
|
mv %{_sharedstatedir}/%{name}/cache/* %{_var}/cache/jellyfin
|
|
|
|
rmdir %{_sharedstatedir}/%{name}/cache
|
|
|
|
ln -sf %{_var}/cache/jellyfin %{_sharedstatedir}/%{name}/cache
|
|
|
|
fi
|
2019-01-08 18:44:51 +00:00
|
|
|
if [ "${service_state}" = "active" ]; then
|
|
|
|
systemctl start jellyfin.service
|
2019-01-08 17:56:55 +00:00
|
|
|
fi
|
|
|
|
fi
|
2019-01-05 10:14:24 +00:00
|
|
|
%systemd_post jellyfin.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%systemd_preun jellyfin.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%systemd_postun_with_restart jellyfin.service
|
|
|
|
|
|
|
|
%changelog
|
2019-09-01 01:39:10 +00:00
|
|
|
* Sat Aug 31 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
|
|
|
- New upstream version 10.4.0; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.4.0
|
2019-07-24 14:48:35 +00:00
|
|
|
* Wed Jul 24 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
|
|
|
- New upstream version 10.3.7; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.7
|
2019-07-06 17:34:38 +00:00
|
|
|
* Sat Jul 06 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
|
|
|
- New upstream version 10.3.6; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.6
|
2019-06-10 01:47:45 +00:00
|
|
|
* Sun Jun 09 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
|
|
|
- New upstream version 10.3.5; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.5
|
2019-06-07 02:45:37 +00:00
|
|
|
* Thu Jun 06 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
|
|
|
- New upstream version 10.3.4; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.4
|
2019-05-18 03:12:21 +00:00
|
|
|
* Fri May 17 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
|
|
|
- New upstream version 10.3.3; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.3
|
2019-05-01 00:18:54 +00:00
|
|
|
* Tue Apr 30 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
|
|
|
- New upstream version 10.3.2; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.2
|
2019-04-20 18:24:40 +00:00
|
|
|
* Sat Apr 20 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
|
|
|
- New upstream version 10.3.1; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.1
|
2019-04-19 18:25:29 +00:00
|
|
|
* Fri Apr 19 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
|
|
|
|
- New upstream version 10.3.0; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.0
|