summaryrefslogtreecommitdiff
blob: be5e87c591967a9e3f0676caf74e97ad6c1af7b2 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-tv/dvbstream/dvbstream-0.7_pre20080516.ebuild,v 1.3 2012/04/29 15:01:15 tomka Exp $

inherit eutils

IUSE=""

DESCRIPTION="simple command line tools for DVB cards. Includes a RTP multicast stream server"
HOMEPAGE="http://sourceforge.net/projects/dvbtools"

#SRC_URI="mirror://sourceforge/dvbtools/${P}.tar.gz"
#MY_P=${PN}-snapshot-${PV##*_pre}
MY_P=${PN}-snapshot-20080302
SRC_URI="mirror://gentoo/${MY_P}.tar.bz2"

S="${WORKDIR}/${PN}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86"

RDEPEND="dev-lang/perl"
DEPEND="virtual/linuxtv-dvb-headers"

src_unpack() {
	unpack ${A}

	cd "${S}"
	epatch "${FILESDIR}/${P}-update.diff"
	epatch "${FILESDIR}/${PN}-0.7_pre20080302-telnet-port-switch.diff"

	cd "${S}"
	sed -i Makefile \
		-e 's:$(CFLAGS):$(CFLAGS) $(CPPFLAGS):' \
		-e '/CFLAGS.*=.*-g -Wall -O2/s:-g -Wall -O2::' \
		-e '/CFLAGS.*=/s:CFLAGS:CPPFLAGS:' \
		-e 's:-I \.\./DVB/include:-I /usr/include:'

	cp TELNET/svdrpsend.pl dvbstream-send.pl
	cp TELNET/README README.telnet

	sed -e 's:\./svdrpsend.pl:dvbstream-send.pl:' \
		-i TELNET/*.sh

	sed -e 's:^DUMPRTP=.*$:DUMPRTP=dumprtp:' \
		-e 's:^TS2ES=.*$:TS2ES=ts2es:' \
		-i *.sh
}

src_install() {
	dobin dvbstream dumprtp rtpfeed ts_filter dvbstream-send.pl

	dodoc README*

	insinto /usr/share/doc/${PF}/tune
	doins TELNET/*.sh

	insinto /usr/share/doc/${PF}/multicast
	doins *.sh
}