summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2008-03-27 17:32:58 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2008-03-27 17:32:58 +0000
commit4e5d7e4d72333c8e3bb7f51b52bb2779bbee4cfd (patch)
treec787cd1a96f29eafb4b01d54e9f456d782480a13 /net-misc/mediatomb
parentStable on ppc wrt bug 214758 (diff)
downloadgentoo-2-4e5d7e4d72333c8e3bb7f51b52bb2779bbee4cfd.tar.gz
gentoo-2-4e5d7e4d72333c8e3bb7f51b52bb2779bbee4cfd.tar.bz2
gentoo-2-4e5d7e4d72333c8e3bb7f51b52bb2779bbee4cfd.zip
Initial import of mediatomb, an UPnP media server compatible with Sony PlayStation 3. Thanks to BT in bug #172799 for the ebuild.
(Portage version: 2.1.4.4)
Diffstat (limited to 'net-misc/mediatomb')
-rw-r--r--net-misc/mediatomb/ChangeLog13
-rw-r--r--net-misc/mediatomb/Manifest8
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.11.0-newffmpeg.patch77
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.11.0.config68
-rw-r--r--net-misc/mediatomb/files/mediatomb.confd32
-rw-r--r--net-misc/mediatomb/files/mediatomb.initd22
-rw-r--r--net-misc/mediatomb/mediatomb-0.11.0.ebuild121
-rw-r--r--net-misc/mediatomb/metadata.xml20
8 files changed, 361 insertions, 0 deletions
diff --git a/net-misc/mediatomb/ChangeLog b/net-misc/mediatomb/ChangeLog
new file mode 100644
index 000000000000..26741975bb3b
--- /dev/null
+++ b/net-misc/mediatomb/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for net-misc/mediatomb
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/mediatomb/ChangeLog,v 1.1 2008/03/27 17:32:57 flameeyes Exp $
+
+*mediatomb-0.11.0 (27 Mar 2008)
+
+ 27 Mar 2008; Diego Pettenò <flameeyes@gentoo.org>
+ +files/mediatomb-0.11.0-newffmpeg.patch, +files/mediatomb-0.11.0.config,
+ +files/mediatomb.confd, +files/mediatomb.initd, +metadata.xml,
+ +mediatomb-0.11.0.ebuild:
+ Initial import of mediatomb, an UPnP media server compatible with Sony
+ PlayStation 3. Thanks to BT in bug #172799 for the ebuild.
+
diff --git a/net-misc/mediatomb/Manifest b/net-misc/mediatomb/Manifest
new file mode 100644
index 000000000000..cc2c58d0c30b
--- /dev/null
+++ b/net-misc/mediatomb/Manifest
@@ -0,0 +1,8 @@
+AUX mediatomb-0.11.0-newffmpeg.patch 2410 RMD160 112b1683bc86325e5584b9e7089f46d4a218d8fc SHA1 4af90200a3cf0a07ce47ea42b6b398002f3d99c1 SHA256 7566cd01d9af848bdfd75949bb586b9a83bb6b9501fe9dba921e93960e2f2fdb
+AUX mediatomb-0.11.0.config 2739 RMD160 0f6d8108052d19940e7f5d2288c9027aa2976dc6 SHA1 2c8bfdf7d370ca7782a930d8ef70a242a2942d37 SHA256 0c02298dd2078fed683dad661d933c1f7e43086c77999bf651065ec40ea762c4
+AUX mediatomb.confd 857 RMD160 66c19ff63accb09048250daa94b7fdea208616fa SHA1 3ab51654efbb89aa9a8beb5ca47170ba86fd1320 SHA256 9d8b7e044f9ac684b33ea2ac97ddcfb2c038cb5038d4149e11441d5e24d7d92d
+AUX mediatomb.initd 576 RMD160 e92a6f915eb6d1a0fff1e82a74004ed8a430d503 SHA1 d2c7f0e7e86d8e7add10566d1928b45a953ce39b SHA256 f9f53683b6a6ad11ee1aab2cb8c604cd6639872c1abe36bf5d7006ffbbd7ca14
+DIST mediatomb-0.11.0.tar.gz 1059429 RMD160 11c53d5757da3a689c025107331526c0486befc4 SHA1 1d7c86924686f9999a359ba96092aa36d30832a6 SHA256 25e0b3d761e41fc6793c780eb7f638719867cdc6d3429ec24f72d1e9556ac1d2
+EBUILD mediatomb-0.11.0.ebuild 3293 RMD160 5e518ae065232438408b6fb752aa0bc827ce3103 SHA1 81caa7573e04374ea36b53f677cbaee1be06a91e SHA256 b7b80620b89e9fe5e600c8aac7925aa198e162df2bd31b69debca01000812928
+MISC ChangeLog 508 RMD160 18ce96c8c48eeb5107cf5fccfb9f34bd460419e9 SHA1 979792fec3a4ab702eb08d648db19752b65270db SHA256 294a6d768bec50b62b3d7846830474a6aed1e52ff78842b199f5c393a3aee3d2
+MISC metadata.xml 623 RMD160 6a46a6c1d59c37245d655795c94ad4379298f504 SHA1 feeea1de414c53e60e497a30799ea11c13515743 SHA256 14ff654aaebcc7efb5ea25c210a93c7b709fbd598b3de497fc804bf8ee99ba75
diff --git a/net-misc/mediatomb/files/mediatomb-0.11.0-newffmpeg.patch b/net-misc/mediatomb/files/mediatomb-0.11.0-newffmpeg.patch
new file mode 100644
index 000000000000..e18a161cb05b
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.11.0-newffmpeg.patch
@@ -0,0 +1,77 @@
+Index: mediatomb-0.11.0/configure.ac
+===================================================================
+--- mediatomb-0.11.0.orig/configure.ac
++++ mediatomb-0.11.0/configure.ac
+@@ -2340,9 +2340,14 @@ if test "x$FFMPEG_OK" = xyes; then
+ ]
+ )
+ else
+- AC_CHECK_HEADER(ffmpeg/avformat.h,
+- [],
++ AC_CHECK_HEADERS([ffmpeg/avformat.h libavformat/avformat.h],
++ [ffmpeg_found=yes; break;], [],
+ [
++ #define __STDC_CONSTANT_MACROS
++ #include <stdint.h>
++ ]
++ )
++ if test "x$ffmpeg_found" != "xyes"; then
+ CPPFLAGS="-I$SEARCH_DIR_HEADERS"
+ unset ac_cv_header_ffmpeg_avformat_h
+ AC_CHECK_HEADER($SEARCH_DIR_HEADERS/ffmpeg/avformat.h,
+@@ -2357,12 +2362,7 @@ if test "x$FFMPEG_OK" = xyes; then
+ #include <stdint.h>
+ ]
+ )
+- ],
+- [
+- #define __STDC_CONSTANT_MACROS
+- #include <stdint.h>
+- ]
+- )
++ fi
+ fi
+ fi
+
+@@ -2447,7 +2447,11 @@ if test "x$FFMPEG_OK" = xyes; then
+ [
+ #define __STDC_CONSTANT_MACROS
+ #include <stdint.h>
++ #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
++ #include <libavformat/avformat.h>
++ #else
+ #include <ffmpeg/avformat.h>
++ #endif
+ ],
+ [
+ av_register_all();
+@@ -2462,7 +2466,11 @@ if test "x$FFMPEG_OK" = xyes; then
+ #define __STDC_CONSTANT_MACROS
+ #include <stdint.h>
+ extern "C" {
+- #include <ffmpeg/avformat.h>
++ #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
++ #include <libavformat/avformat.h>
++ #else
++ #include <ffmpeg/avformat.h>
++ #endif
+ }
+ ],
+ [
+Index: mediatomb-0.11.0/src/metadata/ffmpeg_handler.cc
+===================================================================
+--- mediatomb-0.11.0.orig/src/metadata/ffmpeg_handler.cc
++++ mediatomb-0.11.0/src/metadata/ffmpeg_handler.cc
+@@ -56,7 +56,11 @@ extern "C"
+ {
+ #endif
+
+-#include <ffmpeg/avformat.h>
++#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
++# include <libavformat/avformat.h>
++#else
++# include <ffmpeg/avformat.h>
++#endif
+
+ #ifdef FFMPEG_NEEDS_EXTERN_C
+ } // extern "C"
diff --git a/net-misc/mediatomb/files/mediatomb-0.11.0.config b/net-misc/mediatomb/files/mediatomb-0.11.0.config
new file mode 100644
index 000000000000..21eb366e4d48
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.11.0.config
@@ -0,0 +1,68 @@
+<?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</name>
+ <udn></udn>
+ <home>/var/lib/mediatomb</home>
+ <webroot>/usr/share/mediatomb/web</webroot>
+ <storage>
+ <sqlite3 enabled="yes">
+ <database-file>mediatomb.db</database-file>
+ </sqlite3>
+ <mysql enabled="no">
+ <host>localhost</host>
+ <database>mediatomb</database>
+ <username>mediatomb</username>
+ <password>mediatomb</password>
+ </mysql>
+ </storage>
+ <protocolInfo extend="no"/>
+ </server>
+ <import hidden-files="no">
+ <scripting script-charset="UTF-8">
+ <common-script>/usr/share/mediatomb/js/common.js</common-script>
+ <playlist-script>/usr/share/mediatomb/js/playlists.js</playlist-script>
+ <virtual-layout type="builtin">
+ <import-script>/usr/share/mediatomb/js/import.js</import-script>
+ </virtual-layout>
+ </scripting>
+ <mappings>
+ <extension-mimetype ignore-unknown="no">
+ <map from="mp3" to="audio/mpeg"/>
+ <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"/>
+ </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>
+</config>
diff --git a/net-misc/mediatomb/files/mediatomb.confd b/net-misc/mediatomb/files/mediatomb.confd
new file mode 100644
index 000000000000..22fc21bd55cb
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb.confd
@@ -0,0 +1,32 @@
+# /etc/conf.d/mediatomb: config file for /etc/init.d/mediatomb
+
+# See the mediatomb(1) manpage for more info.
+
+# MediaTomb Web UI port.
+# NOTE: The minimum value allowed is 49152
+MEDIATOMB_PORT=49152
+
+# Bind MediaTomb to this interface
+MEDIATOMB_INTERFACE="eth0"
+
+# Run MediaTomb as this user.
+# NOTE: It is not recommended to run MediaTomb as root for
+# security reasons.
+MEDIATOMB_USER="mediatomb"
+
+# Run MediaTomb as this group.
+# NOTE: It is not recommended to run MediaTomb as root for
+# security reasons.
+MEDIATOMB_GROUP="mediatomb"
+
+# Path to MediaTomb config file.
+MEDIATOMB_CONFIG="/etc/mediatomb/config.xml"
+
+# Path to MediaTomb log file.
+MEDIATOMB_LOGFILE="/var/log/mediatomb.log"
+
+# Path to MediaTomb pid file.
+MEDIATOMB_PIDFILE="/var/run/mediatomb/mediatomb.pid"
+
+# Other options you want to pass to MediaTomb.
+MEDIATOMB_OPTIONS=""
diff --git a/net-misc/mediatomb/files/mediatomb.initd b/net-misc/mediatomb/files/mediatomb.initd
new file mode 100644
index 000000000000..12f96a4a5669
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb.initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+
+depend() {
+ need net #MYSQL#
+}
+
+start() {
+ ebegin "Starting MediaTomb"
+ start-stop-daemon --start --quiet --exec /usr/bin/mediatomb \
+ --pidfile ${MEDIATOMB_PIDFILE} -- --daemon \
+ --pidfile ${MEDIATOMB_PIDFILE} --user ${MEDIATOMB_USER} \
+ --group ${MEDIATOMB_GROUP} --logfile ${MEDIATOMB_LOGFILE} \
+ --config ${MEDIATOMB_CONFIG} --port ${MEDIATOMB_PORT} \
+ --interface ${MEDIATOMB_INTERFACE} ${MEDIATOMB_OPTIONS}
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping MediaTomb"
+ start-stop-daemon --stop --retry 10 --quiet --pidfile ${MEDIATOMB_PIDFILE}
+ eend $?
+}
diff --git a/net-misc/mediatomb/mediatomb-0.11.0.ebuild b/net-misc/mediatomb/mediatomb-0.11.0.ebuild
new file mode 100644
index 000000000000..d6beb7ac05f1
--- /dev/null
+++ b/net-misc/mediatomb/mediatomb-0.11.0.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/mediatomb/mediatomb-0.11.0.ebuild,v 1.1 2008/03/27 17:32:57 flameeyes Exp $
+
+inherit eutils autotools
+
+DESCRIPTION="MediaTomb is an open source UPnP MediaServer"
+HOMEPAGE="http://www.mediatomb.cc/"
+SRC_URI="mirror://sourceforge/mediatomb/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="curl debug exif expat ffmpeg javascript libextractor mysql taglib"
+RDEPEND="
+ mysql? ( virtual/mysql )
+ !mysql? ( >=dev-db/sqlite-3 )
+ javascript? ( dev-lang/spidermonkey )
+ expat? ( dev-libs/expat )
+ taglib? ( media-libs/taglib )
+ !taglib? ( media-libs/id3lib )
+ exif? ( media-libs/libexif )
+ libextractor? ( media-libs/libextractor )
+ ffmpeg? ( media-video/ffmpeg )
+ curl? ( net-misc/curl )
+ sys-apps/file
+ sys-libs/zlib
+ virtual/libiconv"
+DEPEND="${RDEPEND}"
+
+MEDIATOMB_HOMEDIR="/var/lib/mediatomb"
+MEDIATOMB_CONFDIR="/etc/mediatomb"
+MEDIATOMB_PIDDIR="/var/run/mediatomb"
+
+pkg_setup() {
+ # disable libextractor support if ffmpeg and libextractor use are enabled
+ if use ffmpeg && use libextractor; then
+ ewarn "ffmpeg and libextractor USE flags are enabled. libextractor support will be disabled."
+ fi
+
+ # create the mediatomb group and user
+ enewgroup mediatomb
+ enewuser mediatomb -1 -1 /dev/null mediatomb
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${P}-newffmpeg.patch"
+ eautoreconf
+}
+
+src_compile() {
+ local myconf
+
+ # disable libextractor support if ffmpeg and libextractor use are enabled
+ if use ffmpeg && use libextractor; then
+ myconf="${myconf} --enable-ffmpeg --disable-libextractor"
+ else
+ myconf="${myconf} $(use_enable ffmpeg) $(use_enable libextractor)"
+ fi
+
+ econf \
+ --prefix=/usr \
+ $(use_enable curl) \
+ $(use_enable debug tombdebug) \
+ $(use_enable exif libexif) \
+ $(use_enable expat) \
+ $(use_enable javascript libjs) \
+ $(use_enable mysql) $(use_enable !mysql sqlite3) \
+ $(use_enable taglib) $(use_enable !taglib id3lib) \
+ --enable-external-transcoding \
+ --enable-libmagic \
+ --enable-protocolinfo-extension \
+ ${myconf} \
+ || die "Configure failed!"
+
+ emake || die "Make failed!"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Install failed!"
+
+ dodoc AUTHORS ChangeLog NEWS README TODO
+
+ sed -e "s:#MYSQL#:$(use mysql && echo "mysql"):" \
+ "${FILESDIR}/${PN}.initd" \
+ > "${T}/mediatomb.initd"
+ newinitd "${T}/mediatomb.initd" mediatomb
+ newconfd "${FILESDIR}/${PN}.confd" mediatomb
+
+ insinto "${MEDIATOMB_CONFDIR}"
+ newins "${FILESDIR}/${P}.config" config.xml
+ fperms 0600 "${MEDIATOMB_CONFDIR}/config.xml"
+ fowners mediatomb:mediatomb "${MEDIATOMB_CONFDIR}/config.xml"
+
+ keepdir "${MEDIATOMB_HOMEDIR}"
+ fowners mediatomb:mediatomb "${MEDIATOMB_HOMEDIR}"
+
+ keepdir "${MEDIATOMB_PIDDIR}"
+ fowners mediatomb:mediatomb "${MEDIATOMB_PIDDIR}"
+}
+
+pkg_postinst() {
+ if use mysql; then
+ elog "MediaTomb has been built with MySQL support. Please"
+ elog "consult sections 4.2.2 and 6.1 of the MediaTomb"
+ elog "documentation for information on configuring MediaTomb"
+ elog "with MySQL. http://mediatomb.cc/pages/documentation"
+ elog
+ fi
+
+ elog "The MediaTomb Web UI can be reached at:"
+ elog "http://localhost:49152/"
+ elog
+ elog "To start MediaTomb:"
+ elog "/etc/init.d/mediatomb start"
+ elog
+ elog "To start MediaTomb at boot:"
+ elog "rc-update add mediatomb default"
+}
diff --git a/net-misc/mediatomb/metadata.xml b/net-misc/mediatomb/metadata.xml
new file mode 100644
index 000000000000..3bc284f1188d
--- /dev/null
+++ b/net-misc/mediatomb/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>video</herd>
+<maintainer>
+ <email>flameeyes@gentoo.org</email>
+</maintainer>
+<use>
+ <flag name="taglib">
+ Use <pkg>media-libs/taglib</pkg> for reading files' metadata
+ rather than id3lib. If this USE flag is disabled
+ <pkg>media-libs/id3lib</pkg> is used in its stead.
+ </flag>
+ <flag name="mysql">
+ Use <pkg>dev-db/mysql</pkg> as backend rather than SQLite3. If
+ this USE flag is disabled, <pkg>dev-db/sqlite</pkg> is used in its
+ stead.
+ </flag>
+</use>
+</pkgmetadata>