user/jellyfin: new aport #1770
11 changed files with 348 additions and 0 deletions
38
user/jellyfin-web/APKBUILD
Normal file
38
user/jellyfin-web/APKBUILD
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Maintainer: Simon Zeni <simon@bl4ckb0ne.ca>
|
||||
pkgname=jellyfin-web
|
||||
pkgver=10.10.7
|
||||
pkgrel=0
|
||||
pkgdesc="Web Client for Jellyfin"
|
||||
url="https://jellyfin.org/"
|
||||
# armv7: oom
|
||||
arch="x86_64 armv7 aarch64"
|
||||
options="net" # net for npm
|
||||
license="GPL-2.0-only"
|
||||
install="$pkgname.post-install"
|
||||
depends="jellyfin"
|
||||
makedepends="npm"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/jellyfin/jellyfin-web/archive/refs/tags/v$pkgver.tar.gz"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
npm ci --no-audit
|
||||
}
|
||||
|
||||
build() {
|
||||
npm run build:production
|
||||
}
|
||||
|
||||
check() {
|
||||
npm test
|
||||
}
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir"/usr/share/webapps/jellyfin-web
|
||||
|
||||
cp -r "$builddir"/dist/* "$pkgdir"/usr/share/webapps/jellyfin-web
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
43836cdc15957889b4ec764f68893ff6131fa4ae1991ac0e5a4991817c491d870783b2e713883b423f30208abad1b77f1856ccaeb5008e6ba56a9bf305a1b5bd jellyfin-web-10.10.7.tar.gz
|
||||
"
|
||||
6
user/jellyfin-web/jellyfin-web.post-install
Normal file
6
user/jellyfin-web/jellyfin-web.post-install
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
printf " *\n * The default jellyfin configuration does not enable the web ui.\n"
|
||||
printf " * Remove the '--nowebclient' option from /etc/conf.d/jellyfin to enable it.\n *\n"
|
||||
|
||||
exit 0
|
||||
50
user/jellyfin/APKBUILD
Normal file
50
user/jellyfin/APKBUILD
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Maintainer: Simon Zeni <simon@bl4ckb0ne.ca>
|
||||
# Contributor: Fabricio Silva <hi@fabricio.dev>
|
||||
pkgname=jellyfin
|
||||
pkgver=10.10.7
|
||||
pkgrel=1
|
||||
pkgdesc="The Free Software Media System"
|
||||
install="$pkgname.pre-install"
|
||||
url="https://jellyfin.org/"
|
||||
arch="x86_64 armv7 aarch64"
|
||||
license="GPL-2.0-only"
|
||||
makedepends="dotnet8-sdk"
|
||||
depends="aspnetcore8-runtime jellyfin-ffmpeg skiasharp"
|
||||
subpackages="$pkgname-openrc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/jellyfin/jellyfin/archive/refs/tags/v$pkgver.tar.gz
|
||||
$pkgname.initd
|
||||
$pkgname.confd
|
||||
remove-prebuilt-library.patch
|
||||
"
|
||||
|
||||
build() {
|
||||
dotnet publish Jellyfin.Server \
|
||||
--configuration Release \
|
||||
--no-self-contained \
|
||||
--use-current-runtime \
|
||||
--output publish
|
||||
}
|
||||
|
||||
check() {
|
||||
dotnet test --no-restore
|
||||
}
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir"/usr/lib "$pkgdir"/usr/bin
|
||||
|
||||
cp -a publish "$pkgdir"/usr/lib/jellyfin
|
||||
ln -s ../lib/jellyfin/jellyfin "$pkgdir"/usr/bin/jellyfin
|
||||
ln -s ../libSkiaSharp.so "$pkgdir"/usr/lib/jellyfin/libSkiaSharp.so
|
||||
|
||||
install -Dm755 "$srcdir"/$pkgname.initd \
|
||||
"$pkgdir"/etc/init.d/$pkgname
|
||||
install -Dm644 "$srcdir"/$pkgname.confd \
|
||||
"$pkgdir"/etc/conf.d/$pkgname
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
6c48401f4acf509b69fb6b8916be54b1b697aa85308ac4a39345bef0ce61c78c4ad978650569ac0964eeb9389fdea249ffc279a37bcd49c0341d3825423f5a97 jellyfin-10.10.7.tar.gz
|
||||
bcdb882b837a08e4c1db363fbf2a075f0d6558a537c3f798b1473f9f1b5b887b6da1928558b0aede8bf56ab16469ac9e80dc95b0f874533ad744465a92b37696 jellyfin.initd
|
||||
594c26e5235ae2265f3f586f596cd6b57fa0e0cec83531b6fadba48181870167f04381266c6005f1f6cb5cd76d254100a08a871ecb8da28e5890f979816a7b8b jellyfin.confd
|
||||
50b9535d7b2dbebf7fbda1dc2d88941dad5530c8ab3e8e07c1203c328af426816036b5e6b4d6deb69fa344611bc18785cf8593d7d990a1cbfae0e14c9324b592 remove-prebuilt-library.patch
|
||||
"
|
||||
7
user/jellyfin/jellyfin.confd
Normal file
7
user/jellyfin/jellyfin.confd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
supervisor=supervise-daemon
|
||||
datadir="/var/lib/jellyfin"
|
||||
cachedir="/var/cache/jellyfin"
|
||||
logdir="/var/log/jellyfin"
|
||||
webdir="/usr/share/webapps/jellyfin-web"
|
||||
ffmpegpath="/usr/lib/jellyfin-ffmpeg/ffmpeg"
|
||||
opts="--nowebclient"
|
||||
20
user/jellyfin/jellyfin.initd
Normal file
20
user/jellyfin/jellyfin.initd
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
name=jellyfin
|
||||
description="The Free Software Media System"
|
||||
|
||||
command=/usr/bin/jellyfin
|
||||
command_user=jellyfin:jellyfin
|
||||
command_args="--webdir ${webdir:-/usr/share/webapps/jellyfin-web} --datadir ${datadir} --cachedir ${cachedir} --logdir ${logdir} --ffmpeg ${ffmpegpath:-/usr/lib/jellyfin-ffmpeg/ffmpeg} ${opts}"
|
||||
|
||||
depend() {
|
||||
use logger dns
|
||||
need net
|
||||
after firewall
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -d -o $command_user "$datadir"
|
||||
checkpath -d -o $command_user "$cachedir"
|
||||
checkpath -d -o $command_user "$logdir"
|
||||
}
|
||||
9
user/jellyfin/jellyfin.pre-install
Normal file
9
user/jellyfin/jellyfin.pre-install
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
user=jellyfin
|
||||
group=jellyfin
|
||||
|
||||
addgroup -S $group 2>/dev/null
|
||||
adduser -S -D -h /var/lib/$user -s /sbin/nologin -G $group -g $user $user 2>/dev/null
|
||||
|
||||
exit 0
|
||||
32
user/jellyfin/remove-prebuilt-library.patch
Normal file
32
user/jellyfin/remove-prebuilt-library.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
diff -urp jellyfin-10.10.3.bak/Directory.Packages.props jellyfin-10.10.3/Directory.Packages.props
|
||||
--- jellyfin-10.10.3.bak/Directory.Packages.props 2024-11-19 03:38:42.000000000 +0000
|
||||
+++ jellyfin-10.10.3/Directory.Packages.props 2024-12-04 02:20:12.294901276 +0000
|
||||
@@ -17,7 +17,6 @@
|
||||
<PackageVersion Include="DiscUtils.Udf" Version="0.16.13" />
|
||||
<PackageVersion Include="DotNet.Glob" Version="3.1.3" />
|
||||
<PackageVersion Include="FsCheck.Xunit" Version="2.16.6" />
|
||||
- <PackageVersion Include="HarfBuzzSharp.NativeAssets.Linux" Version="7.3.0.3" />
|
||||
<PackageVersion Include="ICU4N.Transliterator" Version="60.1.0-alpha.356" />
|
||||
<PackageVersion Include="IDisposableAnalyzers" Version="4.0.8" />
|
||||
<PackageVersion Include="Jellyfin.XmlTv" Version="10.8.0" />
|
||||
@@ -68,7 +67,6 @@
|
||||
<PackageVersion Include="SharpFuzz" Version="2.1.1" />
|
||||
<PackageVersion Include="SkiaSharp" Version="2.88.9" />
|
||||
<PackageVersion Include="SkiaSharp.HarfBuzz" Version="2.88.9" />
|
||||
- <PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="2.88.9" />
|
||||
<PackageVersion Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" />
|
||||
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
|
||||
<PackageVersion Include="Svg.Skia" Version="2.0.0.1" />
|
||||
diff -urp jellyfin-10.10.3.bak/src/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj jellyfin-10.10.3/src/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj
|
||||
--- jellyfin-10.10.3.bak/src/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj 2024-11-19 03:38:42.000000000 +0000
|
||||
+++ jellyfin-10.10.3/src/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj 2024-12-04 02:21:05.773987361 +0000
|
||||
@@ -20,9 +20,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BlurHashSharp" />
|
||||
<PackageReference Include="BlurHashSharp.SkiaSharp" />
|
||||
- <PackageReference Include="HarfBuzzSharp.NativeAssets.Linux" />
|
||||
<PackageReference Include="SkiaSharp" />
|
||||
- <PackageReference Include="SkiaSharp.NativeAssets.Linux" />
|
||||
<PackageReference Include="SkiaSharp.HarfBuzz" />
|
||||
<PackageReference Include="Svg.Skia" />
|
||||
</ItemGroup>
|
||||
25
user/skiasharp/0001-fix-cflags-for-system-freetype2.patch
Normal file
25
user/skiasharp/0001-fix-cflags-for-system-freetype2.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
From 5f2682ed16394ba3e10ab35150c15e265ab0a0db Mon Sep 17 00:00:00 2001
|
||||
From: Naomi Rennie-Waldock <naomi.renniewaldock@gmail.com>
|
||||
Date: Wed, 4 Dec 2024 02:01:11 +0000
|
||||
Subject: [PATCH 1/2] fix cflags for system freetype2
|
||||
|
||||
---
|
||||
third_party/freetype2/BUILD.gn | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/third_party/freetype2/BUILD.gn b/third_party/freetype2/BUILD.gn
|
||||
index d3092c672f..1bf7d9fc62 100644
|
||||
--- a/third_party/freetype2/BUILD.gn
|
||||
+++ b/third_party/freetype2/BUILD.gn
|
||||
@@ -14,7 +14,7 @@ import("../third_party.gni")
|
||||
|
||||
if (skia_use_system_freetype2) {
|
||||
system("freetype2") {
|
||||
- cflags = [ "-I=/usr/include/freetype2" ]
|
||||
+ cflags = [ "-I/usr/include/freetype2" ]
|
||||
libs = [ "freetype" ]
|
||||
}
|
||||
} else {
|
||||
--
|
||||
2.45.2
|
||||
|
||||
38
user/skiasharp/0002-add-missing-includes.patch
Normal file
38
user/skiasharp/0002-add-missing-includes.patch
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
From 4367484b44f349f3f9009a001167c08a61f6934b Mon Sep 17 00:00:00 2001
|
||||
From: Naomi Rennie-Waldock <naomi.renniewaldock@gmail.com>
|
||||
Date: Wed, 4 Dec 2024 02:02:29 +0000
|
||||
Subject: [PATCH 2/2] add missing includes
|
||||
|
||||
---
|
||||
src/utils/SkParseColor.cpp | 1 +
|
||||
third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp | 2 ++
|
||||
2 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/utils/SkParseColor.cpp b/src/utils/SkParseColor.cpp
|
||||
index 7260365b2c..ed118fb5e9 100644
|
||||
--- a/src/utils/SkParseColor.cpp
|
||||
+++ b/src/utils/SkParseColor.cpp
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
|
||||
+#include <iterator>
|
||||
#include "include/utils/SkParse.h"
|
||||
|
||||
static constexpr const char* gColorNames[] = {
|
||||
diff --git a/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp b/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp
|
||||
index fb606984bd..4bc9d99420 100644
|
||||
--- a/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp
|
||||
+++ b/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp
|
||||
@@ -5,6 +5,8 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
+#include <cstdio>
|
||||
+
|
||||
// We use our own functions pointers
|
||||
#define VMA_STATIC_VULKAN_FUNCTIONS 0
|
||||
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 0
|
||||
--
|
||||
2.45.2
|
||||
|
||||
104
user/skiasharp/APKBUILD
Normal file
104
user/skiasharp/APKBUILD
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
# Contributor: Naomi Rennie-Waldock <naomi.renniewaldock@gmail.com>
|
||||
# Maintainer: Naomi Rennie-Waldock <naomi.renniewaldock@gmail.com>
|
||||
pkgname=skiasharp
|
||||
pkgver=2.88.9
|
||||
pkgrel=0
|
||||
pkgdesc="2D graphics API for .NET - native library"
|
||||
url="https://github.com/mono/SkiaSharp"
|
||||
arch="x86_64 armv7 aarch64"
|
||||
license="BSD-3-Clause"
|
||||
_llvmver=21
|
||||
_skiaver=2.88.3
|
||||
makedepends="
|
||||
cmd:awk
|
||||
cmd:envsubst
|
||||
clang$_llvmver
|
||||
llvm$_llvmver
|
||||
gn
|
||||
ninja
|
||||
freetype-dev
|
||||
fontconfig-dev
|
||||
libwebp-dev
|
||||
harfbuzz-dev
|
||||
cmake
|
||||
"
|
||||
subpackages="$pkgname-dbg"
|
||||
# SkiaSharp currently doesn't work with jpeg-turbo 3.x which we've got packaged
|
||||
# https://github.com/mono/SkiaSharp/issues/2645
|
||||
# https://github.com/libjpeg-turbo/libjpeg-turbo/issues/741
|
||||
_jpegturbover=2.1.5.1
|
||||
source="https://github.com/mono/SkiaSharp/archive/v$pkgver/SkiaSharp-$pkgver.tar.gz
|
||||
https://github.com/mono/skia/archive/v$_skiaver/skia-$_skiaver.tar.gz
|
||||
|
||||
args.gn.in
|
||||
|
||||
0001-fix-cflags-for-system-freetype2.patch
|
||||
0002-add-missing-includes.patch
|
||||
|
||||
https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$_jpegturbover/libjpeg-turbo-$_jpegturbover.tar.gz
|
||||
"
|
||||
_skiasharpdir="$srcdir/SkiaSharp-$pkgver"
|
||||
_skiadir="$srcdir/skia-$_skiaver"
|
||||
_jpegturbodir="$srcdir/libjpeg-turbo-$_jpegturbover"
|
||||
builddir="$_skiadir"
|
||||
options="!check"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
install -d "$builddir"/third_party/externals
|
||||
rm -f "$builddir"/third_party/externals/libjpeg-turbo
|
||||
ln -s "$_jpegturbodir" "$builddir"/third_party/externals/libjpeg-turbo
|
||||
ln -sf "$_jpegturbodir"/jpeg_nbits_table.h "$_jpegturbodir"/jpeg_nbits_table.c
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
export PATH="$PATH:/usr/lib/llvm$_llvmver/bin"
|
||||
# Generate config for jpeg-turbo
|
||||
# Note: jpeg-turbo is linked statically as part of SkiaSharp's build process
|
||||
# We just run cmake first to generate jconfig.h
|
||||
cd "$_jpegturbodir"
|
||||
cmake3.5 . \
|
||||
-DCMAKE_BUILD_TYPE= \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DWITH_JPEG8=1
|
||||
|
||||
# Generate build config for SkiaSharp
|
||||
cd "$builddir"
|
||||
local soname=$(awk '$1 == "libSkiaSharp" && $2 == "soname" { print $3 }' "$_skiasharpdir"/VERSIONS.txt)
|
||||
local map="$_skiasharpdir"/native/linux/libSkiaSharp/libSkiaSharp.map
|
||||
local _skia_arch=$CTARGET_ARCH
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
aarch64) _skia_arch=arm64 ;;
|
||||
armv7) _skia_arch=arm ;;
|
||||
x86_64) _skia_arch=x64 ;;
|
||||
esac
|
||||
|
||||
export soname map _skia_arch _llvmver
|
||||
|
||||
[ -d _build ] || mkdir _build
|
||||
envsubst < "$srcdir"/args.gn.in > _build/args.gn
|
||||
|
||||
gn gen _build
|
||||
ninja -j"${JOBS:-1}" -C _build SkiaSharp
|
||||
}
|
||||
|
||||
package() {
|
||||
local soname=$(awk '$1 == "libSkiaSharp" && $2 == "soname" { print $3 }' "$_skiasharpdir"/VERSIONS.txt)
|
||||
|
||||
install -Dm644 _build/libSkiaSharp.so.$soname -t "$pkgdir"/usr/lib/
|
||||
ln -s libSkiaSharp.so.$soname "$pkgdir"/usr/lib/libSkiaSharp.so.${soname%%.*}
|
||||
ln -s libSkiaSharp.so.$soname "$pkgdir"/usr/lib/libSkiaSharp.so
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
c13fb2f2cb8e231f5130e97450e242b910ea098419334303ed0b3391ff264549f9283343be8f5e1a6e59fa7ffe9d9aeb1c2d5607af0fb1fc03af0645b685dff2 SkiaSharp-2.88.9.tar.gz
|
||||
43b19f6ddefe30ddf37034c73cd23feea28cb9e4a5830f8c526771afa051bdb2a96934f70dc035ca85891992b67b47d1becc6f4bf8768175db8452e144dfd9f1 skia-2.88.3.tar.gz
|
||||
c1d8eace5078a25a8be5aa92337e1211055fb4d6a1da6f019e8f53871051b56af5cd18f19e0d67a34895402bbd575d233c5b5ad752e3ea5cdc85bfd63a392910 args.gn.in
|
||||
0c4caa5aff089d314540959f068ca06c5580465be7a4a4abb3db9e1756a8043e14cbd4f8be677cfe4bd837b32115c8fefb2c79cf7bd52dd06fa1cb50e2406756 0001-fix-cflags-for-system-freetype2.patch
|
||||
7eac411d6f235a450dcccf7d451ecc0d9516761b3cf37d3b0438fa2648b4ce7b0912de16d27221dc1df82fe62efb9287084fce433f1aeae48732da454402dbd7 0002-add-missing-includes.patch
|
||||
86a7248d064043b26b09755633ef4872a2a6133c9e677a9fe4be6645b2e0fde102cf01e09119967b3b6b85f4cb93f3f7c49ec4973944d5eff99b5b90ce8b0be6 libjpeg-turbo-2.1.5.1.tar.gz
|
||||
"
|
||||
19
user/skiasharp/args.gn.in
Normal file
19
user/skiasharp/args.gn.in
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
is_official_build=true
|
||||
target_os="linux"
|
||||
target_cpu="$_skia_arch"
|
||||
skia_enable_gpu=true
|
||||
skia_use_icu=false
|
||||
skia_use_piex=true
|
||||
skia_use_sfntly=false
|
||||
skia_enable_skottie=true
|
||||
skia_enable_tools=false
|
||||
skia_use_vulkan=true
|
||||
skia_use_system_libjpeg_turbo=false
|
||||
# disabled as it's not packaged
|
||||
skia_use_dng_sdk=false
|
||||
extra_cflags=[ "-DSKIA_C_DLL" ]
|
||||
extra_ldflags=[ "-Wl,--version-script=$map" ]
|
||||
linux_soname_version="$soname"
|
||||
cc="clang"
|
||||
cxx="clang++"
|
||||
ar="llvm-ar"
|
||||
Loading…
Add table
Add a link
Reference in a new issue