aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/mythtv/pkg-install
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2007-04-15 17:33:30 +0800
committergrog <grog@FreeBSD.org>2007-04-15 17:33:30 +0800
commit03d7a128cc58831f687822c8c830841007700726 (patch)
tree9200b6e8a054294bb09c8cce84aacee9607d3e3c /multimedia/mythtv/pkg-install
parent6b075a7974692db92b58d717830d9b53194d0cb0 (diff)
downloadfreebsd-ports-gnome-03d7a128cc58831f687822c8c830841007700726.tar.gz
freebsd-ports-gnome-03d7a128cc58831f687822c8c830841007700726.tar.zst
freebsd-ports-gnome-03d7a128cc58831f687822c8c830841007700726.zip
Upgrade to a snapshot of the MythTV fixes tree.
This is necessary to maintain protocol compatibility with Linux distributions, on which we're generally dependent for tuner functionality. Unfortunately, there's no distribution for this version, and it's already been overtaken. Watch this space. Submitted by: dmlb This also fixes a build error reported by pointyhat.
Diffstat (limited to 'multimedia/mythtv/pkg-install')
-rw-r--r--multimedia/mythtv/pkg-install37
1 files changed, 21 insertions, 16 deletions
diff --git a/multimedia/mythtv/pkg-install b/multimedia/mythtv/pkg-install
index 9c40840b4f4e..4b91ed45bd9a 100644
--- a/multimedia/mythtv/pkg-install
+++ b/multimedia/mythtv/pkg-install
@@ -2,26 +2,28 @@
# $FreeBSD$
PATH=/bin:/usr/sbin:/usr/bin:/usr/local/bin
-USER=mythtv
-GROUP=${USER}
-UID=119
-GID=${UID}
-HOME=/home/mythtv
+case $2 in
+POST-INSTALL)
+ USER=mythtv
+ GROUP=${USER}
+ UID=119
+ GID=${UID}
+ HOME=/home/mythtv
-if pw group show "${GROUP}" 2>/dev/null; then
+ if pw group show "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
-else
+ else
if pw groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
exit 1
fi
-fi
+ fi
-if pw user show "${USER}" 2>/dev/null; then
+ if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
-else
+ else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d ${HOME} -m -s /bin/sh -c "MythTV"
then
@@ -34,10 +36,10 @@ else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
-fi
+ fi
# Now make the database
-if [ -f /usr/local/etc/rc.d/mysql-server ]; then
+ if [ -f /usr/local/etc/rc.d/mysql-server ]; then
pgrep mysqld > /dev/null
if [ $? -ne 0 ]; then
/usr/local/etc/rc.d/mysql-server start
@@ -65,22 +67,25 @@ EOF
else
echo Created database mythconverg.
fi
-else
+ else
cat <<EOF
No MySQL server found. If you want to run the database on this
machine, please install the latest MySQL server and then create the
database with this command:
-mysql < /usr/local/share/mythtv/database/mc.sql
+ mysql < /usr/local/share/mythtv/database/mc.sql
EOF
-fi
+ fi
cat <<EOF
To set up mythtv, first assign a password to user mythtv, then log in
as mythtv and run
-mythtv-setup
+ mythtv-setup
EOF
+ ;;
+
+esac