mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-08 18:54:26 -04:00
Fix buildscript failure, remove unnecessary yarn repo for Fedora build
This commit is contained in:
parent
c30866fc93
commit
59995c20f1
@ -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,60 +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 }' )"
|
|
||||||
|
|
||||||
# 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user