pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/multimedia/mediatomb PR# pkg/40290: multimedia/mediato...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c3ff11ddbc49
branches: trunk
changeset: 552521:c3ff11ddbc49
user: jmcneill <jmcneill%pkgsrc.org@localhost>
date: Mon Jan 05 12:28:32 2009 +0000
description:
PR# pkg/40290: multimedia/mediatomb doesn't install example config.xml
* Allow for rc.conf to override the user and group that the mediatomb
service uses.
* Install example config.xml to /usr/pkg/share/examples/mediatomb
* Don't clobber permissions on /var/mediatomb in PRE-INSTALL script
* Install an xdg menu shortcut that points to the mediatomb 'bookmark'
html page; since mediatomb selects a random port number at startup,
this is a quick way to connect to the local server without having to
check the log files to see what port was used this time.
* Bump PKGREVISION
diffstat:
multimedia/mediatomb/INSTALL | 8 +-
multimedia/mediatomb/Makefile | 27 +++++-
multimedia/mediatomb/PLIST | 5 +-
multimedia/mediatomb/files/config.xml.in | 109 ++++++++++++++++++++++++
multimedia/mediatomb/files/mediatomb.desktop.in | 9 +
multimedia/mediatomb/files/mediatomb.sh | 6 +-
6 files changed, 156 insertions(+), 8 deletions(-)
diffs (245 lines):
diff -r 4ee44816f2af -r c3ff11ddbc49 multimedia/mediatomb/INSTALL
--- a/multimedia/mediatomb/INSTALL Mon Jan 05 12:19:58 2009 +0000
+++ b/multimedia/mediatomb/INSTALL Mon Jan 05 12:28:32 2009 +0000
@@ -1,6 +1,6 @@
#!@SH@
#
-# $NetBSD: INSTALL,v 1.1 2008/11/03 17:04:51 tron Exp $
+# $NetBSD: INSTALL,v 1.2 2009/01/05 12:28:32 jmcneill Exp $
PKG_HOME="@PKG_HOME@"
MEDIATOMB_USER="@MEDIATOMB_USER@"
@@ -8,7 +8,9 @@
case "${STAGE}" in
PRE-INSTALL)
- ${MKDIR} -m 0750 ${PKG_HOME}
- ${CHOWN} ${MEDIATOMB_USER}:${MEDIATOMB_GROUP} ${PKG_HOME}
+ if [ ! -d ${PKG_HOME} ]; then
+ ${MKDIR} -m 0755 ${PKG_HOME}
+ ${CHOWN} ${MEDIATOMB_USER}:${MEDIATOMB_GROUP} ${PKG_HOME}
+ fi
;;
esac
diff -r 4ee44816f2af -r c3ff11ddbc49 multimedia/mediatomb/Makefile
--- a/multimedia/mediatomb/Makefile Mon Jan 05 12:19:58 2009 +0000
+++ b/multimedia/mediatomb/Makefile Mon Jan 05 12:28:32 2009 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2008/12/18 17:28:17 bjs Exp $
+# $NetBSD: Makefile,v 1.7 2009/01/05 12:28:32 jmcneill Exp $
DISTNAME= mediatomb-0.11.0
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= multimedia
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mediatomb/}
@@ -13,6 +13,7 @@
USE_LANGUAGES+= c c++
USE_TOOLS+= pkg-config
+USE_DIRS+= xdg-1.4
RCD_SCRIPTS= mediatomb
@@ -24,9 +25,31 @@
PKG_GECOS.${MEDIATOMB_USER}= MediaTomb Server
PKG_HOME.${MEDIATOMB_USER}= ${VARBASE}/mediatomb
+PKG_SYSCONFSUBDIR= mediatomb
+EGDIR= ${PREFIX}/share/examples/mediatomb
+CONF_FILES_PERMS+= ${EGDIR}/config.xml ${PKG_SYSCONFDIR}/config.xml \
+ ${MEDIATOMB_USER} ${MEDIATOMB_GROUP} 0644
+
FILES_SUBST+= PKG_HOME=${PKG_HOME.${MEDIATOMB_USER}:Q}
FILES_SUBST+= MEDIATOMB_GROUP=${MEDIATOMB_GROUP:Q}
FILES_SUBST+= MEDIATOMB_USER=${MEDIATOMB_USER:Q}
+FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
+
+MEDIATOMB_HOME= ${PKG_HOME.${MEDIATOMB_USER}}
+
+SUBST_CLASSES+= config
+SUBST_FILES.config= config.xml mediatomb.desktop
+SUBST_VARS.config= MEDIATOMB_HOME PREFIX OPSYS
+SUBST_STAGE.config= post-patch
+
+post-extract:
+ ${CP} ${FILESDIR}/config.xml.in ${WRKSRC}/config.xml
+ ${CP} ${FILESDIR}/mediatomb.desktop.in ${WRKSRC}/mediatomb.desktop
+
+post-install:
+ ${INSTALL_DATA_DIR} ${EGDIR}
+ ${INSTALL_DATA} ${WRKSRC}/config.xml ${EGDIR}/config.xml
+ ${INSTALL_DATA} ${WRKSRC}/mediatomb.desktop ${PREFIX}/share/applications/mediatomb.desktop
PREFER.bind= pkgsrc # we need the package for the lwres lib
diff -r 4ee44816f2af -r c3ff11ddbc49 multimedia/mediatomb/PLIST
--- a/multimedia/mediatomb/PLIST Mon Jan 05 12:19:58 2009 +0000
+++ b/multimedia/mediatomb/PLIST Mon Jan 05 12:28:32 2009 +0000
@@ -1,6 +1,8 @@
-@comment $NetBSD: PLIST,v 1.2 2008/11/03 17:04:51 tron Exp $
+@comment $NetBSD: PLIST,v 1.3 2009/01/05 12:28:32 jmcneill Exp $
bin/mediatomb
man/man1/mediatomb.1
+share/applications/mediatomb.desktop
+share/examples/mediatomb/config.xml
share/examples/rc.d/mediatomb
share/mediatomb/js/common.js
share/mediatomb/js/import.js
@@ -96,3 +98,4 @@
@dirrm share/mediatomb/web
@dirrm share/mediatomb/js
@dirrm share/mediatomb
+@dirrm share/examples/mediatomb
diff -r 4ee44816f2af -r c3ff11ddbc49 multimedia/mediatomb/files/config.xml.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/mediatomb/files/config.xml.in Mon Jan 05 12:28:32 2009 +0000
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<config version="1" xmlns="http://mediatomb.cc/config/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/config/1 http://mediatomb.cc/config/1.xsd">
+ <server>
+ <ui enabled="yes">
+ <accounts enabled="no" session-timeout="30">
+ <account user="mediatomb" password="mediatomb"/>
+ </accounts>
+ </ui>
+ <name>MediaTomb (@OPSYS@)</name>
+ <udn/>
+ <home>@MEDIATOMB_HOME@/.</home>
+ <webroot>@PREFIX@/share/mediatomb/web</webroot>
+ <storage>
+ <sqlite3 enabled="yes">
+ <database-file>mediatomb.db</database-file>
+ </sqlite3>
+ </storage>
+ <protocolInfo extend="no"/><!-- For PS3 support change to "yes" -->
+ <!--
+ Uncomment the lines below to get rid of jerky avi playback on the
+ DSM320 or to enable subtitles support on the DSM units
+ -->
+ <!--
+ <custom-http-headers>
+ <add header="X-User-Agent: redsonic"/>
+ </custom-http-headers>
+
+ <manufacturerURL>redsonic.com</manufacturerURL>
+ <modelNumber>105</modelNumber>
+ -->
+ <!-- Uncomment the line below if you have a Telegent TG100 -->
+ <!--
+ <upnp-string-limit>101</upnp-string-limit>
+ -->
+ </server>
+ <import hidden-files="no">
+ <scripting script-charset="UTF-8">
+ <common-script>/usr/pkg/share/mediatomb/js/common.js</common-script>
+ <playlist-script>/usr/pkg/share/mediatomb/js/playlists.js</playlist-script>
+ <virtual-layout type="builtin">
+ <import-script>/usr/pkg/share/mediatomb/js/import.js</import-script>
+ </virtual-layout>
+ </scripting>
+ <mappings>
+ <extension-mimetype ignore-unknown="no">
+ <map from="mp3" to="audio/mpeg"/>
+ <map from="mp4" to="video/mp4"/>
+ <map from="ogg" to="application/ogg"/>
+ <map from="asf" to="video/x-ms-asf"/>
+ <map from="asx" to="video/x-ms-asf"/>
+ <map from="wma" to="audio/x-ms-wma"/>
+ <map from="wax" to="audio/x-ms-wax"/>
+ <map from="wmv" to="video/x-ms-wmv"/>
+ <map from="wvx" to="video/x-ms-wvx"/>
+ <map from="wm" to="video/x-ms-wm"/>
+ <map from="wmx" to="video/x-ms-wmx"/>
+ <map from="m3u" to="audio/x-mpegurl"/>
+ <map from="pls" to="audio/x-scpls"/>
+ <map from="flv" to="video/x-flv"/>
+ <!-- Uncomment the line below for PS3 divx support -->
+ <!-- <map from="avi" to="video/x-divx"/> -->
+ <!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
+ <!-- <map from="avi" to="video/avi"/> -->
+ </extension-mimetype>
+ <mimetype-upnpclass>
+ <map from="audio/*" to="object.item.audioItem.musicTrack"/>
+ <map from="video/*" to="object.item.videoItem"/>
+ <map from="image/*" to="object.item.imageItem"/>
+ </mimetype-upnpclass>
+ <mimetype-contenttype>
+ <treat mimetype="audio/mpeg" as="mp3"/>
+ <treat mimetype="application/ogg" as="ogg"/>
+ <treat mimetype="audio/x-flac" as="flac"/>
+ <treat mimetype="image/jpeg" as="jpg"/>
+ <treat mimetype="audio/x-mpegurl" as="playlist"/>
+ <treat mimetype="audio/x-scpls" as="playlist"/>
+ <treat mimetype="audio/x-wav" as="pcm"/>
+ <treat mimetype="audio/L16" as="pcm"/>
+ <treat mimetype="video/x-msvideo" as="avi"/>
+ </mimetype-contenttype>
+ </mappings>
+ </import>
+ <transcoding enabled="no">
+ <mimetype-profile-mappings>
+ <transcode mimetype="video/x-flv" using="vlcmpeg"/>
+ <transcode mimetype="application/ogg" using="vlcmpeg"/>
+ <transcode mimetype="application/ogg" using="oggflac2raw"/>
+ <transcode mimetype="audio/x-flac" using="oggflac2raw"/>
+ </mimetype-profile-mappings>
+ <profiles>
+ <profile name="oggflac2raw" enabled="no" type="external">
+ <mimetype>audio/L16</mimetype>
+ <accept-url>no</accept-url>
+ <first-resource>yes</first-resource>
+ <accept-ogg-theora>no</accept-ogg-theora>
+ <agent command="ogg123" arguments="-d raw -f %out %in"/>
+ <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
+ </profile>
+ <profile name="vlcmpeg" enabled="no" type="external">
+ <mimetype>video/mpeg</mimetype>
+ <accept-url>yes</accept-url>
+ <first-resource>yes</first-resource>
+ <accept-ogg-theora>yes</accept-ogg-theora>
+ <agent command="vlc" arguments="-I dummy %in --sout
#transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit"/>
+ <buffer size="14400000" chunk-size="512000" fill-size="120000"/>
+ </profile>
+ </profiles>
+ </transcoding>
+</config>
diff -r 4ee44816f2af -r c3ff11ddbc49 multimedia/mediatomb/files/mediatomb.desktop.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/mediatomb/files/mediatomb.desktop.in Mon Jan 05 12:28:32 2009 +0000
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=MediaTomb
+Comment=MediaTomb UPnP MediaServer web interface
+Exec=@PREFIX@/bin/gnome-open @MEDIATOMB_HOME@/mediatomb.html
+Icon=@PREFIX@/share/mediatomb/web/icons/mt-icon120.png
+Terminal=false
+Categories=Application;AudioVideo;
+Type=Application
+Encoding=UTF-8
diff -r 4ee44816f2af -r c3ff11ddbc49 multimedia/mediatomb/files/mediatomb.sh
--- a/multimedia/mediatomb/files/mediatomb.sh Mon Jan 05 12:19:58 2009 +0000
+++ b/multimedia/mediatomb/files/mediatomb.sh Mon Jan 05 12:28:32 2009 +0000
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: mediatomb.sh,v 1.1 2008/11/03 17:04:51 tron Exp $
+# $NetBSD: mediatomb.sh,v 1.2 2009/01/05 12:28:32 jmcneill Exp $
#
# PROVIDE: mediatomb
@@ -10,10 +10,12 @@
name="mediatomb"
rcvar=$name
+load_rc_config_var mediatomb_username mediatomb_username
+load_rc_config_var mediatomb_groupname mediatomb_groupname
command="@PREFIX@/bin/mediatomb"
logfile="@VARBASE@/log/${name}.log"
pidfile="@PKG_HOME@/${name}.pid"
-command_args="-d -u @MEDIATOMB_USER@ -g @MEDIATOMB_USER@ -m @PKG_HOME@ -P ${pidfile} -l ${logfile} -f ."
+command_args="-d -u ${mediatomb_username:-@MEDIATOMB_USER@} -g ${mediatomb_groupname:-@MEDIATOMB_USER@} -m @PKG_HOME@ -P ${pidfile} -l ${logfile} -c @PKG_SYSCONFDIR@/config.xml"
extra_commands="reload"
if [ -f /etc/rc.subr ]; then
Home |
Main Index |
Thread Index |
Old Index