/[gentoo-x86]/app-laptop/ibm-acpi/ibm-acpi-0.4.ebuild
Gentoo

Contents of /app-laptop/ibm-acpi/ibm-acpi-0.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Mon Jan 3 20:31:08 2005 UTC (15 years, 7 months ago) by brix
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Pruned old versions.

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-laptop/ibm-acpi/ibm-acpi-0.4.ebuild,v 1.6 2005/01/01 14:46:37 eradicator Exp $
4
5 inherit kernel-mod
6
7 DESCRIPTION="IBM ThinkPad ACPI extras"
8
9 HOMEPAGE="http://ibm-acpi.sourceforge.net"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="x86"
15
16 IUSE=""
17
18 pkg_setup() {
19 local DIE=0
20
21 if kernel-mod_is_2_4_kernel
22 then
23 die "${P} does not support kernel 2.4.x"
24 fi
25
26 if kernel-mod_configoption_present ACPI_IBM
27 then
28 eerror ""
29 eerror "${P} requires IBM ThinkPad Laptop Extras (CONFIG_ACPI_IBM)"
30 eerror "to be DISABLED in the kernel to avoid conflicting modules."
31 DIE=1
32 fi
33
34 if ! kernel-mod_configoption_present ACPI
35 then
36 eerror ""
37 eerror "${PN} requires an ACPI (CONFIG_ACPI) enabled kernel."
38 eerror ""
39 DIE=1
40 fi
41
42 kernel-mod_check_modules_supported
43
44 if [ $DIE -eq 1 ]
45 then
46 eerror ""
47 die "You kernel is missing the required option(s) listed above."
48 fi
49 }
50
51 src_unpack() {
52 unpack ${A}
53
54 # let pkg_postinst() handle depmod
55 sed -i -e "s:depmod -a::" ${S}/Makefile
56
57 kernel-mod_getversion
58
59 if [ ${KV_MINOR} -gt 5 ] && [ ${KV_PATCH} -gt 5 ]
60 then
61 sed -i 's:SUBDIRS=:M=:g' ${S}/Makefile
62 fi
63 }
64
65 src_compile() {
66 if [ ${KV_MINOR} -gt 5 ] && [ ${KV_PATCH} -gt 5 ]
67 then
68 unset ARCH
69 fi
70
71 emake KDIR=${ROOT}/usr/src/linux || die
72 }
73
74 src_install() {
75 if [ ${KV_MINOR} -gt 5 ] && [ ${KV_PATCH} -gt 5 ]
76 then
77 unset ARCH
78 fi
79
80 emake MDIR=${D}/lib/modules/${KV}/acpi install || die
81
82 dodoc LICENSE README
83
84 docinto examples/etc/acpi/actions
85 dodoc config/etc/acpi/actions/*
86
87 docinto examples/etc/acpi/events
88 dodoc config/etc/acpi/events/*
89 }
90
91 pkg_postinst() {
92 einfo "Checking kernel module dependencies"
93 test -r "${ROOT}/usr/src/linux/System.map" && \
94 depmod -ae -F "${ROOT}/usr/src/linux/System.map" -b "${ROOT}" -r ${KV}
95
96 einfo ""
97 einfo "You may wish to install sys-apps/acpid to handle the ACPI events generated"
98 einfo "by ${P}. Example acpid configuration has been installed to"
99 einfo "/usr/share/doc/${PF}/examples/"
100 einfo ""
101 einfo "For further instructions please see /usr/share/doc/${PF}/README.gz"
102 einfo ""
103 }

  ViewVC Help
Powered by ViewVC 1.1.20