Lines 11-62
Link Here
|
11 |
SLOT="0" |
11 |
SLOT="0" |
12 |
KEYWORDS="~x86 ~amd64" |
12 |
KEYWORDS="~x86 ~amd64" |
13 |
IUSE="" |
13 |
IUSE="" |
14 |
MODULE_NAMES="asus-laptop(acpi:${S}/driver)" |
14 |
|
15 |
BUILD_TARGETS=" " |
|
|
16 |
RDEPEND="sys-power/acpid" |
15 |
RDEPEND="sys-power/acpid" |
17 |
CONFIG_CHECK="LEDS_CLASS" |
|
|
18 |
|
16 |
|
19 |
pkg_setup() { |
17 |
pkg_setup() { |
20 |
linux-mod_pkg_setup |
18 |
if kernel_is lt 2 6 23 ; then |
21 |
BUILD_PARAMS="KDIR=${KV_DIR}" |
19 |
CONFIG_CHECK="LEDS_CLASS" |
|
|
20 |
MODULE_NAMES="asus-laptop(acpi:${S}/driver)" |
21 |
BUILD_TARGETS=" " |
22 |
linux-mod_pkg_setup |
23 |
BUILD_PARAMS="KDIR=${KV_DIR}" |
24 |
else |
25 |
CONFIG_CHECK="~ASUS_LAPTOP" |
26 |
ERROR_ASUS_LAPTOP="Enable CONFIG_ASUS_LAPTOP under Device drivers - Misc Devices - Asus Laptop Extras (EXPERIMENTAL)." |
27 |
einfo "Required kernel module is already included with 2.6.23 kernels, we will not compile it." |
28 |
linux-mod_pkg_setup |
29 |
fi |
22 |
} |
30 |
} |
23 |
|
31 |
|
24 |
src_unpack() { |
32 |
src_unpack() { |
25 |
unpack ${A} |
33 |
unpack ${A} |
26 |
|
34 |
if kernel_is ge 2 6 21 && kernel_is lt 2 6 23 ; then |
27 |
if kernel_is ge 2 6 21 ; then |
35 |
epatch "${FILESDIR}"/cvs.patch |
28 |
epatch ${FILESDIR}/cvs.patch |
|
|
29 |
fi |
36 |
fi |
30 |
} |
37 |
} |
31 |
|
38 |
|
32 |
src_compile() { |
39 |
src_compile() { |
33 |
linux-mod_src_compile |
40 |
kernel_is lt 2 6 23 && linux-mod_src_compile |
34 |
emake -C asus_acpid |
41 |
emake -C asus_acpid |
35 |
} |
42 |
} |
36 |
|
43 |
|
37 |
src_install() { |
44 |
src_install() { |
38 |
linux-mod_src_install |
45 |
kernel_is lt 2 6 23 && linux-mod_src_install |
39 |
|
46 |
|
40 |
dobin asus_acpid/asus_acpid |
47 |
dobin asus_acpid/asus_acpid |
41 |
doman asus_acpid/asus_acpid.8 |
48 |
doman asus_acpid/asus_acpid.8 |
42 |
|
49 |
|
43 |
dodoc README Changelog |
50 |
dodoc README Changelog |
44 |
|
51 |
|
45 |
dodir /usr/share/${PN}/samples |
|
|
46 |
|
47 |
dodir /usr/share/${PN}/samples/actions |
48 |
insinto /usr/share/${PN}/samples/actions |
52 |
insinto /usr/share/${PN}/samples/actions |
49 |
doins samples/actions/*.sh |
53 |
doins samples/actions/*.sh |
50 |
|
54 |
|
51 |
dodir /usr/share/${PN}/samples/events |
|
|
52 |
insinto /usr/share/${PN}/samples/events |
55 |
insinto /usr/share/${PN}/samples/events |
53 |
doins samples/events/* |
56 |
doins samples/events/* |
54 |
} |
57 |
} |
55 |
|
58 |
|
|
|
59 |
pkg_preinst() { |
60 |
kernel_is lt 2 6 23 && linux-mod_pkg_preinst |
61 |
} |
62 |
|
63 |
|
56 |
pkg_postinst() { |
64 |
pkg_postinst() { |
57 |
linux-mod_pkg_postinst |
65 |
kernel_is lt 2 6 23 && linux-mod_pkg_postinst |
58 |
einfo |
66 |
elog |
59 |
einfo "Don't forget to create your ~/.asus_acpi," |
67 |
elog "Don't forget to create your ~/.asus_acpi," |
60 |
einfo "see /usr/share/doc/${PF}/README.gz for details" |
68 |
elog "see README in /usr/share/doc/${PF} for details" |
61 |
einfo |
69 |
elog |
|
|
70 |
} |
71 |
|
72 |
pkg_postrm() { |
73 |
kernel_is lt 2 6 23 && linux-mod_pkg_postrm |
62 |
} |
74 |
} |