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

Contents of /app-laptop/ibm-acpi/ibm-acpi-0.7.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.7.ebuild,v 1.6 2005/01/01 14:46:37 eradicator Exp $
4
5 inherit kernel-mod eutils
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="doc"
17
18 DEPEND="virtual/linux-sources
19 sys-apps/sed"
20
21 pkg_setup() {
22 local DIE=0
23
24 if kernel-mod_is_2_4_kernel
25 then
26 die "${P} does not support kernel 2.4.x"
27 fi
28
29 if kernel-mod_configoption_present ACPI_IBM
30 then
31 eerror ""
32 eerror "${P} requires IBM ThinkPad Laptop Extras (CONFIG_ACPI_IBM)"
33 eerror "to be DISABLED in the kernel to avoid conflicting modules."
34 DIE=1
35 fi
36
37 if ! kernel-mod_configoption_present ACPI
38 then
39 eerror ""
40 eerror "${PN} requires an ACPI (CONFIG_ACPI) enabled kernel."
41 eerror ""
42 DIE=1
43 fi
44
45 kernel-mod_check_modules_supported
46
47 if [ $DIE -eq 1 ]
48 then
49 eerror ""
50 die "You kernel is missing the required option(s) listed above."
51 fi
52 }
53
54 src_unpack() {
55 unpack ${A}
56
57 # let pkg_postinst() handle depmod
58 sed -i "s:depmod -a::" ${S}/Makefile
59
60 kernel-mod_getversion
61
62 if [ ${KV_MINOR} -gt 5 ] && [ ${KV_PATCH} -gt 5 ]
63 then
64 sed -i 's:SUBDIRS=:M=:g' ${S}/Makefile
65 fi
66 }
67
68 src_compile() {
69 set_arch_to_kernel
70
71 emake KDIR=${ROOT}/usr/src/linux || die
72 }
73
74 src_install() {
75 set_arch_to_kernel
76
77 emake MDIR=${D}/lib/modules/${KV}/acpi install || die
78
79 set_arch_to_portage
80
81 dodoc LICENSE README
82
83 if use doc; then
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 fi
90 }
91
92 pkg_postinst() {
93 einfo "Checking kernel module dependencies"
94 test -r "${ROOT}/usr/src/linux/System.map" && \
95 depmod -ae -F "${ROOT}/usr/src/linux/System.map" -b "${ROOT}" -r ${KV}
96
97 einfo ""
98 einfo "You may wish to install sys-apps/acpid to handle the ACPI events generated"
99 einfo "by ${PN}."
100
101 if use doc &> /dev/null; then
102 einfo ""
103 einfo "Example acpid configuration has been installed to"
104 einfo "/usr/share/doc/${PF}/examples/"
105 fi
106
107 einfo ""
108 einfo "For further instructions please see /usr/share/doc/${PF}/README.gz"
109 einfo ""
110 }

  ViewVC Help
Powered by ViewVC 1.1.20