summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6277afdff21fa7b56e0fff4d13b8a7d71ecbd0c5 (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
# This PKGBUILD is part of the VDR4Arch project [https://github.com/vdr4arch]

# Maintainer: Christopher Reimer <mail+vdr4arch[at]c-reimer[dot]de>
# Contributor: Ole Ernst <olebowle[at]gmx[dot]com
pkgbase=vdr-streamdev
pkgname=(vdr-streamdev-{client,server})
pkgver=0.6.3
_vdrapi=2.6.7
pkgrel=6
pkgdesc="Implementation of the VTP (Video Transfer Protocol)"
url="https://github.com/vdr-projects/vdr-plugin-streamdev"
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h')
license=('GPL2')
depends=('gcc-libs' "vdr-api=${_vdrapi}")
_plugname=${pkgbase//vdr-/}
source=("$pkgbase-$pkgver.tar.gz::https://github.com/vdr-projects/vdr-plugin-streamdev/archive/refs/tags/$pkgver.tar.gz"
        "50-$_plugname-server.conf")

sha256sums=('a678653dfb2641bc9dea9a1bd3b2400f3edbe697953364cf597f76d93cfaea2c'
            'cec0056ca0f140f773f443396ea5f95632f077c4a653a4c5b753ec4937ca3e72')

build() {
  cd "${srcdir}/vdr-plugin-$_plugname-$pkgver"
  make -j1
}

package_vdr-streamdev-client() {
  pkgdesc+=': client-side'
  replaces=('vdr-streamdev')
  conflicts=('vdr-streamdev')
  backup=("etc/vdr/conf.avail/50-$_plugname-client.conf")
  cd "${srcdir}/vdr-plugin-$_plugname-$pkgver"
  make DESTDIR="$pkgdir" install-client

  mkdir -p "$pkgdir/etc/vdr/conf.avail"
  echo "[$_plugname-client]" > "$pkgdir/etc/vdr/conf.avail/50-$_plugname-client.conf"
}

package_vdr-streamdev-server() {
  pkgdesc+=': server-side'
  replaces=('vdr-streamdev')
  conflicts=('vdr-streamdev')
  backup=("etc/vdr/conf.avail/50-$_plugname-server.conf"
          'var/lib/vdr/plugins/streamdev-server/streamdevhosts.conf')
  cd "${srcdir}/vdr-plugin-$_plugname-$pkgver"
  make DESTDIR="$pkgdir" install-server

  install -Dm644 streamdev-server/streamdevhosts.conf "$pkgdir/var/lib/vdr/plugins/streamdev-server/streamdevhosts.conf"
  chown -R 666:666 "$pkgdir/var/lib/vdr"

  mkdir -p "$pkgdir/etc/vdr/conf.avail"
  install -Dm644 "$srcdir/50-$_plugname-server.conf" "$pkgdir/etc/vdr/conf.avail/50-$_plugname-server.conf"
}