]> Pileus Git - ~andy/sunrise/blob - media-tv/em28xx-new/em28xx-new-0.0.20090409.ebuild
sunrise/ app-portage/elog-list/elog-list-0.0.6.ebuild: Update headers for 2010
[~andy/sunrise] / media-tv / em28xx-new / em28xx-new-0.0.20090409.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 linux-info linux-mod versionator
8
9 DESCRIPTION="next generation em28xx driver including dvb support"
10 HOMEPAGE="http://mcentral.de/"
11 SRC_URI="http://upload.hasnoname.de/${PN}/${PN}-$(get_version_component_range 3).tar.bz2"
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE=""
16
17 S=${WORKDIR}/${PN}
18
19 CONFIG_CHECK="VIDEO_V4L2 DVB_CORE"
20
21 pkg_setup() {
22         linux-mod_pkg_setup
23         if kernel_is lt 2 6 21; then
24                 eerror "You need at least kernel 2.6.21"
25                 die "Kernel too old"
26         fi
27
28         if linux_chkconfig_present VIDEO_EM28XX; then
29                 ewarn "In-kernel em28xx drivers enabled, disable or remove them from"
30                 ewarn "/lib/modules/${KV_FULL} if you experience problems."
31         fi
32 }
33
34 src_prepare() {
35         if kernel_is eq 2 6 29; then
36                 epatch "${FILESDIR}"/em28xx-new-video.c-2.6.29.patch
37         fi
38
39         if kernel_is ge 2 6 30; then
40                 epatch "${FILESDIR}"/em28xx-new-2.6.30.patch
41         fi
42 }
43
44 src_compile() {
45         set_arch_to_kernel
46         emake || die "Compiling kernel modules failed"
47 }
48
49 src_install() {
50         insinto /lib/modules/${KV_FULL}/empia
51         local extglob_bak=$(shopt -p extglob)
52         shopt -s extglob # portage disables bash extglob in ebuilds
53         doins $(echo {!(precompiled)/,}*.ko) || die "doins failed"
54         eval ${extglob_bak} # restore previous extglob status
55 }