/[gentoo-x86]/app-laptop/tp_smapi/tp_smapi-0.40-r3.ebuild
Gentoo

Contents of /app-laptop/tp_smapi/tp_smapi-0.40-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Apr 12 12:23:54 2012 UTC (2 years, 5 months ago) by lxnay
Branch: MAIN
Changes since 1.1: +3 -3 lines
make CONFIG_CHECK non-fatal (binpkg friendly, not strictly required anyway)

(Portage version: 2.2.0_alpha84/cvs/Linux x86_64, RepoMan options: --force)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-laptop/tp_smapi/tp_smapi-0.40-r3.ebuild,v 1.1 2011/06/17 13:27:42 scarabeus Exp $
4
5 EAPI=4
6
7 inherit eutils linux-mod
8
9 DESCRIPTION="IBM ThinkPad SMAPI BIOS driver"
10 HOMEPAGE="http://tpctl.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/tpctl/${P}.tgz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16
17 IUSE="hdaps"
18
19 RESTRICT="userpriv"
20
21 # We need dmideode if the kernel does not support DMI_DEV_TYPE_OEM_STRING
22 # in dmi.h
23 DEPEND="sys-apps/dmidecode"
24 RDEPEND="${DEPEND}"
25
26 pkg_pretend() {
27 linux-mod_pkg_setup
28
29 if kernel_is lt 2 6 19; then
30 eerror
31 eerror "${P} requires Linux kernel 2.6.19 or above."
32 eerror
33 die "Unsupported kernel version"
34 fi
35
36 MODULE_NAMES="thinkpad_ec(extra:) tp_smapi(extra:)"
37 BUILD_PARAMS="KSRC=${KV_DIR} KBUILD=${KV_OUT_DIR}"
38 BUILD_TARGETS="default"
39
40 if use hdaps; then
41 CONFIG_CHECK="~INPUT_UINPUT"
42 WARNING_INPUT_UINPUT="Your kernel needs uinput for the hdaps module to perform better"
43 linux-info_pkg_setup
44
45 MODULE_NAMES="${MODULE_NAMES} hdaps(extra:)"
46 BUILD_PARAMS="${BUILD_PARAMS} HDAPS=1"
47
48 CONFIG_CHECK="~!SENSORS_HDAPS"
49 ERROR_SENSORS_HDAPS="${P} with USE=hdaps conflicts with in-kernel HDAPS (CONFIG_SENSORS_HDAPS)"
50 linux-info_pkg_setup
51 fi
52 }
53
54 pkg_setup() {
55 # run again as pkg_pretend is not var safe
56 pkg_pretend
57 }
58
59 src_prepare() {
60 epatch \
61 "${FILESDIR}/${P}-2.6.37.patch" \
62 "${FILESDIR}/fix_header_check.patch"
63 }
64
65 src_install() {
66 linux-mod_src_install
67 dodoc CHANGES README
68 newinitd "${FILESDIR}"/${P}-initd smapi
69 newconfd "${FILESDIR}"/${P}-confd smapi
70 }

  ViewVC Help
Powered by ViewVC 1.1.20