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.
This commit is contained in:
George Rawlinson 2021-09-23 22:12:38 +00:00
parent 6f4145d38c
commit da2050e65a
Signed by: grawlinson
GPG key ID: E0959FEA8B550539
3 changed files with 46 additions and 25 deletions

View file

@ -12,19 +12,32 @@ license=('GPL2' 'GPL3')
depends=('dotnet-runtime' 'aspnet-runtime' 'ffmpeg' 'sqlite' 'fontconfig') depends=('dotnet-runtime' 'aspnet-runtime' 'ffmpeg' 'sqlite' 'fontconfig')
makedepends=('dotnet-sdk') makedepends=('dotnet-sdk')
optdepends=('jellyfin-web: to run web-app on the same machine') 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=( source=(
"$pkgname-$pkgver.tar.gz::$_url/archive/v$pkgver.tar.gz" "$pkgname-$pkgver.tar.gz::$_url/archive/v$pkgver.tar.gz"
'systemd.service' 'systemd.service'
'override.conf'
'sysusers.conf' 'sysusers.conf'
'tmpfiles.conf' 'tmpfiles.conf'
) )
sha512sums=('46da01564c917f65316507c298ab9c30abfd48b351ff6d8ab33429c1ba4800b986267d89431c4c8e3c0274dcd24c6864576b1d7a81a53b61c041da4ba2342d30'
'c3d78c4224ce6472d1ff87db9844ea932e56a1162845ffe18149b9be29ea9e2e3884a1cf231f1666738cd5722c168c8e082c6dca2a13823e7540ae786250cf63'
'2336e67e7e62df4ea784bd9ea44ea9315f6f458bb173fb897cfd0f13389371440b710c26d38178d7680d2a85816c6280ca3382cd84f064f3491ce0b6057fe56f'
'9f62481faa5f6a2fad75b0a5bb727c74f46ada991aff938db225dee0232a2c948ba3e22f56b8fdaf960901b37d8cd6c292665dac1c954c6bc4b5e104da45ef6f'
'22e85d145395a55e69253cafbf61151fd048512dbd03cd12095d6ef575dfc000d275a2b2b9b744f06cd369405faffeaa31a130bfd1c0f82f2334e38bab5bfbab')
b2sums=('589f9f811dc1f0b5cc7ade6aae34386a846856ffe0bc62fe18ebb0c0a234b00ff87e6f7e1007bce0fac0772350fca219e584d03f95fc777be4f6eaf78b7f55df' b2sums=('589f9f811dc1f0b5cc7ade6aae34386a846856ffe0bc62fe18ebb0c0a234b00ff87e6f7e1007bce0fac0772350fca219e584d03f95fc777be4f6eaf78b7f55df'
'a85349afe83be5b0c563fc2d1712825df858b859df450e64450b5ac8b62792908e6127403008b3d13bf1b90bd57647a9179900acaa1f9d87a59f75f9cf02630b' 'a6cb543802654fe416ae9189ca237228e970332a032f75aa84f12180dce0074b40cc0e95fbfa648db4154e31e711f7888f0fe0f9b9c34a4528c46e47fd9200fd'
'5f0838f35bb98ae992f18fd5b44b0a82189bd6ff00dd351cc7058d9c6f61f6088bf84c641b9b2a48cd519d3263b5b1fa03f3bcdb3a634155426c28aaf23335d1'
'f73c72e1d66480c410dbe71be1af91a2bd76206dfed76e64b8264ee3537f6eb477bcba905ce69a0ec8b273e33c2e46439b9b32ce21543a48d98d80434a46a781' 'f73c72e1d66480c410dbe71be1af91a2bd76206dfed76e64b8264ee3537f6eb477bcba905ce69a0ec8b273e33c2e46439b9b32ce21543a48d98d80434a46a781'
'76d92a78a6600885841a19e8629ccc39aab485416b51541c351f04b4c1350f898257e47db77121e0364ee3a1e1924a73aa82ce8dcec8d4ddee6947ac1e0395ea') '76d92a78a6600885841a19e8629ccc39aab485416b51541c351f04b4c1350f898257e47db77121e0364ee3a1e1924a73aa82ce8dcec8d4ddee6947ac1e0395ea')
prepare() { prepare() {
cd "$_pkgname-$pkgver" cd "$_pkgname-$pkgver"
# create directory for build output
mkdir -p publish mkdir -p publish
} }
@ -49,10 +62,21 @@ package() {
install -vDm644 systemd.service "$pkgdir/usr/lib/systemd/system/$_pkgname.service" install -vDm644 systemd.service "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
install -vDm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/$_pkgname.conf" install -vDm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/$_pkgname.conf"
install -vDm644 tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.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" cd "$_pkgname-$pkgver"
install -vd "$pkgdir/usr/lib" install -vd "$pkgdir/usr/lib"
cp -dr --no-preserve='ownership' publish "$pkgdir/usr/lib/$_pkgname" 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: # vim: ts=2 sw=2 et:

View file

@ -0,0 +1,21 @@
[Service]
# [OPTIONAL] Web client path
#Environment="JELLYFIN_WEB_OPT=--webdir=/usr/share/jellyfin-web"
# [OPTIONAL] In-App service control
#Environment="JELLYFIN_RESTART_OPT=--restartpath=/usr/lib/jellyfin/restart.sh"
# [OPTIONAL] ffmpeg binary paths, overriding the UI-configured values
#Environment="JELLYFIN_FFMPEG_OPT=--ffmpeg=/usr/bin/ffmpeg"
# [OPTIONAL] run Jellyfin as a headless service
#Environment="JELLYFIN_SERVICE_OPT=--service"
# [OPTIONAL] run Jellyfin without the web app
#Environment="JELLYFIN_NOWEBAPP_OPT=--noautorunwebapp"
# [OPTIONAL] run Jellyfin with ASP.NET Server Garbage Collection (uses more RAM and less CPU than Workstation GC)
# 0 = Workstation
# 1 = Server
#Environment="COMPlus_gcServer=1"

View file

@ -10,36 +10,12 @@ Restart=on-failure
User=jellyfin User=jellyfin
Group=jellyfin Group=jellyfin
# Environment variables
# To override these variables, use a drop-in systemd file.
# See `man 5 systemd.unit` for details.
# Program directories # Program directories
Environment="JELLYFIN_DATA_DIR=/var/lib/jellyfin" Environment="JELLYFIN_DATA_DIR=/var/lib/jellyfin"
Environment="JELLYFIN_CONFIG_DIR=/etc/jellyfin" Environment="JELLYFIN_CONFIG_DIR=/etc/jellyfin"
Environment="JELLYFIN_LOG_DIR=/var/log/jellyfin" Environment="JELLYFIN_LOG_DIR=/var/log/jellyfin"
Environment="JELLYFIN_CACHE_DIR=/var/cache/jellyfin" Environment="JELLYFIN_CACHE_DIR=/var/cache/jellyfin"
# [OPTIONAL] Web client path
#Environment="JELLYFIN_WEB_OPT=--webdir=/usr/share/jellyfin-web"
# [OPTIONAL] In-App service control
#Environment="JELLYFIN_RESTART_OPT=--restartpath=/usr/lib/jellyfin/restart.sh"
# [OPTIONAL] ffmpeg binary paths, overriding the UI-configured values
#Environment="JELLYFIN_FFMPEG_OPT=--ffmpeg=/usr/bin/ffmpeg"
# [OPTIONAL] run Jellyfin as a headless service
#Environment="JELLYFIN_SERVICE_OPT=--service"
# [OPTIONAL] run Jellyfin without the web app
#Environment="JELLYFIN_NOWEBAPP_OPT=--noautorunwebapp"
# [OPTIONAL] run Jellyfin with ASP.NET Server Garbage Collection (uses more RAM and less CPU than Workstation GC)
# 0 = Workstation
# 1 = Server
#Environment="COMPlus_gcServer=1"
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target