diff --git a/deployment/centos-package-x64/Dockerfile b/deployment/centos-package-x64/Dockerfile new file mode 100644 index 000000000..bbe5ffd27 --- /dev/null +++ b/deployment/centos-package-x64/Dockerfile @@ -0,0 +1,15 @@ +FROM centos:7 +ARG HOME=/build +RUN mkdir /build && \ + yum install -y @buildsys-build rpmdevtools yum-plugins-core && \ + rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm && \ + rpmdev-setuptree + +WORKDIR /build/rpmbuild +COPY ./deployment/centos-package-x64/pkg-src/jellyfin.spec SPECS +COPY ./deployment/centos-package-x64/pkg-src/ SOURCES + +RUN spectool -g -R SPECS/jellyfin.spec && \ + rpmbuild -bs SPECS/jellyfin.spec && \ + yum-builddep -y SRPMS/jellyfin-*.src.rpm && \ + rpmbuild -bb SPECS/jellyfin.spec; \ No newline at end of file diff --git a/deployment/centos-package-x64/clean.sh b/deployment/centos-package-x64/clean.sh new file mode 120000 index 000000000..d6d2d1c09 --- /dev/null +++ b/deployment/centos-package-x64/clean.sh @@ -0,0 +1 @@ +../fedora-package-x64/clean.sh \ No newline at end of file diff --git a/deployment/centos-package-x64/package.sh b/deployment/centos-package-x64/package.sh new file mode 120000 index 000000000..a79de21eb --- /dev/null +++ b/deployment/centos-package-x64/package.sh @@ -0,0 +1 @@ +../fedora-package-x64/package.sh \ No newline at end of file diff --git a/deployment/centos-package-x64/pkg-src b/deployment/centos-package-x64/pkg-src new file mode 120000 index 000000000..dfd6497cf --- /dev/null +++ b/deployment/centos-package-x64/pkg-src @@ -0,0 +1 @@ +../fedora-package-x64/pkg-src \ No newline at end of file diff --git a/deployment/fedora-package-x64/pkg-src/jellyfin.spec b/deployment/fedora-package-x64/pkg-src/jellyfin.spec index 6a4a5870b..2cf10ef0c 100644 --- a/deployment/fedora-package-x64/pkg-src/jellyfin.spec +++ b/deployment/fedora-package-x64/pkg-src/jellyfin.spec @@ -1,9 +1,10 @@ %global debug_package %{nil} -# jellyfin tag to package -%global gittag v10.1.0 -# Taglib-sharp commit of the submodule since github archive doesn't include submodules -%global taglib_commit ee5ab21742b71fd1b87ee24895582327e9e04776 -%global taglib_shortcommit %(c=%{taglib_commit}; echo ${c:0:7}) +# Set the dotnet runtime +%if 0%{?fedora} +%global dotnet_runtime fedora-x64 +%else +%global dotnet_runtime centos-x64 +%endif AutoReq: no Name: jellyfin @@ -51,7 +52,7 @@ Jellyfin is a free software media system that puts you in control of managing an %install export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -dotnet publish --configuration Release --output='%{buildroot}%{_libdir}/jellyfin' --self-contained --runtime fedora-x64 Jellyfin.Server +dotnet publish --configuration Release --output='%{buildroot}%{_libdir}/jellyfin' --self-contained --runtime %{dotnet_runtime} Jellyfin.Server %{__install} -D -m 0644 LICENSE %{buildroot}%{_datadir}/licenses/%{name}/LICENSE %{__install} -D -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/override.conf %{__install} -D -m 0644 Jellyfin.Server/Resources/Configuration/logging.json %{buildroot}%{_sysconfdir}/%{name}/logging.json