mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #5287 from jellyfin/cleanup-legacy
Remove legacy build utilities
This commit is contained in:
commit
c960e19782
26 changed files with 0 additions and 661 deletions
1
.copr
1
.copr
|
@ -1 +0,0 @@
|
||||||
fedora/
|
|
110
build.sh
110
build.sh
|
@ -1,110 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# build.sh - Build Jellyfin binary packages
|
|
||||||
# Part of the Jellyfin Project
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o pipefail
|
|
||||||
|
|
||||||
usage() {
|
|
||||||
echo -e "build.sh - Build Jellyfin binary packages"
|
|
||||||
echo -e "Usage:"
|
|
||||||
echo -e " $0 -t/--type <BUILD_TYPE> -p/--platform <PLATFORM> [-k/--keep-artifacts] [-l/--list-platforms]"
|
|
||||||
echo -e "Notes:"
|
|
||||||
echo -e " * BUILD_TYPE can be one of: [native, docker] and must be specified"
|
|
||||||
echo -e " * native: Build using the build script in the host OS"
|
|
||||||
echo -e " * docker: Build using the build script in a standardized Docker container"
|
|
||||||
echo -e " * PLATFORM can be any platform shown by -l/--list-platforms and must be specified"
|
|
||||||
echo -e " * If -k/--keep-artifacts is specified, transient artifacts (e.g. Docker containers) will be"
|
|
||||||
echo -e " retained after the build is finished; the source directory will still be cleaned"
|
|
||||||
echo -e " * If -l/--list-platforms is specified, all other arguments are ignored; the script will print"
|
|
||||||
echo -e " the list of supported platforms and exit"
|
|
||||||
}
|
|
||||||
|
|
||||||
list_platforms() {
|
|
||||||
declare -a platforms
|
|
||||||
platforms=(
|
|
||||||
$( find deployment -maxdepth 1 -mindepth 1 -name "build.*" | awk -F'.' '{ $1=""; printf $2; if ($3 != ""){ printf "." $3; }; if ($4 != ""){ printf "." $4; }; print ""; }' | sort )
|
|
||||||
)
|
|
||||||
echo -e "Valid platforms:"
|
|
||||||
echo
|
|
||||||
for platform in ${platforms[@]}; do
|
|
||||||
echo -e "* ${platform} : $( grep '^#=' deployment/build.${platform} | sed 's/^#= //' )"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
do_build_native() {
|
|
||||||
export IS_DOCKER=NO
|
|
||||||
deployment/build.${PLATFORM}
|
|
||||||
}
|
|
||||||
|
|
||||||
do_build_docker() {
|
|
||||||
if ! [ $(uname -m) = "x86_64" ]; then
|
|
||||||
echo "Docker-based builds only support amd64-based cross-building; use a 'native' build instead."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ ! -f deployment/Dockerfile.${PLATFORM} ]]; then
|
|
||||||
echo "Missing Dockerfile for platform ${PLATFORM}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ ${KEEP_ARTIFACTS} == YES ]]; then
|
|
||||||
docker_args=""
|
|
||||||
else
|
|
||||||
docker_args="--rm"
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker build . -t "jellyfin-builder.${PLATFORM}" -f deployment/Dockerfile.${PLATFORM}
|
|
||||||
mkdir -p ${ARTIFACT_DIR}
|
|
||||||
docker run $docker_args -v "${SOURCE_DIR}:/jellyfin" -v "${ARTIFACT_DIR}:/dist" "jellyfin-builder.${PLATFORM}"
|
|
||||||
}
|
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
|
||||||
key="$1"
|
|
||||||
case $key in
|
|
||||||
-t|--type)
|
|
||||||
BUILD_TYPE="$2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-p|--platform)
|
|
||||||
PLATFORM="$2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-k|--keep-artifacts)
|
|
||||||
KEEP_ARTIFACTS=YES
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-l|--list-platforms)
|
|
||||||
list_platforms
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
-h|--help)
|
|
||||||
usage
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown option $1"
|
|
||||||
usage
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ -z ${BUILD_TYPE} || -z ${PLATFORM} ]]; then
|
|
||||||
usage
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
export SOURCE_DIR="$( pwd )"
|
|
||||||
export ARTIFACT_DIR="${SOURCE_DIR}/../bin/${PLATFORM}"
|
|
||||||
|
|
||||||
# Determine build type
|
|
||||||
case ${BUILD_TYPE} in
|
|
||||||
native)
|
|
||||||
do_build_native
|
|
||||||
;;
|
|
||||||
docker)
|
|
||||||
do_build_docker
|
|
||||||
;;
|
|
||||||
esac
|
|
|
@ -1,9 +0,0 @@
|
||||||
---
|
|
||||||
# We just wrap `build` so this is really it
|
|
||||||
name: "jellyfin-web"
|
|
||||||
version: "10.8.0"
|
|
||||||
packages:
|
|
||||||
- debian.all
|
|
||||||
- fedora.all
|
|
||||||
- centos.all
|
|
||||||
- portable
|
|
17
debian/changelog
vendored
17
debian/changelog
vendored
|
@ -1,17 +0,0 @@
|
||||||
jellyfin-web (10.8.0-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Forthcoming stable release
|
|
||||||
|
|
||||||
-- Jellyfin Packaging Team <packaging@jellyfin.org> Fri, 04 Dec 2020 21:58:23 -0500
|
|
||||||
|
|
||||||
jellyfin-web (10.7.0-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Forthcoming stable release
|
|
||||||
|
|
||||||
-- Jellyfin Packaging Team <packaging@jellyfin.org> Mon, 27 Jul 2020 19:13:31 -0400
|
|
||||||
|
|
||||||
jellyfin-web (10.6.0-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream version 10.6.0; release changelog at https://github.com/jellyfin/jellyfin-web/releases/tag/v10.6.0
|
|
||||||
|
|
||||||
-- Jellyfin Packaging Team <packaging@jellyfin.org> Mon, 16 Mar 2020 11:15:00 -0400
|
|
1
debian/compat
vendored
1
debian/compat
vendored
|
@ -1 +0,0 @@
|
||||||
8
|
|
1
debian/conffiles
vendored
1
debian/conffiles
vendored
|
@ -1 +0,0 @@
|
||||||
/usr/share/jellyfin/web/config.json
|
|
16
debian/control
vendored
16
debian/control
vendored
|
@ -1,16 +0,0 @@
|
||||||
Source: jellyfin-web
|
|
||||||
Section: misc
|
|
||||||
Priority: optional
|
|
||||||
Maintainer: Jellyfin Team <team@jellyfin.org>
|
|
||||||
Build-Depends: debhelper (>= 9),
|
|
||||||
npm | nodejs
|
|
||||||
Standards-Version: 3.9.4
|
|
||||||
Homepage: https://jellyfin.org/
|
|
||||||
Vcs-Git: https://github.org/jellyfin/jellyfin-web.git
|
|
||||||
Vcs-Browser: https://github.org/jellyfin/jellyfin-web
|
|
||||||
|
|
||||||
Package: jellyfin-web
|
|
||||||
Recommends: jellyfin-server
|
|
||||||
Architecture: all
|
|
||||||
Description: Jellyfin is the Free Software Media System.
|
|
||||||
This package provides the Jellyfin web client.
|
|
28
debian/copyright
vendored
28
debian/copyright
vendored
|
@ -1,28 +0,0 @@
|
||||||
Format: http://dep.debian.net/deps/dep5
|
|
||||||
Upstream-Name: jellyfin-web
|
|
||||||
Source: https://github.com/jellyfin/jellyfin-web
|
|
||||||
|
|
||||||
Files: *
|
|
||||||
Copyright: 2018-2020 Jellyfin Team
|
|
||||||
License: GPL-3.0
|
|
||||||
|
|
||||||
Files: debian/*
|
|
||||||
Copyright: 2020 Joshua Boniface <joshua@boniface.me>
|
|
||||||
License: GPL-3.0
|
|
||||||
|
|
||||||
License: GPL-3.0
|
|
||||||
This package is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
.
|
|
||||||
This package is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
.
|
|
||||||
On Debian systems, the complete text of the GNU General
|
|
||||||
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
|
6
debian/gbp.conf
vendored
6
debian/gbp.conf
vendored
|
@ -1,6 +0,0 @@
|
||||||
[DEFAULT]
|
|
||||||
pristine-tar = False
|
|
||||||
cleaner = fakeroot debian/rules clean
|
|
||||||
|
|
||||||
[import-orig]
|
|
||||||
filter = [ ".git*", ".hg*", ".vs*", ".vscode*" ]
|
|
1
debian/install
vendored
1
debian/install
vendored
|
@ -1 +0,0 @@
|
||||||
web usr/share/jellyfin/
|
|
1
debian/po/POTFILES.in
vendored
1
debian/po/POTFILES.in
vendored
|
@ -1 +0,0 @@
|
||||||
[type: gettext/rfc822deb] templates
|
|
57
debian/po/templates.pot
vendored
57
debian/po/templates.pot
vendored
|
@ -1,57 +0,0 @@
|
||||||
# SOME DESCRIPTIVE TITLE.
|
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
||||||
#
|
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: jellyfin-server\n"
|
|
||||||
"Report-Msgid-Bugs-To: jellyfin-server@packages.debian.org\n"
|
|
||||||
"POT-Creation-Date: 2015-06-12 20:51-0600\n"
|
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
||||||
"Language: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=CHARSET\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
|
|
||||||
#. Type: note
|
|
||||||
#. Description
|
|
||||||
#: ../templates:1001
|
|
||||||
msgid "Jellyfin permission info:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. Type: note
|
|
||||||
#. Description
|
|
||||||
#: ../templates:1001
|
|
||||||
msgid ""
|
|
||||||
"Jellyfin by default runs under a user named \"jellyfin\". Please ensure that the "
|
|
||||||
"user jellyfin has read and write access to any folders you wish to add to your "
|
|
||||||
"library. Otherwise please run jellyfin under a different user."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. Type: string
|
|
||||||
#. Description
|
|
||||||
#: ../templates:2001
|
|
||||||
msgid "Username to run Jellyfin as:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. Type: string
|
|
||||||
#. Description
|
|
||||||
#: ../templates:2001
|
|
||||||
msgid "The user that jellyfin will run as."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. Type: note
|
|
||||||
#. Description
|
|
||||||
#: ../templates:3001
|
|
||||||
msgid "Jellyfin still running"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. Type: note
|
|
||||||
#. Description
|
|
||||||
#: ../templates:3001
|
|
||||||
msgid "Jellyfin is currently running. Please close it and try again."
|
|
||||||
msgstr ""
|
|
21
debian/rules
vendored
21
debian/rules
vendored
|
@ -1,21 +0,0 @@
|
||||||
#! /usr/bin/make -f
|
|
||||||
export DH_VERBOSE=1
|
|
||||||
|
|
||||||
%:
|
|
||||||
dh $@
|
|
||||||
|
|
||||||
# disable "make check"
|
|
||||||
override_dh_auto_test:
|
|
||||||
|
|
||||||
# disable stripping debugging symbols
|
|
||||||
override_dh_clistrip:
|
|
||||||
|
|
||||||
override_dh_auto_build:
|
|
||||||
npm ci --no-audit --unsafe-perm
|
|
||||||
npm run build:production
|
|
||||||
mv $(CURDIR)/dist $(CURDIR)/web
|
|
||||||
|
|
||||||
override_dh_auto_clean:
|
|
||||||
test -d $(CURDIR)/dist && rm -rf '$(CURDIR)/dist' || true
|
|
||||||
test -d $(CURDIR)/web && rm -rf '$(CURDIR)/web' || true
|
|
||||||
test -d $(CURDIR)/node_modules && rm -rf '$(CURDIR)/node_modules' || true
|
|
1
debian/source/format
vendored
1
debian/source/format
vendored
|
@ -1 +0,0 @@
|
||||||
1.0
|
|
7
debian/source/options
vendored
7
debian/source/options
vendored
|
@ -1,7 +0,0 @@
|
||||||
tar-ignore='.git*'
|
|
||||||
tar-ignore='**/.git'
|
|
||||||
tar-ignore='**/.hg'
|
|
||||||
tar-ignore='**/.vs'
|
|
||||||
tar-ignore='**/.vscode'
|
|
||||||
tar-ignore='deployment'
|
|
||||||
tar-ignore='*.deb'
|
|
|
@ -1,28 +0,0 @@
|
||||||
FROM quay.io/centos/centos:stream8
|
|
||||||
|
|
||||||
# Docker build arguments
|
|
||||||
ARG SOURCE_DIR=/jellyfin
|
|
||||||
ARG ARTIFACT_DIR=/dist
|
|
||||||
|
|
||||||
# Docker run environment
|
|
||||||
ENV SOURCE_DIR=/jellyfin
|
|
||||||
ENV ARTIFACT_DIR=/dist
|
|
||||||
ENV IS_DOCKER=YES
|
|
||||||
|
|
||||||
# Prepare CentOS environment
|
|
||||||
RUN yum update -y \
|
|
||||||
&& yum install -y epel-release \
|
|
||||||
&& yum install -y rpmdevtools git autoconf automake glibc-devel gcc-c++ make \
|
|
||||||
&& yum install https://rpm.nodesource.com/pub_20.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y \
|
|
||||||
&& yum install nodejs -y --setopt=nodesource-nodejs.module_hotfixes=1 \
|
|
||||||
&& yum clean all \
|
|
||||||
&& rm -rf /var/cache/dnf
|
|
||||||
|
|
||||||
# Link to build script
|
|
||||||
RUN ln -sf ${SOURCE_DIR}/deployment/build.centos /build.sh
|
|
||||||
|
|
||||||
VOLUME ${SOURCE_DIR}
|
|
||||||
|
|
||||||
VOLUME ${ARTIFACT_DIR}
|
|
||||||
|
|
||||||
ENTRYPOINT ["/build.sh"]
|
|
|
@ -1,30 +0,0 @@
|
||||||
FROM debian:12
|
|
||||||
|
|
||||||
# Docker build arguments
|
|
||||||
ARG SOURCE_DIR=/jellyfin
|
|
||||||
ARG ARTIFACT_DIR=/dist
|
|
||||||
|
|
||||||
# Docker run environment
|
|
||||||
ENV SOURCE_DIR=/jellyfin
|
|
||||||
ENV ARTIFACT_DIR=/dist
|
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
|
||||||
ENV IS_DOCKER=YES
|
|
||||||
|
|
||||||
# Prepare Debian build environment
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y debhelper mmv git curl gnupg ca-certificates \
|
|
||||||
&& mkdir -p /etc/apt/keyrings \
|
|
||||||
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
|
|
||||||
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y nodejs \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
|
|
||||||
|
|
||||||
# Link to build script
|
|
||||||
RUN ln -sf ${SOURCE_DIR}/deployment/build.debian /build.sh
|
|
||||||
|
|
||||||
VOLUME ${SOURCE_DIR}
|
|
||||||
|
|
||||||
VOLUME ${ARTIFACT_DIR}
|
|
||||||
|
|
||||||
ENTRYPOINT ["/build.sh"]
|
|
|
@ -1,13 +0,0 @@
|
||||||
FROM node:20-alpine
|
|
||||||
|
|
||||||
ARG SOURCE_DIR=/src
|
|
||||||
ARG ARTIFACT_DIR=/jellyfin-web
|
|
||||||
|
|
||||||
RUN apk --no-cache add autoconf g++ make libpng-dev gifsicle alpine-sdk automake libtool make gcc musl-dev nasm python3
|
|
||||||
|
|
||||||
WORKDIR ${SOURCE_DIR}
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
RUN npm ci --no-audit --unsafe-perm \
|
|
||||||
&& npm run build:production \
|
|
||||||
&& mv dist ${ARTIFACT_DIR}
|
|
|
@ -1,26 +0,0 @@
|
||||||
FROM fedora:40
|
|
||||||
|
|
||||||
# Docker build arguments
|
|
||||||
ARG SOURCE_DIR=/jellyfin
|
|
||||||
ARG ARTIFACT_DIR=/dist
|
|
||||||
|
|
||||||
# Docker run environment
|
|
||||||
ENV SOURCE_DIR=/jellyfin
|
|
||||||
ENV ARTIFACT_DIR=/dist
|
|
||||||
ENV IS_DOCKER=YES
|
|
||||||
|
|
||||||
# Prepare Fedora environment
|
|
||||||
RUN dnf update -y \
|
|
||||||
&& dnf install https://rpm.nodesource.com/pub_20.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y \
|
|
||||||
&& dnf install -y @buildsys-build rpmdevtools git dnf-plugins-core nodejs autoconf automake glibc-devel make --setopt=nodesource-nodejs.module_hotfixes=1 \
|
|
||||||
&& dnf clean all \
|
|
||||||
&& rm -rf /var/cache/dnf
|
|
||||||
|
|
||||||
# Link to build script
|
|
||||||
RUN ln -sf ${SOURCE_DIR}/deployment/build.fedora /build.sh
|
|
||||||
|
|
||||||
VOLUME ${SOURCE_DIR}
|
|
||||||
|
|
||||||
VOLUME ${ARTIFACT_DIR}
|
|
||||||
|
|
||||||
ENTRYPOINT ["/build.sh"]
|
|
|
@ -1,29 +0,0 @@
|
||||||
FROM debian:12
|
|
||||||
|
|
||||||
# Docker build arguments
|
|
||||||
ARG SOURCE_DIR=/jellyfin
|
|
||||||
ARG ARTIFACT_DIR=/dist
|
|
||||||
|
|
||||||
# Docker run environment
|
|
||||||
ENV SOURCE_DIR=/jellyfin
|
|
||||||
ENV ARTIFACT_DIR=/dist
|
|
||||||
ENV IS_DOCKER=YES
|
|
||||||
|
|
||||||
# Prepare Debian build environment
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y mmv curl git gnupg ca-certificates \
|
|
||||||
&& mkdir -p /etc/apt/keyrings \
|
|
||||||
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
|
|
||||||
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y nodejs \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
|
|
||||||
|
|
||||||
# Link to build script
|
|
||||||
RUN ln -sf ${SOURCE_DIR}/deployment/build.portable /build.sh
|
|
||||||
|
|
||||||
VOLUME ${SOURCE_DIR}
|
|
||||||
|
|
||||||
VOLUME ${ARTIFACT_DIR}
|
|
||||||
|
|
||||||
ENTRYPOINT ["/build.sh"]
|
|
|
@ -1,41 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
# move to source directory
|
|
||||||
pushd ${SOURCE_DIR}
|
|
||||||
|
|
||||||
cp -a package-lock.json /tmp/package-lock.json
|
|
||||||
|
|
||||||
# modify changelog to unstable configuration if IS_UNSTABLE
|
|
||||||
if [[ ${IS_UNSTABLE} == 'yes' ]]; then
|
|
||||||
pushd fedora
|
|
||||||
|
|
||||||
PR_ID=$( git log --grep 'Merge pull request' --oneline --single-worktree --first-parent | head -1 | grep --color=none -Eo '#[0-9]+' | tr -d '#' )
|
|
||||||
|
|
||||||
sed -i "s/Version:.*/Version: ${BUILD_ID}/" jellyfin-web.spec
|
|
||||||
sed -i "/%changelog/q" jellyfin-web.spec
|
|
||||||
|
|
||||||
cat <<EOF >>jellyfin-web.spec
|
|
||||||
* $( LANG=C date '+%a %b %d %Y' ) Jellyfin Packaging Team <packaging@jellyfin.org>
|
|
||||||
- Jellyfin Web unstable build ${BUILD_ID} for merged PR #${PR_ID}
|
|
||||||
EOF
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
# build rpm
|
|
||||||
make -f fedora/Makefile srpm outdir=/root/rpmbuild/SRPMS
|
|
||||||
rpmbuild --rebuild -bb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm
|
|
||||||
|
|
||||||
# move the artifacts
|
|
||||||
mv /root/rpmbuild/RPMS/noarch/jellyfin-*.rpm /root/rpmbuild/SRPMS/jellyfin-*.src.rpm ${ARTIFACT_DIR}/
|
|
||||||
|
|
||||||
if [[ ${IS_DOCKER} == YES ]]; then
|
|
||||||
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f fedora/jellyfin*.tar.gz
|
|
||||||
cp -a /tmp/package-lock.json package-lock.json
|
|
||||||
|
|
||||||
popd
|
|
|
@ -1,39 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
# move to source directory
|
|
||||||
pushd ${SOURCE_DIR}
|
|
||||||
|
|
||||||
cp -a package-lock.json /tmp/package-lock.json
|
|
||||||
|
|
||||||
# modify changelog to unstable configuration if IS_UNSTABLE
|
|
||||||
if [[ ${IS_UNSTABLE} == 'yes' ]]; then
|
|
||||||
pushd debian
|
|
||||||
|
|
||||||
PR_ID=$( git log --grep 'Merge pull request' --oneline --single-worktree --first-parent | head -1 | grep --color=none -Eo '#[0-9]+' | tr -d '#' )
|
|
||||||
|
|
||||||
cat <<EOF >changelog
|
|
||||||
jellyfin-web (${BUILD_ID}-unstable) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Jellyfin Web unstable build ${BUILD_ID} for merged PR #${PR_ID}
|
|
||||||
|
|
||||||
-- Jellyfin Packaging Team <packaging@jellyfin.org> $( date --rfc-2822 )
|
|
||||||
EOF
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
# build deb
|
|
||||||
dpkg-buildpackage -us -uc --pre-clean --post-clean
|
|
||||||
|
|
||||||
mkdir -p ${ARTIFACT_DIR}
|
|
||||||
mv ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} ${ARTIFACT_DIR}
|
|
||||||
|
|
||||||
cp -a /tmp/package-lock.json package-lock.json
|
|
||||||
|
|
||||||
if [[ ${IS_DOCKER} == YES ]]; then
|
|
||||||
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
|
||||||
fi
|
|
||||||
|
|
||||||
popd
|
|
|
@ -1,41 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
# move to source directory
|
|
||||||
pushd ${SOURCE_DIR}
|
|
||||||
|
|
||||||
cp -a package-lock.json /tmp/package-lock.json
|
|
||||||
|
|
||||||
# modify changelog to unstable configuration if IS_UNSTABLE
|
|
||||||
if [[ ${IS_UNSTABLE} == 'yes' ]]; then
|
|
||||||
pushd fedora
|
|
||||||
|
|
||||||
PR_ID=$( git log --grep 'Merge pull request' --oneline --single-worktree --first-parent | head -1 | grep --color=none -Eo '#[0-9]+' | tr -d '#' )
|
|
||||||
|
|
||||||
sed -i "s/Version:.*/Version: ${BUILD_ID}/" jellyfin-web.spec
|
|
||||||
sed -i "/%changelog/q" jellyfin-web.spec
|
|
||||||
|
|
||||||
cat <<EOF >>jellyfin-web.spec
|
|
||||||
* $( LANG=C date '+%a %b %d %Y' ) Jellyfin Packaging Team <packaging@jellyfin.org>
|
|
||||||
- Jellyfin Web unstable build ${BUILD_ID} for merged PR #${PR_ID}
|
|
||||||
EOF
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
# build rpm
|
|
||||||
make -f fedora/Makefile srpm outdir=/root/rpmbuild/SRPMS
|
|
||||||
rpmbuild -rb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm
|
|
||||||
|
|
||||||
# move the artifacts
|
|
||||||
mv /root/rpmbuild/RPMS/noarch/jellyfin-*.rpm /root/rpmbuild/SRPMS/jellyfin-*.src.rpm ${ARTIFACT_DIR}
|
|
||||||
|
|
||||||
if [[ ${IS_DOCKER} == YES ]]; then
|
|
||||||
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f fedora/jellyfin*.tar.gz
|
|
||||||
cp -a /tmp/package-lock.json package-lock.json
|
|
||||||
|
|
||||||
popd
|
|
|
@ -1,31 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
# move to source directory
|
|
||||||
pushd ${SOURCE_DIR}
|
|
||||||
|
|
||||||
# get version
|
|
||||||
if [[ ${IS_UNSTABLE} == 'yes' ]]; then
|
|
||||||
version="${BUILD_ID}"
|
|
||||||
else
|
|
||||||
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# build archives
|
|
||||||
npm ci --no-audit --unsafe-perm
|
|
||||||
npm run build:production
|
|
||||||
mv dist jellyfin-web_${version}
|
|
||||||
tar -czf jellyfin-web_${version}_portable.tar.gz jellyfin-web_${version}
|
|
||||||
rm -rf dist
|
|
||||||
|
|
||||||
# move the artifacts
|
|
||||||
mkdir -p ${ARTIFACT_DIR}
|
|
||||||
mv jellyfin[-_]*.tar.gz ${ARTIFACT_DIR}
|
|
||||||
|
|
||||||
if [[ ${IS_DOCKER} == YES ]]; then
|
|
||||||
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
|
||||||
fi
|
|
||||||
|
|
||||||
popd
|
|
|
@ -1,48 +0,0 @@
|
||||||
DIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
|
||||||
# install git and npm
|
|
||||||
$(info $(shell set -x; if [ "$$(id -u)" = "0" ]; then echo "Installing git"; dnf -y install git npm; fi))
|
|
||||||
NAME := jellyfin-web
|
|
||||||
VERSION := $(shell set -x; sed -ne '/^Version:/s/.* *//p' $(DIR)/$(NAME).spec)
|
|
||||||
RELEASE := $(shell set -x; sed -ne '/^Release:/s/.* *\(.*\)%{.*}.*/\1/p' $(DIR)/$(NAME).spec)
|
|
||||||
SRPM := jellyfin-web-$(subst -,~,$(VERSION))-$(RELEASE)$(shell rpm --eval %dist).src.rpm
|
|
||||||
TARBALL :=$(NAME)-$(subst -,~,$(VERSION)).tar.gz
|
|
||||||
|
|
||||||
epel-7-x86_64_repos := https://rpm.nodesource.com/pub_20.x/nodistro/\$$basearch/
|
|
||||||
|
|
||||||
fed_ver := $(shell rpm -E %fedora)
|
|
||||||
# fallback when not running on Fedora
|
|
||||||
fed_ver ?= 36
|
|
||||||
TARGET ?= fedora-$(fed_ver)-x86_64
|
|
||||||
|
|
||||||
outdir ?= $(PWD)/$(DIR)/
|
|
||||||
|
|
||||||
srpm: $(DIR)/$(SRPM)
|
|
||||||
tarball: $(DIR)/$(TARBALL)
|
|
||||||
|
|
||||||
$(DIR)/$(TARBALL):
|
|
||||||
cd $(DIR)/; \
|
|
||||||
SOURCE_DIR=.. \
|
|
||||||
WORKDIR="$${PWD}"; \
|
|
||||||
version=$(VERSION); \
|
|
||||||
tar \
|
|
||||||
--transform "s,^\.,$(NAME)-$(subst -,~,$(VERSION))," \
|
|
||||||
--exclude='.git*' \
|
|
||||||
--exclude='**/.git' \
|
|
||||||
--exclude='**/.hg' \
|
|
||||||
--exclude=deployment \
|
|
||||||
--exclude='*.deb' \
|
|
||||||
--exclude='*.rpm' \
|
|
||||||
--exclude=$(notdir $@) \
|
|
||||||
-czf $(notdir $@) \
|
|
||||||
-C $${SOURCE_DIR} ./
|
|
||||||
|
|
||||||
$(DIR)/$(SRPM): $(DIR)/$(TARBALL) $(DIR)/jellyfin-web.spec
|
|
||||||
cd $(DIR)/; \
|
|
||||||
rpmbuild -bs $(NAME).spec \
|
|
||||||
--define "_sourcedir $$PWD/" \
|
|
||||||
--define "_srcrpmdir $(outdir)"
|
|
||||||
|
|
||||||
rpms: $(DIR)/$(SRPM)
|
|
||||||
mock $(addprefix --addrepo=, $($(TARGET)_repos)) \
|
|
||||||
--enable-network \
|
|
||||||
-r $(TARGET) $<
|
|
|
@ -1,58 +0,0 @@
|
||||||
%global debug_package %{nil}
|
|
||||||
|
|
||||||
Name: jellyfin-web
|
|
||||||
Version: 10.8.0
|
|
||||||
Release: 2%{?dist}
|
|
||||||
Summary: The Free Software Media System web client
|
|
||||||
License: GPLv2
|
|
||||||
URL: https://jellyfin.org
|
|
||||||
# Jellyfin Server tarball created by `make -f .copr/Makefile srpm`, real URL ends with `v%%{version}.tar.gz`
|
|
||||||
Source0: jellyfin-web-%{version}.tar.gz
|
|
||||||
|
|
||||||
BuildArch: noarch
|
|
||||||
%if 0%{?rhel} > 0 && 0%{?rhel} < 8
|
|
||||||
BuildRequires: nodejs
|
|
||||||
%else
|
|
||||||
BuildRequires: git
|
|
||||||
# Nodejs 20 is required and npm >= 10 should bring in NodeJS 20
|
|
||||||
# This requires the build environment to use the nodejs:20 module stream:
|
|
||||||
# dnf module {install|switch-to}:web nodejs:20
|
|
||||||
BuildRequires: npm >= 10
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
|
||||||
Jellyfin is a free software media system that puts you in control of managing and streaming your media.
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%autosetup -n jellyfin-web-%{version} -b 0
|
|
||||||
|
|
||||||
%if 0%{?rhel} > 0 && 0%{?rhel} < 8
|
|
||||||
# Required for CentOS build
|
|
||||||
chown root:root -R .
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
|
||||||
npm ci --no-audit --unsafe-perm
|
|
||||||
npm run build:production
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
|
||||||
%{__mkdir} -p %{buildroot}%{_libdir}/jellyfin/jellyfin-web
|
|
||||||
%{__cp} -r dist/* %{buildroot}%{_libdir}/jellyfin/jellyfin-web
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(644,root,root,755)
|
|
||||||
%{_libdir}/jellyfin/jellyfin-web
|
|
||||||
%license LICENSE
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Fri Dec 04 2020 Jellyfin Packaging Team <packaging@jellyfin.org>
|
|
||||||
- Forthcoming stable release
|
|
||||||
* Mon Jul 27 2020 Jellyfin Packaging Team <packaging@jellyfin.org>
|
|
||||||
- Forthcoming stable release
|
|
||||||
* Mon Mar 23 2020 Jellyfin Packaging Team <packaging@jellyfin.org>
|
|
||||||
- Forthcoming stable release
|
|
Loading…
Add table
Add a link
Reference in a new issue