blob: ebb190a9d32bd62a4d8459892ccd861576e875f4 (
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
|
DESCRIPTION = "Keyboard Device Daemon which provides support for snapntype and stowaway keyboards"
MAINTAINER = "Paul Eggleton <http://handhelds.org/moin/moin.cgi/PaulEggleton>"
SECTION = "utils"
LICENSE = "GPL"
PR = "r2"
DEPENDS = "virtual/kernel"
RDEPENDS = "kernel-module-keybdev kernel-module-uinput"
SRC_URI = "${HANDHELDS_CVS};module=apps/kbdd;date=${PV} \
file://snapntype.patch;patch=1;pnum=0 \
file://stowaway-fellowes-apm.patch;patch=1;pnum=0 \
file://kbdd.init \
file://kbdd.default"
inherit autotools update-rc.d
S = "${WORKDIR}/kbdd"
INITSCRIPT_NAME = "kbdd.init"
INITSCRIPT_PARAMS = "default"
do_compile() {
oe_runmake
}
do_install() {
install -d ${D}/${sbindir}
install -d ${D}/${docdir}/kbdd/
install -m 0755 kbdd ${D}/${sbindir}/
install -m 0644 README ${D}/${docdir}/kbdd/
}
do_install_append () {
mkdir -p ${D}/${sysconfdir}/defaults
cat ${WORKDIR}/kbdd.default > ${D}/${sysconfdir}/defaults/kbdd
chmod 755 ${D}/${sysconfdir}/defaults/kbdd
mkdir -p ${D}/${sysconfdir}/modutils
touch ${D}/${sysconfdir}/modutils/kbdd-modules
echo "keybdev" > ${D}/${sysconfdir}/modutils/kbdd-modules
echo "uinput" >> ${D}/${sysconfdir}/modutils/kbdd-modules
chmod 755 ${D}/${sysconfdir}/modutils/kbdd-modules
}
pkg_postinst () {
update-modules
}
pkg_prerm () {
rm ${D}/${sysconfdir}/modutils/kbdd-modules
update-modules
}
updatercd_postinst() {
if test "x$D" != "x"; then
D="-r $D"
else
D="-s"
fi
update-rc.d $D ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
}
updatercd_postrm() {
if test "x$D" != "x"; then
D="-r $D"
else
${INIT_D_DIR}/${INITSCRIPT_NAME} stop
fi
update-rc.d $D ${INITSCRIPT_NAME} remove
}
|