arch-pkgs/jellyfin-server/PKGBUILD
George Rawlinson da2050e65a
upgpkg: jellyfin-server
* Modify systemd service.
* Add service override for environment variables.
* Add configuration files to backup array.
* Add logging configuration.
* Add optional configuration to documentation directory.
2021-09-24 00:03:39 +00:00

82 lines
3.2 KiB
Bash

# Maintainer:
pkgname=jellyfin-server
_pkgname=jellyfin
pkgver=10.7.7
pkgrel=1
pkgdesc='Jellyfin server backend'
arch=('x86_64')
url='https://jellyfin.org'
_url="https://github.com/jellyfin/jellyfin"
license=('GPL2' 'GPL3')
depends=('dotnet-runtime' 'aspnet-runtime' 'ffmpeg' 'sqlite' 'fontconfig')
makedepends=('dotnet-sdk')
optdepends=('jellyfin-web: to run web-app on the same machine')
backup=(
"etc/systemd/system/$_pkgname.service.d/override.conf"
"etc/$_pkgname/logging.json"
)
source=(
"$pkgname-$pkgver.tar.gz::$_url/archive/v$pkgver.tar.gz"
'systemd.service'
'override.conf'
'sysusers.conf'
'tmpfiles.conf'
)
sha512sums=('46da01564c917f65316507c298ab9c30abfd48b351ff6d8ab33429c1ba4800b986267d89431c4c8e3c0274dcd24c6864576b1d7a81a53b61c041da4ba2342d30'
'c3d78c4224ce6472d1ff87db9844ea932e56a1162845ffe18149b9be29ea9e2e3884a1cf231f1666738cd5722c168c8e082c6dca2a13823e7540ae786250cf63'
'2336e67e7e62df4ea784bd9ea44ea9315f6f458bb173fb897cfd0f13389371440b710c26d38178d7680d2a85816c6280ca3382cd84f064f3491ce0b6057fe56f'
'9f62481faa5f6a2fad75b0a5bb727c74f46ada991aff938db225dee0232a2c948ba3e22f56b8fdaf960901b37d8cd6c292665dac1c954c6bc4b5e104da45ef6f'
'22e85d145395a55e69253cafbf61151fd048512dbd03cd12095d6ef575dfc000d275a2b2b9b744f06cd369405faffeaa31a130bfd1c0f82f2334e38bab5bfbab')
b2sums=('589f9f811dc1f0b5cc7ade6aae34386a846856ffe0bc62fe18ebb0c0a234b00ff87e6f7e1007bce0fac0772350fca219e584d03f95fc777be4f6eaf78b7f55df'
'a6cb543802654fe416ae9189ca237228e970332a032f75aa84f12180dce0074b40cc0e95fbfa648db4154e31e711f7888f0fe0f9b9c34a4528c46e47fd9200fd'
'5f0838f35bb98ae992f18fd5b44b0a82189bd6ff00dd351cc7058d9c6f61f6088bf84c641b9b2a48cd519d3263b5b1fa03f3bcdb3a634155426c28aaf23335d1'
'f73c72e1d66480c410dbe71be1af91a2bd76206dfed76e64b8264ee3537f6eb477bcba905ce69a0ec8b273e33c2e46439b9b32ce21543a48d98d80434a46a781'
'76d92a78a6600885841a19e8629ccc39aab485416b51541c351f04b4c1350f898257e47db77121e0364ee3a1e1924a73aa82ce8dcec8d4ddee6947ac1e0395ea')
prepare() {
cd "$_pkgname-$pkgver"
# create directory for build output
mkdir -p publish
}
build(){
cd "$_pkgname-$pkgver"
# Disable dotnet telemetry
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
export DOTNET_NOLOGO=1
dotnet publish Jellyfin.Server \
--configuration Release \
--output=publish \
--self-contained \
--runtime linux-x64 \
"-p:DebugSymbols=false;DebugType=none"
}
package() {
# systemd integration
install -vDm644 systemd.service "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
install -vDm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/$_pkgname.conf"
install -vDm644 tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/$_pkgname.conf"
install -vDm644 override.conf -t "$pkgdir/etc/systemd/system/$_pkgname.service.d"
cd "$_pkgname-$pkgver"
install -vd "$pkgdir/usr/lib"
cp -dr --no-preserve='ownership' publish "$pkgdir/usr/lib/$_pkgname"
# logging configuration
install -vDm644 -t "$pkgdir/etc/$_pkgname" \
Jellyfin.Server/Resources/Configuration/logging.json
# additional configuration
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" \
fedora/jellyfin-firewalld.xml \
fedora/jellyfin.sudoers \
fedora/restart.sh
}
# vim: ts=2 sw=2 et: