diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
commit | c527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch) | |
tree | bb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/recipes-bsp/acpid | |
download | poky-c527fd1f14c27855a37f2e8ac5346ce8d940ced2.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-bsp/acpid')
-rw-r--r-- | meta/recipes-bsp/acpid/acpid.inc | 33 | ||||
-rwxr-xr-x | meta/recipes-bsp/acpid/acpid/init | 31 | ||||
-rw-r--r-- | meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch | 10 | ||||
-rw-r--r-- | meta/recipes-bsp/acpid/acpid_1.0.10.bb | 8 |
4 files changed, 82 insertions, 0 deletions
diff --git a/meta/recipes-bsp/acpid/acpid.inc b/meta/recipes-bsp/acpid/acpid.inc new file mode 100644 index 0000000000..89cb73fc7f --- /dev/null +++ b/meta/recipes-bsp/acpid/acpid.inc | |||
@@ -0,0 +1,33 @@ | |||
1 | SUMMARY = "A daemon for delivering ACPI events" | ||
2 | HOMEPAGE = "http://sourceforge.net/projects/acpid/" | ||
3 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=33140&atid=407341" | ||
4 | SECTION = "base" | ||
5 | LICENSE = "GPLv2+" | ||
6 | |||
7 | SRC_URI = "${SOURCEFORGE_MIRROR}/acpid/acpid-${PV}.tar.gz \ | ||
8 | file://init \ | ||
9 | file://set_socket_noblock.patch " | ||
10 | |||
11 | inherit update-rc.d | ||
12 | |||
13 | INITSCRIPT_NAME = "acpid" | ||
14 | INITSCRIPT_PARAMS = "defaults" | ||
15 | |||
16 | # Makefile ignores our CFLAGS, so override it. | ||
17 | # | ||
18 | EXTRA_OEMAKE = "CFLAGS='-W -Wall -Werror -Wundef -Wshadow ${CFLAGS} $(DEFS)'" | ||
19 | |||
20 | do_compile () { | ||
21 | oe_runmake 'CC=${CC} -D_GNU_SOURCE' 'CROSS=${HOST_PREFIX}' | ||
22 | } | ||
23 | |||
24 | do_install () { | ||
25 | install -d ${D}${bindir} | ||
26 | oe_runmake 'INSTPREFIX=${D}' install | ||
27 | install -d ${D}${sysconfdir}/init.d | ||
28 | cat ${WORKDIR}/init | sed -e's,/usr/sbin,${sbindir},g' > ${D}${sysconfdir}/init.d/acpid | ||
29 | chmod 755 ${D}${sysconfdir}/init.d/acpid | ||
30 | |||
31 | install -d ${D}${sysconfdir}/acpi | ||
32 | install -d ${D}${sysconfdir}/acpi/events | ||
33 | } | ||
diff --git a/meta/recipes-bsp/acpid/acpid/init b/meta/recipes-bsp/acpid/acpid/init new file mode 100755 index 0000000000..40ff385c10 --- /dev/null +++ b/meta/recipes-bsp/acpid/acpid/init | |||
@@ -0,0 +1,31 @@ | |||
1 | #! /bin/sh -e | ||
2 | |||
3 | test -x /usr/sbin/acpid || exit 0 | ||
4 | test -d /proc/acpi || exit 0 | ||
5 | mkdir -p /etc/acpi/events | ||
6 | |||
7 | case "$1" in | ||
8 | start) | ||
9 | echo -n "Starting Advanced Configuration and Power Interface daemon: " | ||
10 | if [ ! -d /etc/acpi/events ]; then | ||
11 | echo "There is not any rule configuration file." | ||
12 | else | ||
13 | start-stop-daemon -o -S -x /usr/sbin/acpid -- -c /etc/acpi/events | ||
14 | echo "acpid." | ||
15 | fi | ||
16 | ;; | ||
17 | stop) | ||
18 | echo -n "Stopping Advanced Configuration and Power Interface daemon: " | ||
19 | start-stop-daemon -o -K -x /usr/sbin/acpid | ||
20 | echo "acpid." | ||
21 | ;; | ||
22 | restart|force-reload) | ||
23 | $0 stop | ||
24 | $0 start | ||
25 | ;; | ||
26 | *) | ||
27 | echo "Usage: /etc/init.d/acpid {start|stop|restart|force-reload}" | ||
28 | exit 1 | ||
29 | esac | ||
30 | |||
31 | exit 0 | ||
diff --git a/meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch b/meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch new file mode 100644 index 0000000000..54d64351d7 --- /dev/null +++ b/meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch | |||
@@ -0,0 +1,10 @@ | |||
1 | --- a/acpid.c | ||
2 | +++ b/acpid.c | ||
3 | @@ -307,6 +307,7 @@ main(int argc, char **argv) | ||
4 | non_root_clients++; | ||
5 | } | ||
6 | fcntl(cli_fd, F_SETFD, FD_CLOEXEC); | ||
7 | + fcntl(cli_fd, F_SETFL, O_NONBLOCK); | ||
8 | snprintf(buf, sizeof(buf)-1, "%d[%d:%d]", | ||
9 | creds.pid, creds.uid, creds.gid); | ||
10 | acpid_add_client(cli_fd, buf); | ||
diff --git a/meta/recipes-bsp/acpid/acpid_1.0.10.bb b/meta/recipes-bsp/acpid/acpid_1.0.10.bb new file mode 100644 index 0000000000..df55badbd4 --- /dev/null +++ b/meta/recipes-bsp/acpid/acpid_1.0.10.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | require acpid.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ | ||
4 | file://acpid.h;endline=24;md5=324a9cf225ae69ddaad1bf9d942115b5" | ||
5 | |||
6 | |||
7 | SRC_URI[md5sum] = "61156ef32015c56dc0f2e3317f4ae09e" | ||
8 | SRC_URI[sha256sum] = "22703ce0dd7305aca01bc9ac741659c32b1593f1d6fde492df7f01067a534760" | ||