mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
- Update to 1.8.3
PR: ports/130592 Submitted by: J.R. Oldroyd <fbsd@opal.com>
This commit is contained in:
parent
1fffaf7887
commit
2e043352fc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=227421
@ -6,133 +6,62 @@
|
||||
#
|
||||
|
||||
PORTNAME= freevo
|
||||
PORTVERSION= 1.5.4
|
||||
PORTREVISION= 5
|
||||
PORTVERSION= 1.8.3
|
||||
CATEGORIES= multimedia
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= freevo
|
||||
MASTER_SITES= SF
|
||||
|
||||
MAINTAINER= fbsd@opal.com
|
||||
COMMENT= Open source digital jukebox
|
||||
|
||||
.ifdef NOPORTDOCS
|
||||
BROKEN= bad plist
|
||||
.endif
|
||||
|
||||
RUN_DEPENDS= aumix:${PORTSDIR}/audio/aumix \
|
||||
${PYTHON_SITELIBDIR}/pyosd/__init__.py:${PORTSDIR}/misc/py-osd \
|
||||
RUN_DEPENDS= mplayer:${PORTSDIR}/multimedia/mplayer \
|
||||
mencoder:${PORTSDIR}/multimedia/mencoder \
|
||||
aumix:${PORTSDIR}/audio/aumix \
|
||||
tv_cat:${PORTSDIR}/textproc/p5-xmltv \
|
||||
${PYTHON_SITELIBDIR}/_xmlplus/__init__.py:${PORTSDIR}/textproc/py-xml \
|
||||
${PYTHON_SITELIBDIR}/kaa/__init__.py:${PORTSDIR}/multimedia/py-kaa-base \
|
||||
${PYTHON_SITELIBDIR}/kaa/imlib2/__init__.py:${PORTSDIR}/multimedia/py-kaa-imlib2 \
|
||||
${PYTHON_SITELIBDIR}/kaa/metadata/__init__.py:${PORTSDIR}/multimedia/py-kaa-metadata \
|
||||
${PYTHON_SITELIBDIR}/BeautifulSoup.py:${PORTSDIR}/www/py-beautifulsoup \
|
||||
${PYTHON_SITELIBDIR}/pygame/__init__.py:${PORTSDIR}/devel/py-game \
|
||||
${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging \
|
||||
${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twisted \
|
||||
${PYTHON_SITELIBDIR}/mmpython/__init__.py:${PORTSDIR}/multimedia/mmpython \
|
||||
${PYTHON_SITELIBDIR}/_xmlplus/__init__.py:${PORTSDIR}/textproc/py-xml \
|
||||
${PYTHON_SITELIBDIR}/Numeric/Numeric_headers/__init__.py:${PORTSDIR}/math/py-numeric
|
||||
|
||||
FREEVO_USER= freevo
|
||||
FREEVO_GROUP= ${FREEVO_USER}
|
||||
FREEVO_UID= 523
|
||||
FREEVO_GID= ${FREEVO_UID}
|
||||
FREEVO_HOME= /var/db/${FREEVO_USER}
|
||||
|
||||
NO_BUILD= yes
|
||||
SUB_LIST+= PORTVERSION=${PORTVERSION}
|
||||
SUB_FILES= pkg-message
|
||||
SUB_LIST+= PORTVERSION=${PORTVERSION} \
|
||||
FREEVO_USER=${FREEVO_USER} \
|
||||
FREEVO_GROUP=${FREEVO_GROUP} \
|
||||
FREEVO_UID=${FREEVO_UID} \
|
||||
FREEVO_GID=${FREEVO_GID} \
|
||||
FREEVO_HOME=${FREEVO_HOME}
|
||||
SUB_FILES= pkg-message pkg-install pkg-deinstall
|
||||
|
||||
USE_GETTEXT= yes
|
||||
USE_PYTHON= yes
|
||||
USE_PYDISTUTILS= yes
|
||||
PKGINSTALL= pkg-install
|
||||
|
||||
USE_RC_SUBR= ${PORTNAME}
|
||||
RC_SCRIPT= ${PREFIX}/etc/rc.d/${PORTNAME}
|
||||
|
||||
DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
|
||||
CONF= ${PREFIX}/etc/${PORTNAME}
|
||||
|
||||
OPTIONS= MPLAYER "Enable mplayer video playback support" On \
|
||||
XINE "Enable xine video playback support" On \
|
||||
MAME "Enable xmame game support" Off \
|
||||
SNES9X "Enable snes9x game support" Off \
|
||||
ZSNES "Enable zsnes game support" Off \
|
||||
XMLTV "Enable TV guide listings support" On \
|
||||
CDPARANOIA "Enable cdparanoia audio extraction support" On \
|
||||
LAME "Enable lame MP3 encoding support" On \
|
||||
OGG "Enable Ogg Vorbis encoding support" On \
|
||||
FLAC "Enable FLAC encoding support" Off \
|
||||
LIRC "Enable lirc remote control support" On
|
||||
CONFDIR= ${PREFIX}/etc/${PORTNAME}
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
###
|
||||
# AUTODETECTION
|
||||
###
|
||||
|
||||
.if exists(${LOCALBASE}/bin/xmame) && !defined(WITHOUT_MAME)
|
||||
WITH_MAME= YES
|
||||
.endif
|
||||
|
||||
.if exists(${LOCALBASE}/bin/snes9x) && !defined(WITHOUT_SNES9X)
|
||||
WITH_SNES9X= YES
|
||||
.endif
|
||||
|
||||
.if exists(${LOCALBASE}/bin/zsnes) && !defined(WITHOUT_ZSNES)
|
||||
WITH_ZSNES= YES
|
||||
.endif
|
||||
|
||||
.if exists(${LOCALBASE}/bin/flac) && !defined(WITHOUT_FLAC)
|
||||
WITH_FLAC= YES
|
||||
.endif
|
||||
|
||||
###
|
||||
# CONFIGURE RUN_DEPENDS
|
||||
###
|
||||
|
||||
.if !defined(WITHOUT_MPLAYER)
|
||||
RUN_DEPENDS+= mplayer:${PORTSDIR}/multimedia/mplayer
|
||||
.endif
|
||||
|
||||
.if !defined(WITHOUT_XINE)
|
||||
RUN_DEPENDS+= xine:${PORTSDIR}/multimedia/xine
|
||||
.endif
|
||||
|
||||
.if defined(WITH_MAME)
|
||||
RUN_DEPENDS+= xmame:${PORTSDIR}/emulators/xmame
|
||||
.endif
|
||||
|
||||
.if defined(WITH_SNES9X)
|
||||
RUN_DEPENDS+= snes9x:${PORTSDIR}/emulators/snes9x
|
||||
.endif
|
||||
|
||||
.if defined(WITH_ZSNES)
|
||||
RUN_DEPENDS+= zsnes:${PORTSDIR}/emulators/zsnes
|
||||
.endif
|
||||
|
||||
.if !defined(WITHOUT_XMLTV)
|
||||
RUN_DEPENDS+= tv_cat:${PORTSDIR}/textproc/p5-xmltv
|
||||
.endif
|
||||
|
||||
.if !defined(WITHOUT_CDPARANOIA)
|
||||
RUN_DEPENDS+= cdparanoia:${PORTSDIR}/audio/cdparanoia
|
||||
.endif
|
||||
|
||||
.if !defined(WITHOUT_LAME)
|
||||
RUN_DEPENDS+= lame:${PORTSDIR}/audio/lame
|
||||
.endif
|
||||
|
||||
.if !defined(WITHOUT_OGG)
|
||||
RUN_DEPENDS+= oggenc:${PORTSDIR}/audio/vorbis-tools
|
||||
.endif
|
||||
|
||||
.if defined(WITH_FLAC)
|
||||
RUN_DEPENDS+= flac:${PORTSDIR}/audio/flac
|
||||
.endif
|
||||
|
||||
.if !defined(WITHOUT_LIRC)
|
||||
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/pylircmodule.so:${PORTSDIR}/comms/py-lirc
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|/etc/freevo|${PREFIX}/etc/freevo|' ${WRKSRC}/freevo_config.py
|
||||
@${REINPLACE_CMD} -e 's|/etc/freevo|${PREFIX}/etc/freevo|' ${WRKSRC}/local_conf.py.example
|
||||
|
||||
pre-install:
|
||||
@BATCH="${BATCH}" ${SH} ${PKGINSTALL} PRE-INSTALL
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${CONF} && ${CHMOD} a+rx ${CONF}
|
||||
${INSTALL_DATA} ${WRKSRC}/local_conf.py.example ${CONF}
|
||||
@${SED} 's|%%PREFIX%%|${PREFIX}|' ${FILESDIR}/freevo.sh.sample > ${WRKDIR}/freevo.sh.sample
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/freevo.sh.sample ${PREFIX}/etc/rc.d/
|
||||
@${SED} 's|%%PREFIX%%|${PREFIX}|' ${PKGMESSAGE}
|
||||
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
${MKDIR} ${CONFDIR}
|
||||
${CHMOD} a+rx ${CONFDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/local_conf.py.example ${CONFDIR}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (freevo-1.5.4.tar.gz) = 22ada48e84e5e3d7f80110c842ed18ca
|
||||
SHA256 (freevo-1.5.4.tar.gz) = d9a7c9455a94c281acb8c5e3f0fc68e4289af7a557af413db2244a254dd48090
|
||||
SIZE (freevo-1.5.4.tar.gz) = 4425484
|
||||
MD5 (freevo-1.8.3.tar.gz) = 817ae34cca78b57970ce1bbb58e19ce3
|
||||
SHA256 (freevo-1.8.3.tar.gz) = ef9491f0d6c40ba4027266ef577f05cb77be49e68e307b67d1f917e9430eefa4
|
||||
SIZE (freevo-1.8.3.tar.gz) = 26713301
|
||||
|
61
multimedia/freevo/files/freevo-rcsubr.in
Normal file
61
multimedia/freevo/files/freevo-rcsubr.in
Normal file
@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
|
||||
# PROVIDE: freevo
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Uses the following /etc/rc.conf variables:
|
||||
# freevo_enable="YES" master on/off
|
||||
# freevo_recordserver_enable="YES" start freevo record server
|
||||
# freevo_webserver_enable="YES" start freevo web server
|
||||
# freevo_gui_enable="YES" start freevo GUI
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=freevo
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
load_rc_config $name
|
||||
: ${freevo_enable="NO"}
|
||||
: ${freevo_recordserver_enable="NO"}
|
||||
: ${freevo_webserver_enable="NO"}
|
||||
: ${freevo_gui_enable="NO"}
|
||||
|
||||
freevo_user=${freevo_user:-"freevo"}
|
||||
freevo_group=${freevo_group:-"freevo"}
|
||||
freevo_uid=`pw usershow ${freevo_user} | awk -F: '{print $3}'`
|
||||
|
||||
command=%%PREFIX%%/bin/freevo
|
||||
command_interpreter=%%PREFIX%%/bin/python2.5
|
||||
_interpbn=python
|
||||
|
||||
case "$1" in
|
||||
fast*) freevo_cmd=`expr "$1" : 'fast\(.*\)'` ;;
|
||||
*) freevo_cmd="$1" ;;
|
||||
esac
|
||||
|
||||
name=freevo_recordserver
|
||||
rcvar=${name}_enable
|
||||
eval ${name}_user=${freevo_user}
|
||||
eval ${name}_group=${freevo_group}
|
||||
pidfile=/var/run/freevo/recordserver-${freevo_uid}.pid
|
||||
command_args="recordserver ${freevo_cmd}"
|
||||
run_rc_command "$1"
|
||||
|
||||
name=freevo_webserver
|
||||
rcvar=${name}_enable
|
||||
eval ${name}_user=${freevo_user}
|
||||
eval ${name}_group=${freevo_group}
|
||||
pidfile=/var/run/freevo/webserver-${freevo_uid}.pid
|
||||
command_args="webserver ${freevo_cmd}"
|
||||
run_rc_command "$1"
|
||||
|
||||
name=freevo_gui
|
||||
rcvar=${name}_enable
|
||||
eval ${name}_user=${freevo_user}
|
||||
eval ${name}_group=${freevo_group}
|
||||
pidfile=/var/run/freevo/freevo-${freevo_uid}.pid
|
||||
command_args="${freevo_cmd}"
|
||||
run_rc_command "$1"
|
||||
|
55
multimedia/freevo/files/freevo.in
Normal file
55
multimedia/freevo/files/freevo.in
Normal file
@ -0,0 +1,55 @@
|
||||
#!/bin/sh
|
||||
|
||||
# PROVIDE: freevo
|
||||
# REQUIRE: DAEMON lircd
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Uses the following /etc/rc.conf variables:
|
||||
# freevo_enable="YES" master on/off
|
||||
# freevo_recordserver_enable="YES" start freevo record server
|
||||
# freevo_webserver_enable="YES" start freevo web server
|
||||
# freevo_gui_enable="YES" start freevo GUI
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=freevo
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
load_rc_config $name
|
||||
: ${freevo_enable="NO"}
|
||||
: ${freevo_recordserver_enable="NO"}
|
||||
: ${freevo_webserver_enable="NO"}
|
||||
: ${freevo_gui_enable="NO"}
|
||||
|
||||
freevo_user=${freevo_user:-"freevo"}
|
||||
freevo_group=${freevo_group:-"freevo"}
|
||||
freevo_uid=`pw usershow ${freevo_user} | awk -F: '{print $3}'`
|
||||
freevo_dir=`pw usershow ${freevo_user} | awk -F: '{print $9}'`
|
||||
|
||||
command=%%PREFIX%%/bin/freevo
|
||||
command_interpreter="%%PREFIX%%/bin/python2.5"
|
||||
|
||||
cd ${freevo_dir}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ ${freevo_recordserver_enable} = "YES" ] && su ${freevo_user} -c "${command} recordserver start"
|
||||
[ ${freevo_webserver_enable} = "YES" ] && su ${freevo_user} -c "${command} webserver start"
|
||||
[ ${freevo_gui_enable} = "YES" ] && su ${freevo_user} -c "${command} start"
|
||||
;;
|
||||
stop)
|
||||
[ ${freevo_recordserver_enable} = "YES" ] && su ${freevo_user} -c "${command} recordserver stop"
|
||||
[ ${freevo_webserver_enable} = "YES" ] && su ${freevo_user} -c "${command} webserver stop"
|
||||
[ ${freevo_gui_enable} = "YES" ] && su ${freevo_user} -c "${command} stop"
|
||||
;;
|
||||
restart)
|
||||
[ ${freevo_recordserver_enable} = "YES" ] && su ${freevo_user} -c "${command} recordserver stop"
|
||||
[ ${freevo_webserver_enable} = "YES" ] && su ${freevo_user} -c "${command} webserver stop"
|
||||
[ ${freevo_gui_enable} = "YES" ] && su ${freevo_user} -c "${command} stop"
|
||||
[ ${freevo_recordserver_enable} = "YES" ] && su ${freevo_user} -c "${command} recordserver start"
|
||||
[ ${freevo_webserver_enable} = "YES" ] && su ${freevo_user} -c "${command} webserver start"
|
||||
[ ${freevo_gui_enable} = "YES" ] && su ${freevo_user} -c "${command} start"
|
||||
;;
|
||||
esac
|
||||
|
@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
PREFIX=%%PREFIX%%
|
||||
RUN="/usr/bin/su freevo -c"
|
||||
PATH=${PATH}:%%PREFIX%%/bin
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
${RUN} "${PREFIX}/bin/freevo recordserver start" \
|
||||
&& echo -n " freevo-recordserver"
|
||||
${RUN} "${PREFIX}/bin/freevo webserver start" \
|
||||
&& echo -n " freevo-webserver"
|
||||
${RUN} "${PREFIX}/bin/freevo -fs start" > /dev/null 2>&1 &
|
||||
echo -n " freevo"
|
||||
;;
|
||||
stop)
|
||||
${RUN} "${PREFIX}/bin/freevo stop"
|
||||
${RUN} "${PREFIX}/bin/freevo webserver stop"
|
||||
${RUN} "${PREFIX}/bin/freevo recordserver stop"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: `basename $0` {start|stop}" >&2
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
20
multimedia/freevo/files/patch-freevo
Normal file
20
multimedia/freevo/files/patch-freevo
Normal file
@ -0,0 +1,20 @@
|
||||
--- freevo.orig 2009-01-11 15:50:59.000000000 -0500
|
||||
+++ freevo 2009-01-13 21:39:10.000000000 -0500
|
||||
@@ -156,7 +156,7 @@
|
||||
get pid of running 'name'
|
||||
"""
|
||||
_debug_('getpid(name=%r, arg=%r)' % (name, arg))
|
||||
- for fname in ('/var/run/' + name + '-%s.pid' % os.getuid(),
|
||||
+ for fname in ('/var/run/freevo/' + name + '-%s.pid' % os.getuid(),
|
||||
'/tmp/' + name + '-%s.pid' % os.getuid()):
|
||||
if os.path.isfile(fname):
|
||||
f = open(fname)
|
||||
@@ -259,7 +259,7 @@
|
||||
if pid:
|
||||
if store:
|
||||
try:
|
||||
- f = open('/var/run/' + name + '-%s.pid' % os.getuid(), 'w')
|
||||
+ f = open('/var/run/freevo/' + name + '-%s.pid' % os.getuid(), 'w')
|
||||
except (OSError, IOError):
|
||||
f = open('/tmp/' + name + '-%s.pid' % os.getuid(), 'w')
|
||||
|
@ -1,61 +0,0 @@
|
||||
--- local_conf.py.example Mon Jan 24 00:04:02 2005
|
||||
+++ local_conf.py.example Tue Sep 20 20:24:12 2005
|
||||
@@ -92,6 +92,15 @@
|
||||
# ENABLE_SHUTDOWN_SYS = 0
|
||||
|
||||
#
|
||||
+# FreeBSD shutdown-specific options.
|
||||
+#
|
||||
+# SHUTDOWN_SYS_CMD = '/sbin/shutdown -p now'
|
||||
+# RESTART_SYS_CMD = '/sbin/shutdown -r now'
|
||||
+#
|
||||
+# You might consider installing sudo and having:
|
||||
+# SHUTDOWN_SYS_CMD = '/usr/local/bin/sudo /sbin/...'
|
||||
+
|
||||
+#
|
||||
# You can add more keybindings by adding them to the correct hash.
|
||||
# e.g. If you want to send 'contrast -100' to mplayer by pressing the '1' key,
|
||||
# just add the following line:
|
||||
@@ -126,6 +135,7 @@
|
||||
# Freevo can write to.
|
||||
#
|
||||
# OVERLAY_DIR = os.path.join(FREEVO_CACHEDIR, 'vfs')
|
||||
+OVERLAY_DIR = os.path.join(FREEVO_CACHEDIR, 'vfs')
|
||||
|
||||
#
|
||||
# Umask setting for all files.
|
||||
@@ -133,6 +143,7 @@
|
||||
# installation with different users, set this to 002
|
||||
#
|
||||
# UMASK = 022
|
||||
+UMASK = 002
|
||||
|
||||
#
|
||||
# Suffix for playlist files
|
||||
@@ -195,6 +206,18 @@
|
||||
# Enable this for joystick support:
|
||||
# plugin.activate('joy')
|
||||
|
||||
+#
|
||||
+# Extra FreeBSD default plugins (all detailed on the Freevo Wiki's
|
||||
+# PluginInfo page):
|
||||
+plugin.activate('idlebar')
|
||||
+#plugin.activate('idlebar.mail')
|
||||
+plugin.activate('idlebar.tv')
|
||||
+#plugin.activate('idlebar.weather', level=30, args=('CODE'))
|
||||
+plugin.activate('idlebar.clock')
|
||||
+plugin.activate('idlebar.cdstatus')
|
||||
+plugin.activate('idlebar.holidays')
|
||||
+plugin.activate('idlebar.sensors')
|
||||
+
|
||||
# ======================================================================
|
||||
# Freevo directory settings:
|
||||
# ======================================================================
|
||||
@@ -231,6 +254,7 @@
|
||||
# Smart sorting ignores the word "The" in item names.
|
||||
#
|
||||
# DIRECTORY_SMART_SORT = 0
|
||||
+DIRECTORY_SMART_SORT = 1
|
||||
|
||||
#
|
||||
# Should Freevo autoplay an item if only one item is in the directory?
|
11
multimedia/freevo/files/patch-src-plugins-autoshutdown.py
Normal file
11
multimedia/freevo/files/patch-src-plugins-autoshutdown.py
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/plugins/autoshutdown.py.orig 2008-03-22 07:42:02.000000000 -0400
|
||||
+++ src/plugins/autoshutdown.py 2009-01-13 21:39:21.000000000 -0500
|
||||
@@ -632,7 +632,7 @@
|
||||
@returns: True/False
|
||||
"""
|
||||
_debug_('__is_recordserver_remote()', 2)
|
||||
- if len(glob.glob('/var/run/recordserver*.pid')) > 0:
|
||||
+ if len(glob.glob('/var/run/freevo/recordserver*.pid')) > 0:
|
||||
return False
|
||||
elif len(glob.glob('/tmp/recordserver*.pid')) > 0:
|
||||
return False
|
@ -1,11 +0,0 @@
|
||||
--- src/plugins/rom_drives.py.orig Sun Oct 16 18:18:49 2005
|
||||
+++ src/plugins/rom_drives.py Sun Feb 26 17:59:30 2006
|
||||
@@ -70,7 +70,7 @@
|
||||
# FreeBSD ioctls - there is no CDROM.py...
|
||||
CDIOCEJECT = 0x20006318
|
||||
CDIOCCLOSE = 0x2000631c
|
||||
- CDIOREADTOCENTRYS = 0xc0086305
|
||||
+ CDIOREADTOCENTRYS = -1073192187
|
||||
CD_LBA_FORMAT = 1
|
||||
CD_MSF_FORMAT = 2
|
||||
CDS_NO_DISC = 1
|
11
multimedia/freevo/files/patch-src-www-configlib.py
Normal file
11
multimedia/freevo/files/patch-src-www-configlib.py
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/www/configlib.py.orig 2008-02-21 15:49:20.000000000 -0500
|
||||
+++ src/www/configlib.py 2009-01-13 21:39:28.000000000 -0500
|
||||
@@ -53,7 +53,7 @@
|
||||
"""
|
||||
get pid of running 'name'
|
||||
"""
|
||||
- for fname in ('/var/run/' + name + '-%s.pid' % os.getuid(),
|
||||
+ for fname in ('/var/run/freevo/' + name + '-%s.pid' % os.getuid(),
|
||||
'/tmp/' + name + '-%s.pid' % os.getuid()):
|
||||
if os.path.isfile(fname):
|
||||
f = open(fname)
|
25
multimedia/freevo/files/pkg-deinstall.in
Normal file
25
multimedia/freevo/files/pkg-deinstall.in
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
# warn about manually removing user/group/homedir and log/rundirs
|
||||
|
||||
user=%%FREEVO_USER%%
|
||||
group=%%FREEVO_GROUP%%
|
||||
home=%%FREEVO_HOME%%
|
||||
|
||||
if [ "$2" = "POST-DEINSTALL" ]; then
|
||||
if pw usershow "$user" >/dev/null 2>&1; then
|
||||
echo "Warning: if this is a final deinstall, remove user \"$user\" manually"
|
||||
fi
|
||||
if pw groupshow "$group" >/dev/null 2>&1; then
|
||||
echo "Warning: if this is a final deinstall, remove group \"$group\" manually"
|
||||
fi
|
||||
if [ -d "$home" ]; then
|
||||
echo "Warning: if this is a final deinstall, remove directory \"$home\" manually"
|
||||
fi
|
||||
if [ -d "/var/log/freevo" ]; then
|
||||
echo "Warning: if this is a final deinstall, remove directory \"/var/log/freevo\" manually"
|
||||
fi
|
||||
if [ -d "/var/run/freevo" ]; then
|
||||
echo "Warning: if this is a final deinstall, remove directory \"/var/run/freevo\" manually"
|
||||
fi
|
||||
fi
|
||||
|
51
multimedia/freevo/files/pkg-install.in
Normal file
51
multimedia/freevo/files/pkg-install.in
Normal file
@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
# create freevo user/group/homedir and log/rundirs
|
||||
|
||||
user=%%FREEVO_USER%%
|
||||
group=%%FREEVO_GROUP%%
|
||||
uid=%%FREEVO_UID%%
|
||||
gid=%%FREEVO_GID%%
|
||||
home=%%FREEVO_HOME%%
|
||||
|
||||
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
|
||||
if [ "$1" = "PRE-INSTALL" ]; then
|
||||
if pw groupshow "$group" 2>/dev/null; then
|
||||
echo "You already have a group \"$group\", so I will use it."
|
||||
else
|
||||
echo "Creating group \"$group\"..."
|
||||
pw groupadd $group -g $gid || exit 1
|
||||
fi
|
||||
|
||||
if pw usershow "$user" 2>/dev/null; then
|
||||
echo "You already have a user \"$user\", so I will use it."
|
||||
else
|
||||
echo "Creating user \"$user\"..."
|
||||
pw useradd $user -u $uid -g $group -d $home -s /bin/sh \
|
||||
-c "Freevo Owner" || exit 1
|
||||
fi
|
||||
|
||||
if [ -d "$home" ]; then
|
||||
echo "You already have a freevo home directory \"$home\", so I will use it."
|
||||
else
|
||||
echo "Creating freevo home directory \"$home\"..."
|
||||
mkdir -p $home
|
||||
chown $user:$group $home
|
||||
fi
|
||||
|
||||
if [ -d "/var/log/freevo" ]; then
|
||||
echo "You already have a freevo log directory \"/var/log/freevo\", so I will use it."
|
||||
else
|
||||
echo "Creating freevo log directory \"/var/log/freevo\"..."
|
||||
mkdir -p /var/log/freevo
|
||||
chown $user:$group /var/log/freevo
|
||||
fi
|
||||
|
||||
if [ -d "/var/run/freevo" ]; then
|
||||
echo "You already have a freevo log directory \"/var/run/freevo\", so I will use it."
|
||||
else
|
||||
echo "Creating freevo run directory \"/var/run/freevo\"..."
|
||||
mkdir -p /var/run/freevo
|
||||
chown $user:$group /var/run/freevo
|
||||
fi
|
||||
fi
|
@ -3,21 +3,39 @@
|
||||
Freevo is now installed. It might be a good idea to read the docs
|
||||
in %%PREFIX%%/share/doc/freevo-%%PORTVERSION%%
|
||||
|
||||
By default Freevo is configured with a single VFS in /var/db/cache.
|
||||
You can use this by adding users to the freevo group.
|
||||
***********************************************************************
|
||||
|
||||
To get up and running quickly try: freevo setup && freevo --help
|
||||
|
||||
Freevo can be configured to start on boot by using the sample
|
||||
startup script in %%PREFIX%%/etc/rc.d/freevo.sh.sample
|
||||
You will need to ensure that the directory %%FREEVO_HOME%%/tv is on
|
||||
a filesystem with lots of space. The default location may not be
|
||||
adequate. One possibility is to create a freevo TV directory on a
|
||||
suitable filesystem, then create a symlink to it from %%FREEVO_HOME%%/tv.
|
||||
|
||||
***********************************************************************
|
||||
|
||||
IMPORTANT: Freevo requires procfs to be mounted on /proc. You can
|
||||
do this by adding the following entry to your /etc/fstab:
|
||||
Freevo requires procfs to be mounted on /proc. You can do this by
|
||||
adding the following entry to your /etc/fstab:
|
||||
|
||||
proc /proc procfs rw 1 1
|
||||
proc /proc procfs rw 0 0
|
||||
|
||||
WITHOUT THIS FREEVO WILL NOT SHUT DOWN CORRECTLY!
|
||||
Without this freevo will not shut down correctly.
|
||||
|
||||
***********************************************************************
|
||||
|
||||
To get freevo up and running copy and edit:
|
||||
%%PREFIX%%/etc/freevo/local_conf.py.example
|
||||
then:
|
||||
su freevo
|
||||
freevo setup
|
||||
freevo start recordserver
|
||||
freevo start
|
||||
and also:
|
||||
freevo --help
|
||||
|
||||
Freevo can be configured to start on boot by setting the following
|
||||
variables in /etc/rc.conf:
|
||||
freevo_enable="YES" enables Freevo subsystem
|
||||
freevo_recordserver_enable="YES" starts record server
|
||||
freevo_webserver_enable="YES" starts record server
|
||||
freevo_gui_enable="YES" starts Freevo GUI
|
||||
|
||||
***********************************************************************
|
||||
|
@ -1,64 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Stolen from mail/nullmailer
|
||||
|
||||
user=freevo
|
||||
group=freevo
|
||||
home=/var/db/freevo
|
||||
|
||||
ask() {
|
||||
local question default answer
|
||||
|
||||
question=$1
|
||||
default=$2
|
||||
if [ -z "${PACKAGE_BUILDING}" ]; then
|
||||
read -p "${question} [${default}]? " answer
|
||||
fi
|
||||
if [ x${answer} = x ]; then
|
||||
answer=${default}
|
||||
fi
|
||||
echo ${answer}
|
||||
}
|
||||
|
||||
yesno() {
|
||||
local dflt question answer
|
||||
|
||||
question=$1
|
||||
dflt=$2
|
||||
while :; do
|
||||
answer=$(ask "${question}" "${dflt}")
|
||||
case "${answer}" in
|
||||
[Yy]*) return 0;;
|
||||
[Nn]*) return 1;;
|
||||
esac
|
||||
echo "Please answer yes or no."
|
||||
done
|
||||
}
|
||||
|
||||
delete_account() {
|
||||
local u g home
|
||||
|
||||
u=$1
|
||||
g=$2
|
||||
if yesno "Do you want me to remove group \"${g}\"" y; then
|
||||
pw groupdel -n ${g}
|
||||
echo "Done."
|
||||
fi
|
||||
if yesno "Do you want me to remove user \"${u}\"" y; then
|
||||
pw userdel -n ${u}
|
||||
echo "Done."
|
||||
fi
|
||||
}
|
||||
|
||||
delete_home() {
|
||||
if [ -d ${home} ]; then
|
||||
if yesno "Do you want me to remove your Freevo cache \"${home}\"" n; then
|
||||
rm -rf ${home}
|
||||
echo "Done."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
if [ x"$2" = xPOST-DEINSTALL ]; then
|
||||
delete_account ${user} ${group};
|
||||
delete_home;
|
||||
fi
|
@ -13,3 +13,4 @@ Python programming language which is very well suited for high-level
|
||||
control applications like Freevo.
|
||||
|
||||
WWW: http://freevo.sourceforge.net/
|
||||
WWW: http://opal.com/jr/freebsd/ports/multimedia/freevo/
|
||||
|
@ -1,95 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Stolen by lewiz from mail/nullmailer
|
||||
|
||||
user=freevo
|
||||
group=freevo
|
||||
uid=523
|
||||
gid=523
|
||||
home=/var/db/freevo
|
||||
perm=775
|
||||
|
||||
ask() {
|
||||
local question default answer
|
||||
|
||||
question=$1
|
||||
default=$2
|
||||
if [ -z "${PACKAGE_BUILDING}" ]; then
|
||||
read -p "${question} [${default}]? " answer
|
||||
fi
|
||||
if [ x${answer} = x ]; then
|
||||
answer=${default}
|
||||
fi
|
||||
echo ${answer}
|
||||
}
|
||||
|
||||
yesno() {
|
||||
local dflt question answer
|
||||
|
||||
question=$1
|
||||
dflt=$2
|
||||
while :; do
|
||||
answer=$(ask "${question}" "${dflt}")
|
||||
case "${answer}" in
|
||||
[Yy]*) return 0;;
|
||||
[Nn]*) return 1;;
|
||||
esac
|
||||
echo "Please answer yes or no."
|
||||
done
|
||||
}
|
||||
|
||||
creategroup() {
|
||||
if /usr/sbin/pw groupshow "${group}" 2>/dev/null; then
|
||||
echo "You already have a group \"${group}\", so I will use it."
|
||||
else
|
||||
echo "You need a group \"${group}\"."
|
||||
if ([ -n "$BATCH" ] || yesno "Would you like me to create it" y); then
|
||||
/usr/sbin/pw groupadd ${group} -g ${gid} || exit
|
||||
echo "Done."
|
||||
else
|
||||
echo "Please create it, and try again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
createuser() {
|
||||
if /usr/sbin/pw user show "${user}" 2>/dev/null; then
|
||||
echo "You already have a user \"${user}\", so I will use it."
|
||||
pw usermod "${user}" -d ${home}
|
||||
else
|
||||
echo "You need a user \"${user}\"."
|
||||
if ([ -n "$BATCH" ] || yesno "Would you like me to create it" y); then
|
||||
/usr/sbin/pw useradd ${user} -u ${uid} -g ${group} -d ${home} \
|
||||
-s /bin/sh -c "Freevo Owner" || exit
|
||||
echo "Done."
|
||||
else
|
||||
echo "Please create it, and try again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
createhome() {
|
||||
if [ -d ${home} ]; then
|
||||
echo "You already have a cache directory \"${home}\", so I will use it."
|
||||
chown ${user}:${group} ${home} # Should we recurse?
|
||||
chmod ${perm} ${home} # Should we recurse?
|
||||
else
|
||||
echo "You need a cache directory \"${home}\"."
|
||||
if ([ -n "$BATCH" ] || yesno "Would you like me to create it" y); then
|
||||
mkdir ${home}
|
||||
chown ${user}:${group} ${home}
|
||||
chmod ${perm} ${home}
|
||||
echo "Done."
|
||||
else
|
||||
echo "Please create it, and try again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
if [ x"$1" = xPRE-INSTALL ]; then
|
||||
creategroup;
|
||||
createuser;
|
||||
createhome;
|
||||
fi
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user