From 4d335d8f1394e186ca761c10237f93c85657adf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=BCttner?= Date: Sat, 2 Feb 2019 18:20:04 +0100 Subject: [PATCH] Add CentOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Büttner --- deployment/centos-package-x64/Dockerfile | 15 +++++++++++++++ deployment/centos-package-x64/clean.sh | 1 + deployment/centos-package-x64/package.sh | 1 + deployment/centos-package-x64/pkg-src | 1 + .../fedora-package-x64/pkg-src/jellyfin.spec | 13 +++++++------ 5 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 deployment/centos-package-x64/Dockerfile create mode 120000 deployment/centos-package-x64/clean.sh create mode 120000 deployment/centos-package-x64/package.sh create mode 120000 deployment/centos-package-x64/pkg-src diff --git a/deployment/centos-package-x64/Dockerfile b/deployment/centos-package-x64/Dockerfile new file mode 100644 index 0000000000..bbe5ffd277 --- /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 0000000000..d6d2d1c091 --- /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 0000000000..a79de21eba --- /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 0000000000..dfd6497cfd --- /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 6a4a5870b8..2cf10ef0c0 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