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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Tue Jun 14 15:31:20 2011 UTC (9 years, 2 months ago) by sping
Branch: MAIN
Add init script (bug #346785)

(Portage version: 2.1.10.2/cvs/Linux x86_64)

1 sping 1.1 # Copyright 1999-2011 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-r1.ebuild,v 1.4 2011/05/20 11:20:42 tomka Exp $
4    
5     EAPI="3"
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_setup() {
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    
42     CONFIG_CHECK="~INPUT_UINPUT"
43     WARNING_INPUT_UINPUT="Your kernel needs uinput for the hdaps module to perform better"
44     linux-info_pkg_setup
45    
46     MODULE_NAMES="${MODULE_NAMES} hdaps(extra:)"
47     BUILD_PARAMS="${BUILD_PARAMS} HDAPS=1"
48    
49     CONFIG_CHECK="!SENSORS_HDAPS"
50     ERROR_SENSORS_HDAPS="${P} with USE=hdaps conflicts with in-kernel HDAPS (CONFIG_SENSORS_HDAPS)"
51     linux-info_pkg_setup
52     fi
53     }
54    
55     src_prepare() {
56     epatch "${FILESDIR}/${P}-2.6.37.patch"
57     epatch "${FILESDIR}"/fix_header_check.patch
58     }
59    
60     src_install() {
61     linux-mod_src_install
62     dodoc CHANGES README || die
63     newinitd "${FILESDIR}"/${P}-initd smapi || die
64     newconfd "${FILESDIR}"/${P}-confd smapi || die
65     }

  ViewVC Help
Powered by ViewVC 1.1.20