summaryrefslogtreecommitdiff
path: root/community/mythtv
diff options
context:
space:
mode:
Diffstat (limited to 'community/mythtv')
-rw-r--r--community/mythtv/PKGBUILD21
-rw-r--r--community/mythtv/mythbackend.rc2
-rw-r--r--community/mythtv/mythbackend.service12
-rw-r--r--community/mythtv/mythtv.install19
4 files changed, 38 insertions, 16 deletions
diff --git a/community/mythtv/PKGBUILD b/community/mythtv/PKGBUILD
index 824e33225..e52fc70cd 100644
--- a/community/mythtv/PKGBUILD
+++ b/community/mythtv/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 69571 2012-04-19 02:21:24Z jconder $
+# $Id: PKGBUILD 73064 2012-06-30 06:07:26Z jconder $
# Maintainer: Jonathan Conder <jonno.conder@gmail.com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Juergen Hoetzel <juergen@archlinux.org>
@@ -6,8 +6,8 @@
# Contributor: dorphell <dorphell@archlinux.org>
pkgname=mythtv
-pkgver=0.25
-pkgrel=3
+pkgver=0.25.1
+pkgrel=1
epoch=1
pkgdesc="A Homebrew PVR project"
arch=('i686' 'x86_64')
@@ -29,19 +29,19 @@ replaces=('myththemes' 'mythplugins-mythvideo')
backup=('etc/conf.d/mythbackend')
install='mythtv.install'
source=("ftp://ftp.osuosl.org/pub/$pkgname/$pkgname-$pkgver.tar.bz2"
- 'mythtv_0.25_gcc_4.7.patch'
'mythbackend.rc'
- 'mythbackend.conf')
-md5sums=('e49c81de40e279c83dcb1b2aa9a45748'
- '6090f5f22a8584db80b76cf19869ee41'
- '62fd98347c56b1d9b795792f83269d25'
- 'ab962d83614cbd0ac11ce3fcc929829d')
+ 'mythbackend.conf'
+ 'mythbackend.service')
+md5sums=('4d6375cc3a820abdb2ac5300734687ac'
+ 'c8f935d42fb8617e9279bd539811ca5f'
+ 'ab962d83614cbd0ac11ce3fcc929829d'
+ '813008d14a44e9c6212f364723aeaa74')
build() {
cd "$srcdir/$pkgname-$pkgver"
find 'bindings/python' 'contrib' -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'
- patch -Np1 -i "$srcdir/mythtv_0.25_gcc_4.7.patch"
+ sed -re 's@Key, &@Key, @' -i 'bindings/php/MythBase.php'
ARCH="${CARCH/_/-}"
./configure --prefix=/usr \
@@ -64,6 +64,7 @@ package() {
install -D -m755 "$srcdir/mythbackend.rc" "$pkgdir/etc/rc.d/mythbackend"
install -D -m644 "$srcdir/mythbackend.conf" "$pkgdir/etc/conf.d/mythbackend"
+ 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"
mkdir -p "$pkgdir/usr/share/mythtv"
diff --git a/community/mythtv/mythbackend.rc b/community/mythtv/mythbackend.rc
index 2b3c2d52e..488b4cb8e 100644
--- a/community/mythtv/mythbackend.rc
+++ b/community/mythtv/mythbackend.rc
@@ -8,7 +8,7 @@
# Default values to use if none are supplied in the config file.
#
# User who should start the mythbackend process
-MBE_USER='root'
+MBE_USER='mythtv'
# Startup options for mythbackend
MBE_OPTS=''
diff --git a/community/mythtv/mythbackend.service b/community/mythtv/mythbackend.service
new file mode 100644
index 000000000..9d92bd644
--- /dev/null
+++ b/community/mythtv/mythbackend.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=MythTV Backend
+After=network.target mysqld.service
+
+[Service]
+Type=simple
+Environment=HOME=/var/lib/mythtv
+User=mythtv
+ExecStart=/usr/bin/mythbackend --daemon --logpath /var/log/mythtv
+
+[Install]
+WantedBy=multi-user.target
diff --git a/community/mythtv/mythtv.install b/community/mythtv/mythtv.install
index c29a53454..eed25b868 100644
--- a/community/mythtv/mythtv.install
+++ b/community/mythtv/mythtv.install
@@ -1,11 +1,20 @@
-post_install() {
- echo "See \"MythTV\" on the Archlinux Wiki for installation information - Extensive!!"
+post_upgrade() {
+ if ! getent passwd mythtv &>/dev/null; then
+ getent group mythtv &>/dev/null || groupadd -r mythtv >/dev/null
+ useradd -rmd /var/lib/mythtv -g mythtv -G video,audio,optical -s /bin/bash mythtv >/dev/null
+ fi
}
-post_upgrade() {
- return
+post_install() {
+ echo -e "For installation information, visit:\nhttps://wiki.archlinux.org/index.php/MythTV"
+
+ post_upgrade
}
post_remove() {
- echo -e "NOTE: mysql database was not removed. To remove run:\nmysql -u root -e 'drop database mythconverg;'"
+ echo -e "The MythTV database was not removed. To remove it, run:\n mysql -u root -e 'drop database mythconverg;'"
+ [ -d var/lib/mythtv ] && echo "The MythTV home directory /var/lib/mythtv can also be removed."
+
+ getent passwd mythtv &>/dev/null && userdel mythtv >/dev/null
+ getent group mythtv &>/dev/null && groupdel mythtv >/dev/null
}