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

# Maintainer: Christopher Reimer <mail+vdr4arch[at]c-reimer[dot]de>
pkgname=vdr-play
pkgver=0.1.14.r21.g8035264
_gitver=8035264d471f75407222a48f2fa707795e25d461
_vdrapi=2.6.7
pkgrel=12
pkgdesc="Mediaplayer plugin for VDR and X11"
url='https://github.com/vdr-projects/vdr-plugin-play'
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h')
license=('AGPL3')
depends=('mplayer' "vdr-api=${_vdrapi}" 'xcb-util-image' 'xcb-util-keysyms' 'xcb-util-wm')
makedepends=('git')
_plugname=${pkgname//vdr-/}
source=("git+https://github.com/vdr-projects/vdr-plugin-${_plugname}.git#commit=${_gitver}"
        'play-vdr2.1.10compat.diff'
        "50-$_plugname.conf")
backup=("etc/vdr/conf.avail/50-$_plugname.conf")
md5sums=('SKIP'
         '88bd08bead28aab75bd002daccf7e5b5'
         '19d455b69728f7e6469763b2b2424074')

pkgver() {
  cd "${srcdir}/vdr-plugin-$_plugname"
  _last_release=0.1.14
  _last_release_commit=eb4b8437553ff7666eceadd09c6cb9dd8255380e

  _count=$((`git rev-list --count HEAD` - `git rev-list --count $_last_release_commit`))
  if [ $_count -gt 0 ]; then
    printf "%s.r%s.g%s" $_last_release \
      $_count \
      `git rev-parse --short=7 HEAD`
  else
    printf "%s" $_last_release
  fi
}

prepare() {
  cd "${srcdir}/vdr-plugin-$_plugname"
  patch -p1 -i "$srcdir/play-vdr2.1.10compat.diff"
}

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

package() {
  cd "${srcdir}/vdr-plugin-$_plugname"
  make DESTDIR="$pkgdir" install

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