summaryrefslogtreecommitdiff
blob: 9059a82223ab1bd0b439f0e0e62537e7811c4c77 (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-tv/linuxtv-dvb-apps/linuxtv-dvb-apps-1.1.0_p20050702.ebuild,v 1.5 2005/10/29 19:44:29 zzam Exp $


inherit eutils

MY_P="${PN/linuxtv-/}-snapshot-${PV/*_p/}"

IUSE="usb"
SLOT="0"
HOMEPAGE="http://www.linuxtv.org/"
DESCRIPTION="small utils for DVB to scan, zap, view signal strength, ..."
LICENSE="GPL-2"
SRC_URI="mirror://gentoo/${MY_P}.tar.bz2"
KEYWORDS="~amd64 x86"
S=${WORKDIR}/${MY_P}

DEPEND="usb? ( >=dev-libs/libusb-0.1.10a )"
RDEPEND="${DEPEND}"

src_unpack()
{
	unpack ${A}
	cd ${S}
	epatch ${FILESDIR}/${P}-gentoo-makefile-corrections.patch
	epatch ${FILESDIR}/${P}-gentoo-datafiles.patch
	epatch ${FILESDIR}/${P}-gentoo-install-ca_zap.patch

	# disables compilation of ttusb_dec_reset which requires libusb
	use usb || sed -i util/Makefile -e '/ttusb_dec_reset/d'

	# do not compile test-progs
	sed -i Makefile -e '/-C test/d'
}

src_compile()
{
	# interferes with variable in Makefile
	unset ARCH

	emake bindir=/usr/bin datadir=/usr/share libdir=/usr/lib || die "failed to compile"
}

src_install()
{
	# interferes with variable in Makefile
	unset ARCH

	emake bindir=/usr/bin datadir=/usr/share libdir=/usr/lib DESTDIR=${D} INSTDIR=${T} install || die "install failed"

	dodoc README TODO INSTALL
	newdoc util/scan/README README.dvbscan
	newdoc util/szap/README README.zap
	newdoc util/av7110_loadkeys/README README.av7110_loadkeys

	use usb && newdoc util/ttusb_dec_reset/READEM README.ttusb_dec_reset
}

pkg_postinst()
{
	einfo "Please read the documentation in /usr/share/doc/${PF}."
	einfo "The channel lists and other files are installed in"
	einfo "/usr/share/dvb"
	einfo
	einfo "The scanning utility is now installed as dvbscan."
}