summaryrefslogtreecommitdiff
blob: da819c2dd0db533ea69fcc3e9b7a8bd3941945bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

MY_P="mplay-${PV}"

DESCRIPTION="mplayer wrapper script as backend for vdr-mplayer"
HOMEPAGE="https://www.vdr-portal.de/board/thread.php?threadid=62306"
SRC_URI="mirror://gentoo/${MY_P}.tgz
	https://dev.gentoo.org/~zzam/distfiles/${MY_P}.tgz"
S=${WORKDIR}/${MY_P}

KEYWORDS="~amd64 x86"
SLOT="0"
LICENSE="GPL-2"
IUSE=""

# for vdr user?
DEPEND="media-tv/gentoo-vdr-scripts"
RDEPEND="${DEPEND}
	>=media-video/mplayer-0.90_rc4"

src_prepare() {
	default

	sed -i mplay.sh \
		-e 's#$CONFDIR/silence.wav#/usr/share/vdr/mplay-sh/silence.wav#' || die
	sed -i conf.examples/mplayrc \
		-e 's#^MPLAY_PLAY.*#MPLAY_PLAY="/var/vdr/tmp/mplay.play"#' || die
}

src_install() {
	exeinto /usr/share/vdr/mplayer/bin
	doexe mplay.sh

	insinto /etc/vdr/plugins/mplay
	doins conf.examples/*.conf conf.examples/mplayrc

	insinto /usr/share/vdr/mplay-sh
	doins conf.examples/silence.wav

	dodoc HISTORY README*

	keepdir /var/vdr/tmp
	fowners -R vdr:vdr /var/vdr
}