summaryrefslogtreecommitdiff
blob: c6a5d10232104c7ecfd102f72724e659e2ea2fad (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
65
66
67
68
69
70
71
72
73
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit linux-mod eutils

DESCRIPTION="Acpi daemon and kernel module to control ASUS Laptop Hotkeys"
HOMEPAGE="http://acpi4asus.sourceforge.net/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"

S="${WORKDIR}/${PN}"
MODULE_NAMES="asus-laptop(acpi:${S}/driver)"
BUILD_TARGETS=" "

RDEPEND="sys-power/acpid"

ECVS_SERVER="acpi4asus.cvs.sourceforge.net:/cvsroot/acpi4asus"
ECVS_MODULE="acpi4asus"
ECVS_LOCALNAME="${PN}"
ECVS_CVS_COMPRESS="-z3"

inherit cvs

pkg_setup() {
	linux-mod_pkg_setup
	BUILD_PARAMS="KDIR=${KV_DIR}"
}

src_unpack() {
	cvs_src_unpack
}

src_compile() {
	if kernel_is ge 2 6 23 ; then
		epatch ${FILESDIR}/kernel23-fix.patch
	fi

	linux-mod_src_compile

	cd ${S}/asus_acpid

	emake 
}

src_install() {
	linux-mod_src_install

	dobin asus_acpid/asus_acpid
	doman asus_acpid/asus_acpid.8

	dodoc README Changelog

	dodir /usr/share/${PN}/samples

	dodir /usr/share/${PN}/samples/actions

	insinto /usr/share/${PN}/samples/actions
	doins samples/actions/*.sh

	dodir /usr/share/${PN}/samples/events
	insinto /usr/share/${PN}/samples/events
	doins samples/events/*
}

pkg_postinst() {
	linux-mod_pkg_postinst
	einfo 
	einfo "Don't forget to create your ~/.asus_acpi,"
	einfo "see /usr/share/doc/${PF}/README.gz for details"
	einfo
}