summaryrefslogtreecommitdiff
blob: 139aa7ac7fe9630e4bb43753b7d72d6c4f7dac73 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-dialup/fritzcapi/fritzcapi-2.6.26.7.ebuild,v 1.1 2004/11/20 13:31:41 mrness Exp $

inherit kernel-mod rpm

S="${WORKDIR}/usr/src/kernel-modules/fritzcapi"

DESCRIPTION="SuSE's 2.6 AVM kernel modules for fcclassic, fcpci, fcpcmcia, fcpnp, fcusb, fcusb2, fxusb_CZ and fxusb"
HOMEPAGE="http://www.avm.de/"
SRC_URI="ftp://ftp.suse.com/pub/suse/i386/update/9.1/rpm/i586/km_${P/2.6./2.6-}.i586.rpm"

LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

RDEPEND=">=net-dialup/capi4k-utils-20040810"
DEPEND="${RDEPEND}
	app-arch/rpm2targz
	virtual/linux-sources"

pkg_setup() {
	if ! kernel-mod_is_2_6_kernel; then
		die "This package works only with 2.6 kernel!"
	fi
	if ! kernel-mod_configoption_present ISDN_CAPI_CAPI20; then
		die "For using the driver you need a kernel with enabled CAPI support."
	fi
	kernel-mod_check_modules_supported
}

src_unpack() {
	rpm_src_unpack ${A} || die "Could not unpack RPM package."
}

src_compile() {
	unset ARCH
	emake KERNEL_SOURCE="${ROOT}/usr/src/linux" modules || die "emake modules failed"
}

src_install() {
	insinto /lib/modules/${KV_VERSION_FULL}/extra
	doins fritz.*/src/*.ko
}

pkg_postinst() {
	einfo "Checking kernel module dependencies"
	test -r "${ROOT}/usr/src/linux/System.map" && \
		depmod -ae -F "${ROOT}/usr/src/linux/System.map" -b "${ROOT}" -r ${KV}
}