# 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="dbus dlna +faad +flac +imagemagick iptc +lame +mad mp4 musepack mysql +notify +taglib +thumbnail +transcode tremor +twolame +vorbis" DEPEND="dlna? ( media-libs/libdlna ) imagemagick? ( media-gfx/imagemagick ) transcode? ( media-video/ffmpeg ) " RDEPEND="${DEPEND} dbus? ( sys-apps/dbus ) faad? ( media-libs/faad2 ) flac? ( media-libs/flac ) iptc? ( media-gfx/exiv2 ) lame? ( media-sound/lame ) mad? ( media-libs/libmad ) mp4? ( media-libs/libmp4v2 ) musepack? ( media-sound/musepack-tools ) mysql? ( virtual/mysql ) notify? ( x11-libs/libnotify ) taglib? ( media-libs/taglib ) thumbnail? ( media-video/ffmpegthumbnailer ) twolame? ( media-sound/twolame ) vorbis? ( media-libs/libvorbis ) virtual/libiconv >=dev-db/sqlite-3.2 dev-libs/libpcre dev-libs/libxml2 sys-devel/gettext " pkg_setup() { enewgroup fuppes enewuser fuppes -1 -1 /dev/null mediatomb } src_unpack() { subversion_src_unpack cd "${S}" epatch "${FILESDIR}/update_includes-9999.patch" 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 flac) \ $(use_enable imagemagick magickwand) \ $(use_enable iptc exiv2) \ $(use_enable lame) \ $(use_enable mad) \ $(use_enable mp4 mp4v2) \ $(use_enable musepack) \ $(use_enable notify inotify) \ $(use_enable taglib) \ $(use_enable thumbnail ffmpegthumbnailer) \ $(use_enable transcode transcoder-ffmpeg) \ $(use_enable tremor) \ $(use_enable twolame) \ $(use_enable vorbis) \ ${myconf} || die "configure failed" } src_compile() { emake || die "Make failed!" } src_install() { local b 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" # copy original vfolders and devices folder and set permissions for b in vfolders devices ; do insinto /etc/${PN}/ insopts -m 0664 -o root -g ${PN} doins -r "${S}/config/${b}" || die "sample ${b} install failed" fowners root:${PN} /etc/${PN}/${b} done } 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/" }