summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 04ed5e7a20bce0f2e68dff5ad56987efbec9afa8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Maintainer: Luca Weiss <luca (at) z3ntu (dot) xyz>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Daniel Seymour <dannyseeless@gmail.com>

pkgname=jellyfin-git
pkgver=r14688.f0c378979
pkgrel=1
pkgdesc='The Free Software Media Browser'
arch=('i686' 'x86_64' 'armv6h')
url='https://github.com/jellyfin/jellyfin'
license=('GPL2')
depends=('ffmpeg' 'imagemagick' 'dotnet-sdk' 'sqlite')
makedepends=('git')
provides=('jellyfin')
conflicts=('jellyfin')
source=('git+https://github.com/jellyfin/jellyfin.git'
        'git+https://github.com/mono/taglib-sharp.git'
        'jellyfin.service'
        'jellyfin.sysusers'
        'jellyfin.tmpfiles')
backup=('etc/conf.d/jellyfin')
sha256sums=('SKIP'
            'SKIP'
            '982682d72fea64f0dd0c123e3a597699b7f5de306be7bca7c06993d13b51f5e1'
            'effc1cf85c0c959da73bedbcd94e00cfd317dd876f710183b7baf04209055ea2'
            'aa87d52386dde4a2ea4663de2f08249415b2babfefd98d348a96df35dfc36bc0')

pkgver() {
  cd jellyfin
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd jellyfin
  git submodule init
  git config submodule.ThirdParty/taglib-sharp.url $srcdir/taglib-sharp
  git submodule update
}

build(){
  cd jellyfin

  dotnet build --configuration Release MediaBrowser.sln
  # dotnet doesn't like fakeroot
  dotnet publish --configuration Release MediaBrowser.sln --output "$PWD"/build
  # TODO: Clean up the runtimes folder, Mono.Posix.NETStandard.dll is required from it though
  # rm -rf build/runtimes
}

package() {
  mkdir -p "$pkgdir"/usr/lib
  cp -dr --no-preserve='ownership' jellyfin/build "$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
}

# vim: ts=2 sw=2 et: