aur/jellyfin/PKGBUILD

82 lines
3.4 KiB
Bash
Raw Normal View History

2021-11-15 09:42:49 +01:00
# Maintainer: Luca Weiss <luca (at) z3ntu (dot) xyz>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Daniel Seymour <dannyseeless@gmail.com>
2024-11-04 01:00:57 +01:00
_pkgver=10.10.1
2024-05-20 19:49:27 +02:00
_dotnet_ver=8.0
2021-11-15 09:42:49 +01:00
pkgbase=jellyfin
pkgname=(jellyfin jellyfin-web jellyfin-server)
2024-11-04 01:00:57 +01:00
pkgver=10.10.1
2022-08-15 00:11:36 +02:00
pkgrel=1
2021-11-15 09:42:49 +01:00
pkgdesc='The Free Software Media System'
2022-06-24 11:41:43 +02:00
arch=('x86_64')
2021-11-15 09:42:49 +01:00
url='https://github.com/jellyfin/jellyfin'
license=('GPL2')
2023-11-19 19:39:46 +01:00
makedepends=("dotnet-sdk-$_dotnet_ver" 'nodejs' 'npm' 'git')
2021-11-15 09:42:49 +01:00
source=("jellyfin-$_pkgver.tar.gz::https://github.com/jellyfin/jellyfin/archive/v$_pkgver.tar.gz"
"jellyfin-web-$_pkgver.tar.gz::https://github.com/jellyfin/jellyfin-web/archive/v$_pkgver.tar.gz"
'jellyfin.conf'
'jellyfin.service'
'jellyfin.sysusers'
'jellyfin.tmpfiles')
2024-11-04 01:00:57 +01:00
sha512sums=('48772ee5f769afe4fd1831344bd95d13728d9a54ddd3df939efb656f5c0e7be6557d2fbd1ca4ecd6bdc727ab1322e63f966cb73cd50ac8c02b43478f2413bef3'
'8f9bbe4ea4d9c872825057698b4613476ee6ada81a03db8f51a6343e5e37770cab606297213b76d2326d7c1e3e3a84db4e2a3bcfbe3aa7b08b5f8fd53f257f50'
2021-11-15 09:42:49 +01:00
'2aa97a1a7a8a447171b59be3e93183e09cbbc32c816843cc47c6777b9aec48bd9c1d9d354f166e0b000ad8d2e94e6e4b0559aa52e5c159abbc103ed2c5afa3f0'
2022-06-24 11:41:43 +02:00
'ce9c5f3f0f3353894825e747f4f95a83fdf10a36c4366c1c6768c737187bc1537dd33bfe0c131a65849e3916ed5177f5c7011c836da01f401588140b6f643908'
2021-11-15 09:42:49 +01:00
'6fc2638e6ec4b1ee0240e17815c91107b694e5fde72c1bc7956c83067bbeacb632de899b86837e47a0ec04288131b15c20746373b45e0669c8976069a55d627a'
'45a62b62d97b9a83289d4dfde684163b1bcf340c1921fb958e5a701812c61b392901841940c67e5fa5148783277d5b4dc65ba01d3a22e8f855ea62154ad9be33')
build(){
# Build jellyfin-web
cd jellyfin-web-$_pkgver
2022-06-24 11:41:43 +02:00
npm ci --no-audit
2021-11-15 09:42:49 +01:00
2024-05-20 19:57:54 +02:00
npm run build:production
2021-11-15 09:42:49 +01:00
# Build jellyfin-server
cd ../jellyfin-$_pkgver
# Disable dotnet telemetry
export DOTNET_CLI_TELEMETRY_OPTOUT=1
dotnet build --configuration Release Jellyfin.Server
# Ideally, this would be run in package() with the --output variable pointing
# to "$pkgdir"/usr/lib/jellyfin, but this step fails in fakeroot.
# The makepkg output looks like
# Restore completed in 56.84 ms for /aur/jellyfin-git/src/jellyfin/Jellyfin.Server/Jellyfin.Server.csproj.
# ==> ERROR: A failure occurred in package().
# without indicating any sort of failure.
2022-06-24 11:41:43 +02:00
dotnet publish --runtime linux-x64 --configuration Release Jellyfin.Server --output "$PWD"/publish
2021-11-15 09:42:49 +01:00
# Clean up the runtimes folder (keep linux-*)
rm -rfv publish/runtimes/{alpine-*,osx*,tizen-*,win*}
}
package_jellyfin() {
depends=("jellyfin-web=$pkgver" "jellyfin-server=$pkgver")
}
package_jellyfin-server() {
pkgdesc="Jellyfin server component"
2022-06-24 11:41:43 +02:00
optdepends=('jellyfin-ffmpeg5: Patched FFmpeg providing hardware acceleration and tonemapping support')
depends=('ffmpeg')
2021-11-15 09:42:49 +01:00
backup=('etc/conf.d/jellyfin')
mkdir -p "$pkgdir"/usr/lib
cp -dr --no-preserve='ownership' jellyfin-$_pkgver/publish "$pkgdir"/usr/lib/jellyfin
install -Dm 644 jellyfin.service -t "$pkgdir"/usr/lib/systemd/system/
install -Dm 644 jellyfin.sysusers "$pkgdir"/usr/lib/sysusers.d/jellyfin.conf
install -Dm 644 jellyfin.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/jellyfin.conf
install -Dm 644 jellyfin.conf "$pkgdir"/etc/conf.d/jellyfin
}
package_jellyfin-web() {
pkgdesc="Jellyfin web client"
mkdir -p "$pkgdir"/usr/lib/jellyfin
cp -r jellyfin-web-$_pkgver/dist "$pkgdir"/usr/lib/jellyfin/jellyfin-web
}
# vim: ts=2 sw=2 et: