]> Pileus Git - ~andy/sunrise/blob - media-sound/davemp/davemp-1.23-r1.ebuild
a4d9b3f0b9eb60c2d4b28e161d7e3f1e02dfb9d4
[~andy/sunrise] / media-sound / davemp / davemp-1.23-r1.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=2
6
7 inherit eutils multilib
8
9 DESCRIPTION="Lightweight low-dependency web interface to mpd"
10 HOMEPAGE="http://ion0.com/davemp/"
11 SRC_URI="http://ion0.com/davemp/downloads/files/${P}.tar.gz"
12
13 LICENSE="CCPL-Attribution-ShareAlike-NonCommercial-2.5"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE=""
17
18 RDEPEND="dev-perl/JSON-XS
19         dev-perl/HTTP-Server-Simple
20         dev-perl/Class-Accessor"
21
22 src_prepare() {
23         epatch "${FILESDIR}"/${P}-run-in-foreground.diff
24         epatch "${FILESDIR}"/${P}-json-fix.diff
25         sed -i -e 's@themeroot = ./themes@themeroot=/usr/share/davemp/themes@' davemp.conf || die
26         sed -i -e "s@use lib './lib'@use lib '/usr/$(get_libdir)/davemp/'@" davempd.pl || die
27 }
28
29 src_install() {
30         dobin davempd.pl || die
31         doinitd "${FILESDIR}"/davemp || die
32         dodoc README Changelog || die
33
34         insinto /usr/share/${PN}
35         doins -r themes || die
36         insinto /usr/$(get_libdir)/${PN}
37         doins -r lib/* || die
38         insinto /etc
39         doins davemp.conf || die
40 }
41
42 pkg_postinst() {
43         enewuser mpd "" "" "/var/lib/mpd" audio
44 }