summaryrefslogtreecommitdiff
blob: b81730c705c3d716198243147f3b273d28adb672 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-embedded/gpio/gpio-1.3.2.ebuild,v 1.4 2007/03/08 09:57:00 genstef Exp $

inherit linux-mod

DESCRIPTION="Soekris net4501/4801 GPIO and error LED driver"
HOMEPAGE="http://soekris.hejl.de/"
SRC_URI="http://soekris.hejl.de/gpio-${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
RDEPEND=""
DEPEND="virtual/libc"

MODULE_NAMES="gpio(kernel/drivers:) writelcd(kernel/drivers:)"
BUILD_TARGETS="all"

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

src_unpack() {
	unpack ${A}
	cd ${S} || die
	chmod -x *
}

src_install() {
	linux-mod_src_install

	# Setup gpio device nods.
	#cat /proc/devices |sed -e "/\([0-9]*\).*gpio.*/!D;s/\([0-9]*\).*/\1/"
	local major=254
	dodir /dev
	mknod ${D}/dev/gpio0 c $major 0
	mknod ${D}/dev/gpio1 c $major 1
	mknod ${D}/dev/gpio254 c $major 254
	chmod 664 ${D}/dev/gpio[0-1]
}