blob: 732652c7b58281740157adba912c1e5d862c163b (
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
|
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-misc/omnibook/omnibook-20040916.ebuild,v 1.1 2004/11/15 18:33:30 genstef Exp $
inherit kernel-mod
MY_P="${PN}-${PV:0:4}-${PV:4:2}-${PV:6:2}"
DESCRIPTION="Linux kernel module for HP Omnibook support"
HOMEPAGE="http://www.sourceforge.net/projects/omke"
SRC_URI="mirror://sourceforge/omke/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
DEPEND="virtual/kernel"
S="${WORKDIR}/${MY_P}"
pkg_setup() {
kernel-mod_check_modules_supported
}
src_compile() {
# http://marc.theaimsgroup.com/?l=gentoo-dev&m=109672618708314&w=2
kernel-mod_getversion
if [ ${KV_MINOR} -gt 5 ] && [ ${KV_PATCH} -gt 5 ]
then
sed -i 's:SUBDIRS=:M=:g' Makefile
fi
unset ARCH
emake KSRC="${ROOT}/usr/src/linux" KERNEL="$(echo ${KV} | cut -c 1-3)" || die "emake failed"
cd misc/obtest
emake || die "make obtest failed"
}
src_install() {
dosbin misc/obtest/obtest
# The driver goes into the standard modules location
# Not the make install location, because that way it would get deleted
# when the user did a make modules_install in the Kernel tree
insinto /lib/modules/${KV}/char
if kernel-mod_is_2_6_kernel; then
doins omnibook.ko
else
doins omnibook.o
fi
dodoc doc/*
docinto misc
dodoc misc/*
docinto hotkeys
dodoc misc/hotkeys/*
}
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}
}
|