ayaports/apk/v3.13/main/jellyfin/APKBUILD
build@apk-groulx 6aafd284c0 update
2021-06-07 00:01:45 +00:00

72 lines
2.6 KiB
Text

# Maintainer: Antoine Martin <dev@ayakael.net>
pkgname=jellyfin
pkgver=10.7.5
pkgrel=0
pkgdesc='The Free Software Media System'
arch='i686 x86_64 armv6h'
url='https://github.com/jellyfin/jellyfin'
license='GPL2'
options="!strip"
makedepends='dotnet-sdk yarn git'
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.initd"
subpackages="$pkgname-web $pkgname-server"
build(){
# Build jellyfin-web
cd "${srcdir}"/jellyfin-web-$pkgver
yarn install --cache-folder "$srcdir"/yarn-cache
# Build jellyfin-server
cd "${srcdir}"/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.
dotnet publish --configuration Release Jellyfin.Server --output "$PWD"/publish
# Clean up the runtimes folder (keep linux-*)
rm -rfv publish/runtimes/{alpine-*,osx*,tizen-*,win*}
}
package() {
depends="jellyfin-web=$pkgver jellyfin-server=$pkgver"
mkdir -p "${pkgdir}"
}
server() {
pkgdesc="Jellyfin server component"
depends='
dotnet-runtime>=5
aspnet-runtime>=5
ffmpeg
sqlite'
mkdir -p "$subpkgdir"/usr/lib
cp -r "${srcdir}"/jellyfin-$pkgver/publish "$subpkgdir"/usr/lib/jellyfin
install -Dm 755 jellyfin.initd -t "$subpkgdir"/etc/init.d/jellyfin
install -Dm 644 jellyfin.conf "$subpkgdir"/etc/conf.d/jellyfin
}
web() {
pkgdesc="Jellyfin web client"
mkdir -p "$subpkgdir"/usr/lib/jellyfin
cp -r "$srcdir"/jellyfin-web-$pkgver/dist "$subpkgdir"/usr/lib/jellyfin/jellyfin-web
}
sha512sums="ca0f54d07cfdefe759b3010b653d69e96e43716aade2205981528552a3d318022db1d9ea0780608de973463d54bef85d6ca68fcd647999485c4020bda45d3c0a jellyfin-10.7.5.tar.gz
3eb739a33b88ba0be85e883c8401dd40b97b109ce7a05f25ee038991fe3cd420e824a20ae3900e2991f5df79621b1886378b9adfa93e25bcaac57a8687700d4f jellyfin-web-10.7.5.tar.gz
2aa97a1a7a8a447171b59be3e93183e09cbbc32c816843cc47c6777b9aec48bd9c1d9d354f166e0b000ad8d2e94e6e4b0559aa52e5c159abbc103ed2c5afa3f0 jellyfin.conf
6974b86bd2bfeff288f3ed059b5d4b94f74fe045df44127c34a755be8d22af7f5338cc706080df4c4a720ef7256fd5a377abea5be4b68b79492bdd59ff962d69 jellyfin.initd"