summaryrefslogtreecommitdiffstats
path: root/linhes/mythplugins/PKGBUILD
blob: e0142a89a7247f05df2a0d954dbea7c29a503b48 (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
# Maintainer: pvdp <pvdp@email.com>
# Contributor: Taijian <taijian@posteo.de>
# Contributor: Jonathan Conder <jonno.conder@gmail.com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgbase=mythplugins
pkgname=('mythplugins-mytharchive'
         'mythplugins-mythgame'
         'mythplugins-mythmusic'
         'mythplugins-mythnetvision'
         'mythplugins-mythnews'
         'mythplugins-mythweather'
         'mythplugins-mythweb'
         'mythplugins-mythzoneminder')
br=fixes/34
t="${br#*/}+${br%/[0-9][0-9]}"
pkgver=34+fixes.20240311.5590d0d5
pkgrel=1
epoch=0
arch=('any')
url="http://www.mythtv.org"
license=('GPL')
makedepends=('dvdauthor' 'dvd+rw-tools' 'mesa-libgl' "mythtv>=$pkgver" 'git'
             'perl-datetime-format-iso8601' 'perl-date-manip' 'perl-image-size' 'perl-cgi'
             'perl-json' 'perl-libwww' 'perl-soap-lite' 'perl-xml-simple' 'perl-xml-xpath' 'libhdhomerun'
             'python-pillow' 'python-pycurl' 'python-oauthlib' 'gdb' 'mariadb-libs' 'minizip'
             'python-lxml' 'perl-xml-xpath' 'python-urllib3' 'libcdio-paranoia' 'libdiscid' 'libmusicbrainz5'
             'libcoverart')
source=("git+https://github.com/MythTV/mythweb#branch=$br"
        "git+https://github.com/MythTV/mythtv#branch=$br"
)
sha256sums=('SKIP'
            'SKIP')

pkgver() {
  cd "${srcdir}/mythtv/$pkgbase"
  echo -n "$t.$(git show -s --format=%cd --date=short | tr -d -).$(git rev-parse --short=8 HEAD)"
}

prepare() {
  cd "$srcdir/mythtv/$pkgbase"
  
  cd "$srcdir/mythweb"
  
  sed -re 's@/usr/local.*/usr/share@/usr/share@' -i 'mythweb.php'
}

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

  ./configure --prefix=/usr \
              --enable-all
  qmake-qt5 mythplugins.pro
  make -s
}

package_mythplugins-mytharchive() {
  pkgdesc="Create DVDs or archive recorded shows in MythTV"
  depends=('dvdauthor' 'dvd+rw-tools' 'mythtv' 'python-pillow')

  cd "$srcdir/mythtv/$pkgbase/mytharchive"
  make INSTALL_ROOT="$pkgdir" install
}

package_mythplugins-mythgame() {
  pkgdesc="Game emulator plugin for MythTV"
  depends=('mythtv' 'minizip')

  cd "$srcdir/mythtv/$pkgbase/mythgame"
  make INSTALL_ROOT="$pkgdir" install
}

package_mythplugins-mythmusic() {
  pkgdesc="Music playing plugin for MythTV"
  depends=('mythtv' 'libcdio-paranoia' 'libdiscid' 'libmusicbrainz5' 'libcoverart')

  cd "$srcdir/mythtv/$pkgbase/mythmusic"
  make INSTALL_ROOT="$pkgdir" install
}

package_mythplugins-mythnetvision() {
  pkgdesc="MythNetvision plugin for MythTV"
  depends=('mythtv' 'python-oauthlib' 'python-urllib3')

  cd "$srcdir/mythtv/$pkgbase/mythnetvision"
  make INSTALL_ROOT="$pkgdir" install
}

package_mythplugins-mythnews() {
  pkgdesc="News checking plugin for MythTV"
  depends=('mythtv')

  cd "$srcdir/mythtv/$pkgbase/mythnews"
  make INSTALL_ROOT="$pkgdir" install
}

package_mythplugins-mythweather() {
  pkgdesc="Weather checking plugin for MythTV"
  depends=('mythtv' 'perl-date-manip' 'perl-json' 'perl-soap-lite'
           'perl-xml-simple' 'perl-xml-xpath' 'perl-image-size'
           'perl-datetime-format-iso8601')

  cd "$srcdir/mythtv/$pkgbase/mythweather"
  make INSTALL_ROOT="$pkgdir" install
}

package_mythplugins-mythweb() {
  pkgdesc="Web interface for the MythTV scheduler"
  depends=('mythtv' 'perl-cgi' 'lighttpd')

  sed -i 's/unix.*-fpm\.sock;/unix:\/var\/run\/php-fpm7\/php-fpm\.sock;/' "$srcdir/mythweb/mythweb.conf.nginx"

  mkdir -p "$pkgdir/data/srv/httpd/mythweb"/{image_cache,php_sessions}
  cp -R "$srcdir/mythweb"/* "$pkgdir/data/srv/httpd/mythweb"
  chown -R http:http "$pkgdir/data/srv/httpd/mythweb"
  chmod g+rw "$pkgdir/data/srv/httpd/mythweb"/{image_cache,php_sessions}
}

package_mythplugins-mythzoneminder() {
  pkgdesc="View CCTV footage from zoneminder in MythTV"
  depends=('mythtv' 'mariadb-libs' 'zoneminder')

  cd "$srcdir/mythtv/$pkgbase/mythzoneminder"
  make INSTALL_ROOT="$pkgdir" install
}