# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="MediaTomb is an open source (GPL) UPnP MediaServer with a nice web user interface, it allows you to stream your digital media through your home network and listen to/watch it on a variety of UPnP compatible devices." HOMEPAGE="http://www.mediatomb.cc" SRC_URI=" http://www.kazer.org/gentoo/${P}.tar.gz mirror://sourceforge/mediatomb/${P}.tar.gz" LICENSE="GNU GPL2" SLOT="0" KEYWORDS="~x86" IUSE="mysql sqlite javascript tombdebug" DEPEND="" RDEPEND="mysql? ( >=virtual/mysql-4.0 ) sqlite? ( >=dev-db/sqlite-3 ) javascript? ( dev-lang/spidermonkey )" MEDIATOMB_GROUPS="users" pkg_preinst() { enewuser mediatomb -1 /bin/bash /etc/mediatomb ${MEDIATOMB_GROUPS} || die "Problem adding mediatomb user" usermod -a -G ${MEDIATOMB_GROUPS} mediatomb export CONFIG_PROTECT="${CONFIG_PROTECT} ${ROOT}/etc/mediatomb/" } src_compile() { local myconf="--prefix=/usr $(use_enable mysql) $(use_enable sqlite) $(use_enable tombdebug)" ewarn " Building Mediatomb with config : ${myconf}" ./configure ${myconf} || die "./configure failed" emake || die "emake failed" } src_install () { newinitd ${FILESDIR}/mediatomb-0.9.0.rc mediatomb || die "Unable to handle init script" make DESTDIR=${D} install || die insinto /etc/mediatomb ; doins ${FILESDIR}/config.xml fowners -R mediatomb:users /etc/mediatomb/ } pkg_postinst() { einfo " Mediatomb as been successfully installed." einfo " You can run it using /etc/init.d/mediatomb start" einfo " Then you can browse http://:49153/" }