summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2046184cde57b1fb094aba74ad5b9e4cfd4bda9f (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Maintainer: John Bergqvist <johnlbergqvist@gmail.com>
# Contributor: James Bunton <jamesbunton@delx.net.au>
# Contributor: Taijian <taijian@posteo.de>
# Contributor: Jonathan Conder <jonno.conder@gmail.com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Juergen Hoetzel <juergen@archlinux.org>
# Contributor: <kleptophobiac@gmail.com>
# Contributor: dorphell <dorphell@archlinux.org>

pkgname=mythtv-git
pkgver=36.0.r13.gababe58
pkgrel=1
pkgdesc="A Homebrew PVR project (Stable '-fixes' branch)"
arch=('x86_64')
url="https://www.mythtv.org/"
license=('GPL')
depends=(
    'aom'
    'dav1d'
    'exiv2'
    'jack'
    'lame'
    'libass'
    'libavc1394'
    'libbluray'
    'libhdhomerun'
    'libiec61883'
    'libpulse'
    'libsamplerate'
    'libva'
    'libvdpau'
    'libvpx'
    'libxinerama'
    'libxml2'
    'libxrandr'
    'libzip'
    'qt5-script'
    'qt5-webengine'
    'soundtouch'
    'taglib'
    'x264'
    'x265'
    'xvidcore'
)
makedepends=(
    'git'
    'libcdio'
    'libcec'
    'libmariadbclient'
    'lirc'
    'nasm'
    'perl-dbd-mysql'
    'perl-io-socket-inet6'
    'perl-libwww'
    'perl-net-upnp'
    'perl-xml-simple'
    'perl-xml-xpath'
    'python-lxml'
    'python-mysqlclient'
    'python-pip'
    'python-requests'
    'python-setuptools'
    'python-wheel'
)
optdepends=(
    'libcec: for consumer electronics control capabilities'
    'mariadb: Database-Backend for server deployment'
    'mariadb-clients: Database-Frontend for client deployment'
    'perl-dbd-mysql: Perl bindings'
    'perl-io-socket-inet6: Perl bindings'
    'perl-libwww: Perl bindings'
    'perl-net-upnp: Perl bindings'
    'perl-xml-simple: Perl bindings'
    'perl-xml-xpath: Perl bindings'
    'python-lxml: Python bindings'
    'python-mysqlclient: Python bindings'
    'python-requests: Python bindings'
    'python-requests-cache: TV metadata caching (tvmaze/ttvdb scrapers)'
)
options=(!lto)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=(
    "git+https://github.com/MythTV/mythtv#branch=fixes/36"
    'mythbackend.service'
    'mythtv.desktop'
    'mythtv.png'
    '99-mythbackend.rules'
    'sysusers.d'
)
sha256sums=(
    'SKIP'
    '5ec7b0f6a3767068d1912188c6bc8957583a543abcb5b4ef52ea7126e316525b'
    '3fd2018d0d5aaa7d530835305dac80d4ca7d8fc991cdf9e1cebadebd86e25c03'
    '12cb52bf9b084a4f16419c9370fef0450ce6a11308b0c3f7240f4f83df7e2ab6'
    'ecfd02bbbef5de9773f4de2c52e9b2b382ce8137735f249d7900270d304fd333'
    '470de0a4050c16c7af11a0e5cfe2810b7daae42df4acf5456c7eae274dc7c5ae'
)

pkgver() {
  cd "$srcdir/mythtv/mythtv"
  printf "%s" "$(git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g')"
}

build() {
  cd "$srcdir/mythtv/mythtv"

  ARCH="${CARCH/_/-}"
  ./configure --prefix=/usr \
              --cpu="$ARCH" \
              --enable-libmp3lame \
              --enable-libvpx \
              --enable-libx264 \
              --enable-libx265 \
              --enable-libxvid \
              --with-bindings=python \
              --with-bindings=perl \
              --perl-config-opts=INSTALLDIRS=vendor
  make
}

package() {
  cd "$srcdir/mythtv/mythtv"
  make INSTALL_ROOT="$pkgdir" install

  install -D -m644 "$srcdir/mythbackend.service" "$pkgdir/usr/lib/systemd/system/mythbackend.service"
  install -D -m644 "$srcdir/mythtv/mythtv/database/mc.sql" "$pkgdir/usr/share/mythtv/mc.sql"
  install -D -m644 "$srcdir/sysusers.d" "$pkgdir/usr/lib/sysusers.d/mythtv.conf"

  mkdir -p "$pkgdir/usr/share/mythtv"
  cp -R "$srcdir/mythtv/mythtv/contrib" "$pkgdir/usr/share/mythtv"
  mkdir -p "$pkgdir/var/log/mythtv"

  # Install udev rules https://www.mythtv.org/wiki/Systemd_mythbackend_Configuration#Delay_starting_the_backend_until_tuners_have_initialized
  install -Dm644 "$srcdir/99-mythbackend.rules" "$pkgdir/usr/lib/udev/rules.d/99-mythbackend.rules"

  # Install desktop file
  install -Dm644 "$srcdir/mythtv.png" "$pkgdir/usr/share/pixmaps/mythtv.png"
  install -Dm644 "$srcdir/mythtv.desktop" "$pkgdir/usr/share/applications/mythtv.desktop"
}