3 MAINTAINER = "Greg Gilbert <greg@treke.net>"
4 DEPENDS = "virtual/libc libtool-cross"
5 DESCRIPTION = "Set of tools for managing notebook power consumption."
7 SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_${PV}.orig.tar.gz;"
8 SRC_URI_append =" file://${FILESDIR}/apmd_${PV}-3.diff;patch=1"
9 SRC_URI_append =" file://${FILESDIR}/workaround.patch;patch=1"
10 SRC_URI_append =" file://${FILESDIR}/conf.patch;patch=1"
11 SRC_URI_append =" file://${FILESDIR}/proxy.patch;patch=1"
12 SRC_URI_append =" file://${FILESDIR}/compile.patch;patch=1"
13 SRC_URI_append =" file://${FILESDIR}/make.patch;patch=1"
15 S = "${WORKDIR}/apmd-${PV}.orig"
18 oe_runmake "LIBTOOL=${STAGING_BINDIR}/${TARGET_PREFIX}libtool" apm apmd
22 oe_libinstall -so libapm ${STAGING_LIBDIR}
27 install -d ${D}/${sysconfdir}
28 install -d ${D}/${sysconfdir}/apm
29 install -d ${D}/${sysconfdir}/apm/event.d
30 install -d ${D}/${sysconfdir}/apm/other.d
31 install -d ${D}/${sysconfdir}/apm/suspend.d
32 install -d ${D}/${sysconfdir}/apm/resume.d
33 install -d ${D}/${sysconfdir}/apm/scripts.d
34 install -d ${D}/${sysconfdir}/default
35 install -d ${D}/${sysconfdir}/init.d
36 install -d ${D}/${sbindir}
37 install -d ${D}/${bindir}
38 install -d ${D}/${libdir}
39 install -d ${D}/${datadir}/apmd
40 install -m 4755 ${S}/.libs/apm ${D}/${bindir}/apm.orig
41 install -m 0755 ${FILESDIR}/apmwrapper ${D}/${bindir}/apm
42 install -m 0755 ${S}/.libs/apmd ${D}/${sbindir}/apmd
43 install -m 0755 ${S}/debian/apmd_proxy ${D}/${sysconfdir}/apm/
44 install -m 0644 ${S}/debian/apmd_proxy.conf ${D}/${datadir}/apmd/
45 install -m 0644 ${S}/debian/apmd.default ${D}/${sysconfdir}/default/apmd
46 oe_libinstall -so libapm ${D}/${libdir}
48 cat ${FILESDIR}/init | sed -e 's,/usr/sbin,${sbindir},g; s,/etc,${sysconfdir},g;' > ${D}/${sysconfdir}/init.d/apmd
49 chmod 755 ${D}/${sysconfdir}/init.d/apmd
53 if test -n "${D}"; then
56 update-rc.d $D apmd defaults
60 if test -n "${D}"; then
63 update-rc.d $D apmd remove