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 = "GPL-2.0-or-later" 8LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ 9 file://apm.h;beginline=6;endline=18;md5=7d4acc1250910a89f84ce3cc6557c4c2" 10DEPENDS = "libtool-cross" 11 12SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/a/${BPN}/${BPN}_3.2.2.orig.tar.gz;name=tarball \ 13 file://legacy.patch \ 14 file://libtool.patch \ 15 file://unlinux.patch \ 16 file://wexitcode.patch \ 17 file://linkage.patch \ 18 file://init \ 19 file://default \ 20 file://apmd_proxy \ 21 file://apmd_proxy.conf \ 22 file://apmd.service" 23 24SRC_URI[tarball.md5sum] = "b1e6309e8331e0f4e6efd311c2d97fa8" 25SRC_URI[tarball.sha256sum] = "7f7d9f60b7766b852881d40b8ff91d8e39fccb0d1d913102a5c75a2dbb52332d" 26 27# for this package we're mostly interested in tracking debian patches, 28# and not in the upstream version where all development has effectively stopped 29UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apmd/" 30UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)" 31 32S = "${WORKDIR}/apmd-3.2.2.orig" 33 34inherit update-rc.d systemd 35 36INITSCRIPT_NAME = "apmd" 37INITSCRIPT_PARAMS = "defaults" 38 39SYSTEMD_SERVICE:${PN} = "apmd.service" 40SYSTEMD_AUTO_ENABLE = "disable" 41 42EXTRA_OEMAKE = "-e MAKEFLAGS=" 43 44do_compile() { 45 # apmd doesn't use whole autotools. Just libtool for installation 46 oe_runmake apm apmd 47} 48 49do_install() { 50 install -d ${D}${sysconfdir} 51 install -d ${D}${sysconfdir}/apm 52 install -d ${D}${sysconfdir}/apm/event.d 53 install -d ${D}${sysconfdir}/apm/other.d 54 install -d ${D}${sysconfdir}/apm/suspend.d 55 install -d ${D}${sysconfdir}/apm/resume.d 56 install -d ${D}${sysconfdir}/apm/scripts.d 57 install -d ${D}${sysconfdir}/default 58 install -d ${D}${sysconfdir}/init.d 59 install -d ${D}${sbindir} 60 install -d ${D}${bindir} 61 install -d ${D}${libdir} 62 install -d ${D}${datadir}/apmd 63 install -d ${D}${includedir} 64 65 install -m 4755 ${S}/.libs/apm ${D}${bindir}/apm 66 install -m 0755 ${S}/.libs/apmd ${D}${sbindir}/apmd 67 install -m 0755 ${WORKDIR}/apmd_proxy ${D}${sysconfdir}/apm/ 68 install -m 0644 ${WORKDIR}/apmd_proxy.conf ${D}${datadir}/apmd/ 69 install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/apmd 70 oe_libinstall -so libapm ${D}${libdir} 71 install -m 0644 apm.h ${D}${includedir} 72 73 sed -e 's,/usr/sbin,${sbindir},g; s,/etc,${sysconfdir},g;' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/apmd 74 chmod 755 ${D}${sysconfdir}/init.d/apmd 75 76 install -d ${D}${systemd_system_unitdir} 77 install -m 0644 ${WORKDIR}/apmd.service ${D}${systemd_system_unitdir}/ 78 sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ 79 -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/apmd.service 80} 81 82PACKAGES =+ "libapm apm" 83 84FILES:libapm = "${libdir}/libapm${SOLIBS}" 85FILES:apm = "${bindir}/apm*" 86