# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 WANT_AUTOCONF=latest WANT_AUTOMAKE=latest inherit eutils linux-mod autotools subversion ESVN_REPO_URI="https://fuppes.svn.sourceforge.net/svnroot/fuppes/trunk/" DESCRIPTION="Fuppes is an open source UPnP MediaServer" HOMEPAGE="http://fuppes.ulrich-voelkel.de/" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="+transcode +imagemagick faad +flac muse lame +mad +taglib +twolame gnome notify" DEPEND="dlna? ( media-libs/libdlna ) imagemagick? ( media-gfx/imagemagick ) transcode? ( media-video/ffmpeg ) " RDEPEND="${DEPEND} faad? ( media-libs/faad2 ) flac? ( media-libs/flac ) gnome? ( gnome-base/gnome-panel ) virtual/libiconv lame? ( media-sound/lame ) mad? ( media-libs/libmad ) muse? ( media-libs/libmpcdec ) notify? ( x11-libs/libnotifiy ) taglib? ( media-libs/taglib ) twolame? ( media-sound/twolame ) >=dev-db/sqlite-3.2 dev-libs/libpcre dev-libs/libxml2 " pkg_setup() { enewgroup fuppes enewuser fuppes -1 -1 /dev/null mediatomb } src_unpack() { subversion_src_unpack eautoreconf -vfi } src_configure() { local myconf use transcode || myconf="${myconf} --disable-libavformat" use gnome && myconf="${myconf} --enable-gnome-panel-applet" econf \ --prefix=/usr \ $(use_enable faad) \ $(use_enable lame) \ $(use_enable mad) \ $(use_enable notify inotify) \ $(use_enable taglib) \ $(use_enable twolame) \ ${myconf} || die "configure failed" } src_compile() { emake || die "Make failed!" } src_install() { emake DESTDIR="${D}" install || die "Install failed!" newinitd ${FILESDIR}/fuppes-init fuppes keepdir /var/lib/${PN} keepdir /var/log/${PN} # Filename of sample.cfg - use live filename if available local sample=${PN}.cfg [[ -e "${ROOT}/etc/${PN}/${sample}" ]] && sample="${sample}.sample" insinto /etc/${PN} insopts -m 0664 -o root -g ${PN} newins "${FILESDIR}/${P}.cfg.sample" "${sample}" || die "sample fuppes.cfg install failed" # Filename of sample vfolder.cfg insinto /etc/${PN} insopts -m 0664 -o root -g ${PN} newins "vfolder.cfg" "vfolder.cfg.sample" || die "sample vfolder.cfg install failed" } pkg_postinst() { chown ${PN}:${PN} /var/lib/${PN} chown ${PN}:${PN} /var/log/${PN} elog "To start Fuppes:" elog "/etc/init.d/fuppes start" elog elog "To start Fuppes at boot:" elog "rc-update add fuppes default" elog elog "The Fuppes web interface can be reached at:" elog "http://localhost:36053/" }