summaryrefslogtreecommitdiff
blob: 36a47a23a522378d22112abf9e6e77a81f52f336 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-video/noad/noad-0.6.0-r5.ebuild,v 1.3 2006/11/09 10:51:52 zzam Exp $

WANT_AUTOMAKE="latest"
WANT_AUTOCONF="latest"

inherit eutils autotools

DESCRIPTION="Mark commercial Breaks in VDR records"
HOMEPAGE="http://www.freepgs.com/noad/"
SRC_URI="http://www.freepgs.com/${PN}/${P}.tar.bz2
		mirror://vdrfiles/${PN}/${P}.tar.bz2"

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

DEPEND="media-libs/libmpeg2
	media-video/vdr
	ffmpeg? ( >=media-video/ffmpeg-0.4.8 )
	imagemagick? ( >=media-gfx/imagemagick-6.2.4.2-r1 )"
RDEPEND=">=media-tv/gentoo-vdr-scripts-0.3.5"

src_unpack() {

	unpack ${A}
	cd ${S}

	epatch ${FILESDIR}/${P}-directoryfix.diff
	epatch ${FILESDIR}/${P}-as-needed.diff
	epatch ${FILESDIR}/${P}-cflags.diff
	epatch ${FILESDIR}/${P}-framesize.diff
	epatch ${FILESDIR}/${P}-delete-while-scanning.diff

	rm configure
	eautoreconf
}

src_compile() {

	econf \
		$(use_with ffmpeg) \
		$(use_with imagemagick magick) \
		--with-tools \
		--with-mpeginclude=/usr/include/mpeg2dec

	emake || die "emake faild"
}

src_install() {

	dobin noad showindex
	use imagemagick && dobin markpics

	dodoc COPYING README INSTALL
	# example scripts are installed as dokumentation
	dodoc allnewnoad allnoad allnoadnice clearlogos noadifnew stat2html

	CONF_SOURCE=${FILESDIR}/0.6.0-r5
	insinto /etc/conf.d
	newins ${CONF_SOURCE}/confd_vdraddon.noad vdraddon.noad

	insinto /usr/share/vdr/record
	doins ${CONF_SOURCE}/record-50-noad.sh

	insinto /etc/vdr/reccmds
	doins ${CONF_SOURCE}/reccmds.noad.conf

	exeinto /usr/share/vdr/bin
	doexe ${CONF_SOURCE}/noad-reccmd
}

pkg_postinst() {

	einfo
	einfo "Congratulations, you have just installed noad!,"
	einfo "To integrate noad in VDR you should do this:"
	einfo
	einfo "start and set Parameter in /etc/conf.d/vdraddon.noad"
	einfo
	einfo "Note: You can use here all pararmeters for noad,"
	einfo "please look in the documentation of noad."
	einfo
}