diff options
author | Samuel Ortiz <sameo@openedhand.com> | 2008-09-25 14:58:13 +0000 |
---|---|---|
committer | Samuel Ortiz <sameo@openedhand.com> | 2008-09-25 14:58:13 +0000 |
commit | 4a91a284b528c06d6132a8bba2d1e5efc6936926 (patch) | |
tree | a425e558d3e34093b8bfab2055e572c7284a8748 /meta/packages | |
parent | d3636b1f0cdc3489066c9c9dc5cdbf832429bb83 (diff) | |
download | poky-4a91a284b528c06d6132a8bba2d1e5efc6936926.tar.gz |
eee-acpi-scripts: Initial commit
eeePC specific ACPI hooks.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5272 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages')
-rw-r--r-- | meta/packages/eee-acpi-scripts/eee-acpi-scripts_git.bb | 35 | ||||
-rw-r--r-- | meta/packages/eee-acpi-scripts/files/policy-funcs | 8 | ||||
-rw-r--r-- | meta/packages/eee-acpi-scripts/files/remove-doc-check.patch | 60 |
3 files changed, 103 insertions, 0 deletions
diff --git a/meta/packages/eee-acpi-scripts/eee-acpi-scripts_git.bb b/meta/packages/eee-acpi-scripts/eee-acpi-scripts_git.bb new file mode 100644 index 0000000000..84cf8a0859 --- /dev/null +++ b/meta/packages/eee-acpi-scripts/eee-acpi-scripts_git.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | SECTION = "base" | ||
2 | DESCRIPTION = "eeePC specific ACPI scripts" | ||
3 | LICENSE="GPL" | ||
4 | |||
5 | SRCREV = "df785afdacedf869b20fb88a793c13b539819270" | ||
6 | |||
7 | PR = "r2" | ||
8 | |||
9 | RDEPENDS = "pm-utils" | ||
10 | |||
11 | SRC_URI = "git://git.debian.org/git/debian-eeepc/eeepc-acpi-scripts.git;protocol=git \ | ||
12 | file://remove-doc-check.patch;patch=1 \ | ||
13 | file://policy-funcs " | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | FILES_${PN} = "${datadir}/acpi-support/ \ | ||
18 | ${datadir}/eeepc-acpi-scripts \ | ||
19 | ${sysconfdir}/default/ \ | ||
20 | ${sysconfdir}/acpi/" | ||
21 | |||
22 | do_install () { | ||
23 | install -d ${D}${sysconfdir}/default/ | ||
24 | install -d ${D}${sysconfdir}/acpi/actions/ | ||
25 | install -d ${D}${sysconfdir}/acpi/events/ | ||
26 | install -d ${D}${sysconfdir}/acpi/lib/ | ||
27 | install -d ${D}${datadir}/eeepc-acpi-scripts/ | ||
28 | install -d ${D}${datadir}/acpi-support/ | ||
29 | install -m 644 ${S}/events/* ${D}${sysconfdir}/acpi/events/ | ||
30 | install -m 644 ${S}/lib/* ${D}${sysconfdir}/acpi/lib/ | ||
31 | install ${S}/actions/* ${D}${sysconfdir}/acpi/actions/ | ||
32 | install -m 0644 ${S}/functions.sh ${D}${datadir}/eeepc-acpi-scripts/ | ||
33 | install -m 0644 ${WORKDIR}/policy-funcs ${D}${datadir}/acpi-support/ | ||
34 | install -m 0644 ${S}/debian/eeepc-acpi-scripts.default ${D}${sysconfdir}/default/ | ||
35 | } | ||
diff --git a/meta/packages/eee-acpi-scripts/files/policy-funcs b/meta/packages/eee-acpi-scripts/files/policy-funcs new file mode 100644 index 0000000000..fd099df0d8 --- /dev/null +++ b/meta/packages/eee-acpi-scripts/files/policy-funcs | |||
@@ -0,0 +1,8 @@ | |||
1 | CheckPolicy() { | ||
2 | if pidof gnome-power-manager kpowersave > /dev/null || | ||
3 | (pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop kded kded loadedModules | grep -q klaptopdaemon) ; then | ||
4 | echo 0; | ||
5 | else | ||
6 | echo 1; | ||
7 | fi | ||
8 | } | ||
diff --git a/meta/packages/eee-acpi-scripts/files/remove-doc-check.patch b/meta/packages/eee-acpi-scripts/files/remove-doc-check.patch new file mode 100644 index 0000000000..8f6c4fcaad --- /dev/null +++ b/meta/packages/eee-acpi-scripts/files/remove-doc-check.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | --- | ||
2 | actions/hotkey.sh | 3 --- | ||
3 | actions/suspend.sh | 3 --- | ||
4 | actions/vga-toggle.sh | 3 --- | ||
5 | actions/volume.sh | 3 --- | ||
6 | 4 files changed, 12 deletions(-) | ||
7 | |||
8 | Index: git/actions/hotkey.sh | ||
9 | =================================================================== | ||
10 | --- git.orig/actions/hotkey.sh 2008-09-25 11:00:58.000000000 +0200 | ||
11 | +++ git/actions/hotkey.sh 2008-09-25 11:01:04.000000000 +0200 | ||
12 | @@ -1,8 +1,5 @@ | ||
13 | #!/bin/sh | ||
14 | |||
15 | -# do nothing if package is removed | ||
16 | -[ -d /usr/share/doc/eeepc-acpi-scripts ] || exit 0 | ||
17 | - | ||
18 | . /etc/default/eeepc-acpi-scripts | ||
19 | . /usr/share/eeepc-acpi-scripts/functions.sh | ||
20 | . /etc/acpi/lib/notify.sh | ||
21 | Index: git/actions/suspend.sh | ||
22 | =================================================================== | ||
23 | --- git.orig/actions/suspend.sh 2008-09-25 11:00:32.000000000 +0200 | ||
24 | +++ git/actions/suspend.sh 2008-09-25 11:00:37.000000000 +0200 | ||
25 | @@ -1,8 +1,5 @@ | ||
26 | #!/bin/sh | ||
27 | |||
28 | -# do nothing if package is removed | ||
29 | -[ -d /usr/share/doc/eeepc-acpi-scripts ] || exit 0 | ||
30 | - | ||
31 | if (runlevel | grep -q [06]) || (pidof '/sbin/shutdown' > /dev/null); then | ||
32 | exit 0 | ||
33 | fi | ||
34 | Index: git/actions/vga-toggle.sh | ||
35 | =================================================================== | ||
36 | --- git.orig/actions/vga-toggle.sh 2008-09-25 11:02:00.000000000 +0200 | ||
37 | +++ git/actions/vga-toggle.sh 2008-09-25 11:02:06.000000000 +0200 | ||
38 | @@ -1,8 +1,5 @@ | ||
39 | #!/bin/sh | ||
40 | |||
41 | -# do nothing if package is removed | ||
42 | -[ -d /usr/share/doc/eeepc-acpi-scripts ] || exit 0 | ||
43 | - | ||
44 | . /etc/default/eeepc-acpi-scripts | ||
45 | |||
46 | # return: 0 on disconnect, 1 on connected vga, 2 else | ||
47 | Index: git/actions/volume.sh | ||
48 | =================================================================== | ||
49 | --- git.orig/actions/volume.sh 2008-09-25 11:02:13.000000000 +0200 | ||
50 | +++ git/actions/volume.sh 2008-09-25 11:02:19.000000000 +0200 | ||
51 | @@ -2,9 +2,6 @@ | ||
52 | |||
53 | # Volume controls | ||
54 | |||
55 | -# do nothing if package is removed | ||
56 | -[ -d /usr/share/doc/eeepc-acpi-scripts ] || exit 0 | ||
57 | - | ||
58 | . /etc/default/eeepc-acpi-scripts | ||
59 | . /usr/share/eeepc-acpi-scripts/functions.sh | ||
60 | . /etc/acpi/lib/notify.sh | ||