summaryrefslogtreecommitdiff
path: root/community-staging
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-07-02 00:01:20 +0000
committerroot <root@rshg054.dnsready.net>2012-07-02 00:01:20 +0000
commit9d209f25af63a35774000e87df4e188057f71b2f (patch)
treede003993674c9d9e51d40ea831588cd516c01a11 /community-staging
parent55f2d1ab0ab1bd2f7c8c7c5cefeb45f7c457a5d9 (diff)
Mon Jul 2 00:01:20 UTC 2012
Diffstat (limited to 'community-staging')
-rw-r--r--community-staging/mythtv/PKGBUILD20
-rw-r--r--community-staging/mythtv/mythbackend.rc2
-rw-r--r--community-staging/mythtv/mythbackend.service12
-rw-r--r--community-staging/mythtv/mythtv.install19
4 files changed, 37 insertions, 16 deletions
diff --git a/community-staging/mythtv/PKGBUILD b/community-staging/mythtv/PKGBUILD
index 927177a73..8da742616 100644
--- a/community-staging/mythtv/PKGBUILD
+++ b/community-staging/mythtv/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 71990 2012-06-05 02:18:34Z jconder $
+# $Id: PKGBUILD 73066 2012-06-30 07:05:55Z 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=4
+pkgver=0.25.1
+pkgrel=2
epoch=1
pkgdesc="A Homebrew PVR project"
arch=('i686' 'x86_64')
@@ -29,19 +29,18 @@ 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/_/-}"
@@ -65,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-staging/mythtv/mythbackend.rc b/community-staging/mythtv/mythbackend.rc
index 2b3c2d52e..488b4cb8e 100644
--- a/community-staging/mythtv/mythbackend.rc
+++ b/community-staging/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-staging/mythtv/mythbackend.service b/community-staging/mythtv/mythbackend.service
new file mode 100644
index 000000000..9d92bd644
--- /dev/null
+++ b/community-staging/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-staging/mythtv/mythtv.install b/community-staging/mythtv/mythtv.install
index c29a53454..eed25b868 100644
--- a/community-staging/mythtv/mythtv.install
+++ b/community-staging/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
}