summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/apmd/apmd_3.2.2-14.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp/apmd/apmd_3.2.2-14.bb')
-rw-r--r--meta/recipes-bsp/apmd/apmd_3.2.2-14.bb82
1 files changed, 82 insertions, 0 deletions
diff --git a/meta/recipes-bsp/apmd/apmd_3.2.2-14.bb b/meta/recipes-bsp/apmd/apmd_3.2.2-14.bb
new file mode 100644
index 0000000000..8c4b75eb6d
--- /dev/null
+++ b/meta/recipes-bsp/apmd/apmd_3.2.2-14.bb
@@ -0,0 +1,82 @@
1SUMMARY = "Utilities for Advanced Power Management"
2DESCRIPTION = "The Advanced Power Management (APM) support provides \
3access to battery status information and a set of tools for managing \
4notebook power consumption."
5HOMEPAGE = "http://apenwarr.ca/apmd/"
6SECTION = "base"
7LICENSE = "GPLv2+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
9 file://apm.h;beginline=6;endline=18;md5=7d4acc1250910a89f84ce3cc6557c4c2"
10DEPENDS = "libtool-cross"
11PR = "r2"
12
13SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_3.2.2.orig.tar.gz;name=tarball \
14 ${DEBIAN_MIRROR}/main/a/apmd/apmd_${PV}.diff.gz;name=patch \
15 file://libtool.patch \
16 file://unlinux.patch \
17 file://init \
18 file://default \
19 file://apmd_proxy \
20 file://apmd_proxy.conf \
21 file://apmd.service"
22
23SRC_URI[tarball.md5sum] = "b1e6309e8331e0f4e6efd311c2d97fa8"
24SRC_URI[tarball.sha256sum] = "7f7d9f60b7766b852881d40b8ff91d8e39fccb0d1d913102a5c75a2dbb52332d"
25
26SRC_URI[patch.md5sum] = "57e1b689264ea80f78353519eece0c92"
27SRC_URI[patch.sha256sum] = "7905ff96be93d725544d0040e425c42f9c05580db3c272f11cff75b9aa89d430"
28
29S = "${WORKDIR}/apmd-3.2.2.orig"
30
31inherit update-rc.d systemd
32
33INITSCRIPT_NAME = "apmd"
34INITSCRIPT_PARAMS = "defaults"
35
36SYSTEMD_SERVICE_${PN} = "apmd.service"
37SYSTEMD_AUTO_ENABLE = "disable"
38
39do_compile() {
40 # apmd doesn't use whole autotools. Just libtool for installation
41 oe_runmake "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" apm apmd
42}
43
44do_install() {
45 install -d ${D}${sysconfdir}
46 install -d ${D}${sysconfdir}/apm
47 install -d ${D}${sysconfdir}/apm/event.d
48 install -d ${D}${sysconfdir}/apm/other.d
49 install -d ${D}${sysconfdir}/apm/suspend.d
50 install -d ${D}${sysconfdir}/apm/resume.d
51 install -d ${D}${sysconfdir}/apm/scripts.d
52 install -d ${D}${sysconfdir}/default
53 install -d ${D}${sysconfdir}/init.d
54 install -d ${D}${sbindir}
55 install -d ${D}${bindir}
56 install -d ${D}${libdir}
57 install -d ${D}${datadir}/apmd
58 install -d ${D}${includedir}
59
60 install -m 4755 ${S}/.libs/apm ${D}${bindir}/apm
61 install -m 0755 ${S}/.libs/apmd ${D}${sbindir}/apmd
62 install -m 0755 ${WORKDIR}/apmd_proxy ${D}${sysconfdir}/apm/
63 install -m 0644 ${WORKDIR}/apmd_proxy.conf ${D}${datadir}/apmd/
64 install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/apmd
65 oe_libinstall -so libapm ${D}${libdir}
66 install -m 0644 apm.h ${D}${includedir}
67
68 cat ${WORKDIR}/init | sed -e 's,/usr/sbin,${sbindir},g; s,/etc,${sysconfdir},g;' > ${D}${sysconfdir}/init.d/apmd
69 chmod 755 ${D}${sysconfdir}/init.d/apmd
70
71 install -d ${D}${systemd_unitdir}/system
72 install -m 0644 ${WORKDIR}/apmd.service ${D}${systemd_unitdir}/system/
73 sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \
74 -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apmd.service
75}
76
77PACKAGES =+ "libapm libapm-dev libapm-staticdev apm"
78
79FILES_libapm = "${libdir}/libapm${SOLIBS}"
80FILES_libapm-dev = "${libdir}/libapm${SOLIBSDEV} ${includedir} ${libdir}/libapm.la"
81FILES_libapm-staticdev = "${libdir}/libapm.a"
82FILES_apm = "${bindir}/apm*"