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