mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #1859 from joshuaboniface/copr-fix
Fix COPR build and Fedora packaging
This commit is contained in:
commit
5d5fa55fe5
@ -1,8 +1,59 @@
|
|||||||
srpm:
|
VERSION := $(shell sed -ne '/^Version:/s/.* *//p' \
|
||||||
dnf -y install git
|
deployment/fedora-package-x64/pkg-src/jellyfin.spec)
|
||||||
git submodule update --init --recursive
|
|
||||||
|
deployment/fedora-package-x64/pkg-src/jellyfin-web-$(VERSION).tar.gz:
|
||||||
|
curl -f -L -o deployment/fedora-package-x64/pkg-src/jellyfin-web-$(VERSION).tar.gz \
|
||||||
|
https://github.com/jellyfin/jellyfin-web/archive/v$(VERSION).tar.gz \
|
||||||
|
|| curl -f -L -o deployment/fedora-package-x64/pkg-src/jellyfin-web-$(VERSION).tar.gz \
|
||||||
|
https://github.com/jellyfin/jellyfin-web/archive/master.tar.gz \
|
||||||
|
|
||||||
|
srpm: deployment/fedora-package-x64/pkg-src/jellyfin-web-$(VERSION).tar.gz
|
||||||
cd deployment/fedora-package-x64; \
|
cd deployment/fedora-package-x64; \
|
||||||
./create_tarball.sh; \
|
SOURCE_DIR=../.. \
|
||||||
|
WORKDIR="$${PWD}"; \
|
||||||
|
package_temporary_dir="$${WORKDIR}/pkg-dist-tmp"; \
|
||||||
|
pkg_src_dir="$${WORKDIR}/pkg-src"; \
|
||||||
|
GNU_TAR=1; \
|
||||||
|
tar \
|
||||||
|
--transform "s,^\.,jellyfin-$(VERSION)," \
|
||||||
|
--exclude='.git*' \
|
||||||
|
--exclude='**/.git' \
|
||||||
|
--exclude='**/.hg' \
|
||||||
|
--exclude='**/.vs' \
|
||||||
|
--exclude='**/.vscode' \
|
||||||
|
--exclude='deployment' \
|
||||||
|
--exclude='**/bin' \
|
||||||
|
--exclude='**/obj' \
|
||||||
|
--exclude='**/.nuget' \
|
||||||
|
--exclude='*.deb' \
|
||||||
|
--exclude='*.rpm' \
|
||||||
|
-czf "pkg-src/jellyfin-$(VERSION).tar.gz" \
|
||||||
|
-C $${SOURCE_DIR} ./ || GNU_TAR=0; \
|
||||||
|
if [ $${GNU_TAR} -eq 0 ]; then \
|
||||||
|
package_temporary_dir="$$(mktemp -d)"; \
|
||||||
|
mkdir -p "$${package_temporary_dir}/jellyfin"; \
|
||||||
|
tar \
|
||||||
|
--exclude='.git*' \
|
||||||
|
--exclude='**/.git' \
|
||||||
|
--exclude='**/.hg' \
|
||||||
|
--exclude='**/.vs' \
|
||||||
|
--exclude='**/.vscode' \
|
||||||
|
--exclude='deployment' \
|
||||||
|
--exclude='**/bin' \
|
||||||
|
--exclude='**/obj' \
|
||||||
|
--exclude='**/.nuget' \
|
||||||
|
--exclude='*.deb' \
|
||||||
|
--exclude='*.rpm' \
|
||||||
|
-czf "$${package_temporary_dir}/jellyfin/jellyfin-$(VERSION).tar.gz" \
|
||||||
|
-C $${SOURCE_DIR} ./; \
|
||||||
|
mkdir -p "$${package_temporary_dir}/jellyfin-$(VERSION)"; \
|
||||||
|
tar -xzf "$${package_temporary_dir}/jellyfin/jellyfin-$(VERSION).tar.gz" \
|
||||||
|
-C "$${package_temporary_dir}/jellyfin-$(VERSION); \
|
||||||
|
rm -f "$${package_temporary_dir}/jellyfin/jellyfin-$(VERSION).tar.gz"; \
|
||||||
|
tar -czf "$${SOURCE_DIR}/SOURCES/pkg-src/jellyfin-$(VERSION).tar.gz" \
|
||||||
|
-C "$${package_temporary_dir}" "jellyfin-$(VERSION); \
|
||||||
|
rm -rf $${package_temporary_dir}; \
|
||||||
|
fi; \
|
||||||
rpmbuild -bs pkg-src/jellyfin.spec \
|
rpmbuild -bs pkg-src/jellyfin.spec \
|
||||||
--define "_sourcedir $$PWD/pkg-src/" \
|
--define "_sourcedir $$PWD/pkg-src/" \
|
||||||
--define "_srcrpmdir $(outdir)"
|
--define "_srcrpmdir $(outdir)"
|
||||||
|
@ -3,7 +3,7 @@ FROM centos:7
|
|||||||
ARG SOURCE_DIR=/jellyfin
|
ARG SOURCE_DIR=/jellyfin
|
||||||
ARG PLATFORM_DIR=/jellyfin/deployment/centos-package-x64
|
ARG PLATFORM_DIR=/jellyfin/deployment/centos-package-x64
|
||||||
ARG ARTIFACT_DIR=/dist
|
ARG ARTIFACT_DIR=/dist
|
||||||
ARG SDK_VERSION=2.2
|
ARG SDK_VERSION=3.0
|
||||||
# Docker run environment
|
# Docker run environment
|
||||||
ENV SOURCE_DIR=/jellyfin
|
ENV SOURCE_DIR=/jellyfin
|
||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
@ -13,13 +13,12 @@ RUN yum update -y \
|
|||||||
&& yum install -y epel-release
|
&& yum install -y epel-release
|
||||||
|
|
||||||
# Install build dependencies
|
# Install build dependencies
|
||||||
RUN yum install -y @buildsys-build rpmdevtools yum-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel wget git
|
RUN yum install -y @buildsys-build rpmdevtools yum-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel git
|
||||||
|
|
||||||
# Install recent NodeJS and Yarn
|
# Install recent NodeJS and Yarn
|
||||||
RUN wget -O- https://raw.githubusercontent.com/creationix/nvm/v0.35.0/install.sh | /bin/bash \
|
RUN curl -fSsLo /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo \
|
||||||
&& source "$HOME/.nvm/nvm.sh" \
|
&& rpm -i https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm \
|
||||||
&& nvm install v8 \
|
&& yum install -y yarn
|
||||||
&& npm install -g yarn
|
|
||||||
|
|
||||||
# Install DotNET SDK
|
# Install DotNET SDK
|
||||||
RUN rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm \
|
RUN rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm \
|
||||||
|
@ -8,76 +8,9 @@ set -o xtrace
|
|||||||
# Move to source directory
|
# Move to source directory
|
||||||
pushd ${SOURCE_DIR}
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
VERSION="$( grep '^Version:' ${SOURCE_DIR}/SOURCES/pkg-src/jellyfin.spec | awk '{ print $NF }' )"
|
|
||||||
|
|
||||||
# Clone down and build Web frontend
|
|
||||||
web_build_dir="$( mktemp -d )"
|
|
||||||
web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|
||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
|
||||||
pushd ${web_build_dir}
|
|
||||||
if [[ -n ${web_branch} ]]; then
|
|
||||||
checkout -b origin/${web_branch}
|
|
||||||
fi
|
|
||||||
source "$HOME/.nvm/nvm.sh"
|
|
||||||
nvm use v8
|
|
||||||
yarn install
|
|
||||||
mkdir -p ${web_target}
|
|
||||||
mv dist/* ${web_target}/
|
|
||||||
popd
|
|
||||||
rm -rf ${web_build_dir}
|
|
||||||
|
|
||||||
# Create RPM source archive
|
|
||||||
GNU_TAR=1
|
|
||||||
echo "Bundling all sources for RPM build."
|
|
||||||
tar \
|
|
||||||
--transform "s,^\.,jellyfin-${VERSION}," \
|
|
||||||
--exclude='.git*' \
|
|
||||||
--exclude='**/.git' \
|
|
||||||
--exclude='**/.hg' \
|
|
||||||
--exclude='**/.vs' \
|
|
||||||
--exclude='**/.vscode' \
|
|
||||||
--exclude='deployment' \
|
|
||||||
--exclude='**/bin' \
|
|
||||||
--exclude='**/obj' \
|
|
||||||
--exclude='**/.nuget' \
|
|
||||||
--exclude='*.deb' \
|
|
||||||
--exclude='*.rpm' \
|
|
||||||
-czf "${SOURCE_DIR}/SOURCES/pkg-src/jellyfin-${VERSION}.tar.gz" \
|
|
||||||
-C ${SOURCE_DIR} ./ || GNU_TAR=0
|
|
||||||
|
|
||||||
if [ $GNU_TAR -eq 0 ]; then
|
|
||||||
echo "The installed tar binary did not support --transform. Using workaround."
|
|
||||||
package_temporary_dir="$( mktemp -d )"
|
|
||||||
mkdir -p "${package_temporary_dir}/jellyfin"
|
|
||||||
# Not GNU tar
|
|
||||||
tar \
|
|
||||||
--exclude='.git*' \
|
|
||||||
--exclude='**/.git' \
|
|
||||||
--exclude='**/.hg' \
|
|
||||||
--exclude='**/.vs' \
|
|
||||||
--exclude='**/.vscode' \
|
|
||||||
--exclude='deployment' \
|
|
||||||
--exclude='**/bin' \
|
|
||||||
--exclude='**/obj' \
|
|
||||||
--exclude='**/.nuget' \
|
|
||||||
--exclude='*.deb' \
|
|
||||||
--exclude='*.rpm' \
|
|
||||||
-czf "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz" \
|
|
||||||
-C ${SOURCE_DIR} ./
|
|
||||||
echo "Extracting filtered package."
|
|
||||||
mkdir -p "${package_temporary_dir}/jellyfin-${VERSION}"
|
|
||||||
tar -xzf "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz" -C "${package_temporary_dir}/jellyfin-${VERSION}"
|
|
||||||
echo "Removing filtered package."
|
|
||||||
rm -f "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz"
|
|
||||||
echo "Repackaging package into final tarball."
|
|
||||||
tar -czf "${SOURCE_DIR}/SOURCES/pkg-src/jellyfin-${VERSION}.tar.gz" -C "${package_temporary_dir}" "jellyfin-${VERSION}"
|
|
||||||
rm -rf ${package_temporary_dir}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build RPM
|
# Build RPM
|
||||||
spectool -g -R SPECS/jellyfin.spec
|
make -f .copr/Makefile srpm outdir=/root/rpmbuild/SRPMS
|
||||||
rpmbuild -bs SPECS/jellyfin.spec --define "_sourcedir ${SOURCE_DIR}/SOURCES/pkg-src/"
|
rpmbuild --rebuild -bb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm
|
||||||
rpmbuild -bb SPECS/jellyfin.spec --define "_sourcedir ${SOURCE_DIR}/SOURCES/pkg-src/"
|
|
||||||
|
|
||||||
# Move the artifacts out
|
# Move the artifacts out
|
||||||
mkdir -p ${ARTIFACT_DIR}/rpm
|
mkdir -p ${ARTIFACT_DIR}/rpm
|
||||||
|
@ -3,7 +3,7 @@ FROM fedora:29
|
|||||||
ARG SOURCE_DIR=/jellyfin
|
ARG SOURCE_DIR=/jellyfin
|
||||||
ARG PLATFORM_DIR=/jellyfin/deployment/fedora-package-x64
|
ARG PLATFORM_DIR=/jellyfin/deployment/fedora-package-x64
|
||||||
ARG ARTIFACT_DIR=/dist
|
ARG ARTIFACT_DIR=/dist
|
||||||
ARG SDK_VERSION=2.2
|
ARG SDK_VERSION=3.0
|
||||||
# Docker run environment
|
# Docker run environment
|
||||||
ENV SOURCE_DIR=/jellyfin
|
ENV SOURCE_DIR=/jellyfin
|
||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
@ -12,17 +12,13 @@ ENV ARTIFACT_DIR=/dist
|
|||||||
RUN dnf update -y
|
RUN dnf update -y
|
||||||
|
|
||||||
# Install build dependencies
|
# Install build dependencies
|
||||||
RUN dnf install -y @buildsys-build rpmdevtools dnf-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel nodejs wget git
|
RUN dnf install -y @buildsys-build rpmdevtools dnf-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel nodejs-yarn
|
||||||
|
|
||||||
# Install DotNET SDK
|
# Install DotNET SDK
|
||||||
RUN dnf copr enable -y @dotnet-sig/dotnet \
|
RUN dnf copr enable -y @dotnet-sig/dotnet \
|
||||||
&& rpmdev-setuptree \
|
&& rpmdev-setuptree \
|
||||||
&& dnf install -y dotnet-sdk-${SDK_VERSION} dotnet-runtime-${SDK_VERSION}
|
&& dnf install -y dotnet-sdk-${SDK_VERSION} dotnet-runtime-${SDK_VERSION}
|
||||||
|
|
||||||
# Install yarn package manager
|
|
||||||
RUN wget -q -O /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo \
|
|
||||||
&& dnf install -y yarn
|
|
||||||
|
|
||||||
# Create symlinks and directories
|
# Create symlinks and directories
|
||||||
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh \
|
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh \
|
||||||
&& mkdir -p ${SOURCE_DIR}/SPECS \
|
&& mkdir -p ${SOURCE_DIR}/SPECS \
|
||||||
|
@ -8,74 +8,9 @@ set -o xtrace
|
|||||||
# Move to source directory
|
# Move to source directory
|
||||||
pushd ${SOURCE_DIR}
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
VERSION="$( grep '^Version:' ${SOURCE_DIR}/SOURCES/pkg-src/jellyfin.spec | awk '{ print $NF }' )"
|
|
||||||
|
|
||||||
# Clone down and build Web frontend
|
|
||||||
web_build_dir="$( mktemp -d )"
|
|
||||||
web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|
||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
|
||||||
pushd ${web_build_dir}
|
|
||||||
if [[ -n ${web_branch} ]]; then
|
|
||||||
checkout -b origin/${web_branch}
|
|
||||||
fi
|
|
||||||
yarn install
|
|
||||||
mkdir -p ${web_target}
|
|
||||||
mv dist/* ${web_target}/
|
|
||||||
popd
|
|
||||||
rm -rf ${web_build_dir}
|
|
||||||
|
|
||||||
# Create RPM source archive
|
|
||||||
GNU_TAR=1
|
|
||||||
echo "Bundling all sources for RPM build."
|
|
||||||
tar \
|
|
||||||
--transform "s,^\.,jellyfin-${VERSION}," \
|
|
||||||
--exclude='.git*' \
|
|
||||||
--exclude='**/.git' \
|
|
||||||
--exclude='**/.hg' \
|
|
||||||
--exclude='**/.vs' \
|
|
||||||
--exclude='**/.vscode' \
|
|
||||||
--exclude='deployment' \
|
|
||||||
--exclude='**/bin' \
|
|
||||||
--exclude='**/obj' \
|
|
||||||
--exclude='**/.nuget' \
|
|
||||||
--exclude='*.deb' \
|
|
||||||
--exclude='*.rpm' \
|
|
||||||
-czf "${SOURCE_DIR}/SOURCES/pkg-src/jellyfin-${VERSION}.tar.gz" \
|
|
||||||
-C ${SOURCE_DIR} ./ || GNU_TAR=0
|
|
||||||
|
|
||||||
if [ $GNU_TAR -eq 0 ]; then
|
|
||||||
echo "The installed tar binary did not support --transform. Using workaround."
|
|
||||||
package_temporary_dir="$( mktemp -d )"
|
|
||||||
mkdir -p "${package_temporary_dir}/jellyfin"
|
|
||||||
# Not GNU tar
|
|
||||||
tar \
|
|
||||||
--exclude='.git*' \
|
|
||||||
--exclude='**/.git' \
|
|
||||||
--exclude='**/.hg' \
|
|
||||||
--exclude='**/.vs' \
|
|
||||||
--exclude='**/.vscode' \
|
|
||||||
--exclude='deployment' \
|
|
||||||
--exclude='**/bin' \
|
|
||||||
--exclude='**/obj' \
|
|
||||||
--exclude='**/.nuget' \
|
|
||||||
--exclude='*.deb' \
|
|
||||||
--exclude='*.rpm' \
|
|
||||||
-czf "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz" \
|
|
||||||
-C ${SOURCE_DIR} ./
|
|
||||||
echo "Extracting filtered package."
|
|
||||||
mkdir -p "${package_temporary_dir}/jellyfin-${VERSION}"
|
|
||||||
tar -xzf "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz" -C "${package_temporary_dir}/jellyfin-${VERSION}"
|
|
||||||
echo "Removing filtered package."
|
|
||||||
rm -f "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz"
|
|
||||||
echo "Repackaging package into final tarball."
|
|
||||||
tar -czf "${SOURCE_DIR}/SOURCES/pkg-src/jellyfin-${VERSION}.tar.gz" -C "${package_temporary_dir}" "jellyfin-${VERSION}"
|
|
||||||
rm -rf ${package_temporary_dir}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build RPM
|
# Build RPM
|
||||||
spectool -g -R SPECS/jellyfin.spec
|
make -f .copr/Makefile srpm outdir=/root/rpmbuild/SRPMS
|
||||||
rpmbuild -bs SPECS/jellyfin.spec --define "_sourcedir ${SOURCE_DIR}/SOURCES/pkg-src/"
|
rpmbuild -rb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm
|
||||||
rpmbuild -bb SPECS/jellyfin.spec --define "_sourcedir ${SOURCE_DIR}/SOURCES/pkg-src/"
|
|
||||||
|
|
||||||
# Move the artifacts out
|
# Move the artifacts out
|
||||||
mkdir -p ${ARTIFACT_DIR}/rpm
|
mkdir -p ${ARTIFACT_DIR}/rpm
|
||||||
|
@ -12,28 +12,36 @@ Release: 1%{?dist}
|
|||||||
Summary: The Free Software Media Browser
|
Summary: The Free Software Media Browser
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: https://jellyfin.media
|
URL: https://jellyfin.media
|
||||||
Source0: %{name}-%{version}.tar.gz
|
# Jellyfin Server tarball created by `make -f .copr/Makefile srpm`, real URL ends with `v%{version}.tar.gz`
|
||||||
Source1: jellyfin.service
|
Source0: https://github.com/%{name}/%{name}/archive/%{name}-%{version}.tar.gz
|
||||||
Source2: jellyfin.env
|
# Jellyfin Webinterface downloaded by `make -f .copr/Makefile srpm`, real URL ends with `v%{version}.tar.gz`
|
||||||
Source3: jellyfin.sudoers
|
Source1: https://github.com/%{name}/%{name}-web/archive/%{name}-web-%{version}.tar.gz
|
||||||
Source4: restart.sh
|
Source11: jellyfin.service
|
||||||
Source5: jellyfin.override.conf
|
Source12: jellyfin.env
|
||||||
Source6: jellyfin-firewalld.xml
|
Source13: jellyfin.sudoers
|
||||||
|
Source14: restart.sh
|
||||||
|
Source15: jellyfin.override.conf
|
||||||
|
Source16: jellyfin-firewalld.xml
|
||||||
|
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
BuildRequires: libcurl-devel, fontconfig-devel, freetype-devel, openssl-devel, glibc-devel, libicu-devel
|
BuildRequires: libcurl-devel, fontconfig-devel, freetype-devel, openssl-devel, glibc-devel, libicu-devel
|
||||||
|
%if 0%{?fedora}
|
||||||
|
BuildRequires: nodejs-yarn
|
||||||
|
%else
|
||||||
|
# Requirements not packaged in main repos
|
||||||
|
# From https://rpm.nodesource.com/pub_8.x/el/7/x86_64/
|
||||||
|
BuildRequires: nodejs >= 8 yarn
|
||||||
|
%endif
|
||||||
Requires: libcurl, fontconfig, freetype, openssl, glibc libicu
|
Requires: libcurl, fontconfig, freetype, openssl, glibc libicu
|
||||||
# Requirements not packaged in main repos
|
# Requirements not packaged in main repos
|
||||||
# COPR @dotnet-sig/dotnet
|
# COPR @dotnet-sig/dotnet or
|
||||||
BuildRequires: dotnet-runtime-2.2, dotnet-sdk-2.2
|
# https://packages.microsoft.com/rhel/7/prod/
|
||||||
|
BuildRequires: dotnet-runtime-3.0, dotnet-sdk-3.0
|
||||||
# RPMfusion free
|
# RPMfusion free
|
||||||
Requires: ffmpeg
|
Requires: ffmpeg
|
||||||
|
|
||||||
# Fedora has openssl1.1 which is incompatible with dotnet
|
|
||||||
%{?fedora:Requires: compat-openssl10}
|
|
||||||
|
|
||||||
# Disable Automatic Dependency Processing
|
# Disable Automatic Dependency Processing
|
||||||
AutoReqProv: no
|
AutoReqProv: no
|
||||||
|
|
||||||
@ -42,7 +50,18 @@ Jellyfin is a free software media system that puts you in control of managing an
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version}
|
%autosetup -n %{name}-%{version} -b 0 -b 1
|
||||||
|
web_build_dir="$(mktemp -d)"
|
||||||
|
web_target="$PWD/MediaBrowser.WebDashboard/jellyfin-web"
|
||||||
|
pushd ../jellyfin-web-%{version} || pushd ../jellyfin-web-master
|
||||||
|
%if 0%{?fedora}
|
||||||
|
nodejs-yarn install
|
||||||
|
%else
|
||||||
|
yarn install
|
||||||
|
%endif
|
||||||
|
mkdir -p ${web_target}
|
||||||
|
mv dist/* ${web_target}/
|
||||||
|
popd
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -52,7 +71,7 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
|||||||
dotnet publish --configuration Release --output='%{buildroot}%{_libdir}/jellyfin' --self-contained --runtime %{dotnet_runtime} \
|
dotnet publish --configuration Release --output='%{buildroot}%{_libdir}/jellyfin' --self-contained --runtime %{dotnet_runtime} \
|
||||||
"-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" Jellyfin.Server
|
"-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" Jellyfin.Server
|
||||||
%{__install} -D -m 0644 LICENSE %{buildroot}%{_datadir}/licenses/%{name}/LICENSE
|
%{__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 %{SOURCE15} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/override.conf
|
||||||
%{__install} -D -m 0644 Jellyfin.Server/Resources/Configuration/logging.json %{buildroot}%{_sysconfdir}/%{name}/logging.json
|
%{__install} -D -m 0644 Jellyfin.Server/Resources/Configuration/logging.json %{buildroot}%{_sysconfdir}/%{name}/logging.json
|
||||||
%{__mkdir} -p %{buildroot}%{_bindir}
|
%{__mkdir} -p %{buildroot}%{_bindir}
|
||||||
tee %{buildroot}%{_bindir}/jellyfin << EOF
|
tee %{buildroot}%{_bindir}/jellyfin << EOF
|
||||||
@ -64,11 +83,11 @@ EOF
|
|||||||
%{__mkdir} -p %{buildroot}%{_var}/log/jellyfin
|
%{__mkdir} -p %{buildroot}%{_var}/log/jellyfin
|
||||||
%{__mkdir} -p %{buildroot}%{_var}/cache/jellyfin
|
%{__mkdir} -p %{buildroot}%{_var}/cache/jellyfin
|
||||||
|
|
||||||
%{__install} -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
|
%{__install} -D -m 0644 %{SOURCE11} %{buildroot}%{_unitdir}/%{name}.service
|
||||||
%{__install} -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
%{__install} -D -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
||||||
%{__install} -D -m 0600 %{SOURCE3} %{buildroot}%{_sysconfdir}/sudoers.d/%{name}-sudoers
|
%{__install} -D -m 0600 %{SOURCE13} %{buildroot}%{_sysconfdir}/sudoers.d/%{name}-sudoers
|
||||||
%{__install} -D -m 0755 %{SOURCE4} %{buildroot}%{_libexecdir}/%{name}/restart.sh
|
%{__install} -D -m 0755 %{SOURCE14} %{buildroot}%{_libexecdir}/%{name}/restart.sh
|
||||||
%{__install} -D -m 0644 %{SOURCE6} %{buildroot}%{_prefix}/lib/firewalld/services/%{name}.xml
|
%{__install} -D -m 0644 %{SOURCE16} %{buildroot}%{_prefix}/lib/firewalld/services/%{name}.xml
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{_libdir}/%{name}/jellyfin-web/*
|
%{_libdir}/%{name}/jellyfin-web/*
|
||||||
@ -80,7 +99,7 @@ EOF
|
|||||||
%{_libdir}/%{name}/createdump
|
%{_libdir}/%{name}/createdump
|
||||||
# Needs 755 else only root can run it since binary build by dotnet is 722
|
# Needs 755 else only root can run it since binary build by dotnet is 722
|
||||||
%attr(755,root,root) %{_libdir}/%{name}/jellyfin
|
%attr(755,root,root) %{_libdir}/%{name}/jellyfin
|
||||||
%{_libdir}/%{name}/sosdocsunix.txt
|
%{_libdir}/%{name}/SOS_README.md
|
||||||
%{_unitdir}/%{name}.service
|
%{_unitdir}/%{name}.service
|
||||||
%{_libexecdir}/%{name}/restart.sh
|
%{_libexecdir}/%{name}/restart.sh
|
||||||
%{_prefix}/lib/firewalld/services/%{name}.xml
|
%{_prefix}/lib/firewalld/services/%{name}.xml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user