-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
87 lines (77 loc) · 3.31 KB
/
PKGBUILD
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
# Maintainer: Taijian <[email protected]>
# Contributor: Jonathan Conder <[email protected]>
# Contributor: Giovanni Scafora <[email protected]>
# Contributor: Juergen Hoetzel <[email protected]>
# Contributor: <[email protected]>
# Contributor: dorphell <[email protected]>
pkgname=mythtv
pkgver=31.0
pkgrel=2
epoch=1
pkgdesc="A Homebrew PVR project"
arch=('any')
url="https://www.mythtv.org/"
license=('GPL')
depends=('qt5-script' 'fftw' 'exiv2' 'taglib' 'perl-net-upnp' 'ffmpeg' 'libxinerama' 'libxrandr'
'qt5-webkit' 'python-mysqlclient' 'libxnvctrl' 'libhdhomerun' 'python-simplejson' 'python-future')
makedepends=('git' 'help2man' 'yasm' 'mariadb-libs' 'libcec' 'libcdio' 'lirc' 'perl-io-socket-inet6' 'perl-libwww'
'perl-dbd-mysql' 'python-lxml' 'perl-xml-simple' 'perl-xml-xpath' 'python-requests')
optdepends=('glew: for GPU commercial flagging'
'libcec: for consumer electronics control capabilities'
'libhdhomerun: to work properly with HDHomerun devices'
'mariadb: Database-Backend for server deployment'
'mariadb-clients: Database-Frontend for client deployment'
'python-requests: for metadata-lookup / cover art'
'python-requests-cache: for metadata-lookup / cover art'
'xmltv>0.6.1: for Schedule Direct TV listings')
conflicts=('myththemes' 'mythplugins-mythvideo')
replaces=('myththemes' 'mythplugins-mythvideo')
source=("$pkgname-$pkgver.tar.gz::https://github.com/MythTV/$pkgname/archive/v$pkgver.tar.gz"
'mythbackend.service'
'99-mythbackend.rules'
'sysusers.d'
)
sha256sums=('907d1747950ec6ef1ec965069c75500b4538b781333f60e16d62d519b221a86d'
'086f573884e4df1ff6e6e8de5a423a9ff900166acfe085abe65b62f32730e4a3'
'ecfd02bbbef5de9773f4de2c52e9b2b382ce8137735f249d7900270d304fd333'
'470de0a4050c16c7af11a0e5cfe2810b7daae42df4acf5456c7eae274dc7c5ae')
prepare() {
cd $pkgname-$pkgver/$pkgname
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../../$src"
done
}
build() {
cd $pkgname-$pkgver/$pkgname
ARCH="${CARCH/_/-}"
./configure --prefix=/usr \
--cpu="$ARCH" \
--disable-altivec \
--disable-distcc \
--enable-pic \
--enable-libmp3lame \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--enable-libvpx \
--enable-libxvid \
--perl-config-opts=INSTALLDIRS=vendor
make
}
package() {
cd $pkgname-$pkgver/$pkgname
make INSTALL_ROOT="$pkgdir" install
install -D -m644 "$srcdir/mythbackend.service" "$pkgdir/usr/lib/systemd/system/mythbackend.service"
install -D -m644 'database/mc.sql' "$pkgdir/usr/share/mythtv/mc.sql"
install -D -m644 "$srcdir/sysusers.d" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
# mkdir -p "$pkgdir/usr/share/mythtv"
cp -R '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"
}