summaryrefslogtreecommitdiff
blob: 81d5b1b94a78e9c07b36a208e2819e7366529bc0 (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
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-dialup/fcpci/fcpci-03.09.10.ebuild,v 1.4 2003/09/11 01:23:01 msterret Exp $

DESCRIPTION="CAPI4Linux drivers for AVM Fritz!Card PCI"
HOMEPAGE="http://www.avm.de/"
S="${WORKDIR}/fritz"
SRC_URI="ftp://ftp.avm.de/cardware/fritzcrd.pci/linux/suse.80/fcpci-suse8.0-${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86"
DEPEND="virtual/linux-sources"

src_unpack() {

	unpack ${A}
	cd ${S}
	patch -p1 <${FILESDIR}/tools.c.diff
	krnlver=`uname -r`
	mv src.drv/makefile src.drv/makefile.orig
	cat src.drv/makefile.orig | sed -e "s/\`uname -r\`/${krnlver}/" \
		-e 's/-DMODULE/-DMODULE -DMODVERSIONS/' \
		-e "s:(DEFINES) -O2:(DEFINES) ${CFLAGS} -include /lib/modules/${krnlver}/build/include/linux/modversions.h:" \
		>src.drv/makefile

}

src_compile() {
	emake || die "compile problem"
}

src_install() {
	insinto /lib/modules/`uname -r`/misc
	doins src.drv/fcpci.o
	dodoc CAPI* compile* license.bin
	dohtml install_passive-d.html
	insinto /etc
	newins pci.conf capi.conf
}