]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/apmd/apmd_3.2.2.bb
6aa91b0544295334824049439dec569bb8aad086
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / apmd / apmd_3.2.2.bb
1 DESCRIPTION = "Set of tools for managing notebook power consumption."
2 SECTION = "base"
3 PRIORITY = "required"
4 DEPENDS = "libtool-cross"
5 LICENSE = "GPL"
6 PR = "r10"
7
8 SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_${PV}.orig.tar.gz; \
9            file://debian.patch;patch=1 \
10            file://workaround.patch;patch=1 \
11            file://init \
12            file://default \
13            file://apmd_proxy \
14            file://apmd_proxy.conf"
15
16 S = "${WORKDIR}/apmd-${PV}.orig"
17
18 inherit update-rc.d
19
20 INITSCRIPT_NAME = "apmd"
21 INITSCRIPT_PARAMS = "defaults"
22
23 do_compile() {
24         oe_runmake "LIBTOOL=${STAGING_BINDIR}/${TARGET_PREFIX}libtool" apm apmd
25 }
26
27 do_stage() {
28         install -m 0644 apm.h ${STAGING_INCDIR}
29         oe_libinstall -so libapm ${STAGING_LIBDIR}
30 }
31
32 do_install() {
33         install -d ${D}${sysconfdir}
34         install -d ${D}${sysconfdir}/apm
35         install -d ${D}${sysconfdir}/apm/event.d
36         install -d ${D}${sysconfdir}/apm/other.d
37         install -d ${D}${sysconfdir}/apm/suspend.d
38         install -d ${D}${sysconfdir}/apm/resume.d
39         install -d ${D}${sysconfdir}/apm/scripts.d
40         install -d ${D}${sysconfdir}/default
41         install -d ${D}${sysconfdir}/init.d
42         install -d ${D}${sbindir}
43         install -d ${D}${bindir}
44         install -d ${D}${libdir}
45         install -d ${D}${datadir}/apmd
46
47         install -m 4755 ${S}/.libs/apm ${D}${bindir}/apm
48         install -m 0755 ${S}/.libs/apmd ${D}${sbindir}/apmd
49         install -m 0755 ${WORKDIR}/apmd_proxy ${D}${sysconfdir}/apm/
50         install -m 0644 ${WORKDIR}/apmd_proxy.conf ${D}${datadir}/apmd/
51         install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/apmd
52         oe_libinstall -so libapm ${D}${libdir}
53         install -m 0644 apm.h ${D}${includedir}
54
55         cat ${WORKDIR}/init | sed -e 's,/usr/sbin,${sbindir},g; s,/etc,${sysconfdir},g;' > ${D}${sysconfdir}/init.d/apmd
56         chmod 755 ${D}${sysconfdir}/init.d/apmd
57 }
58
59 PACKAGES =+ "libapm libapm-dev apm"
60
61 FILES_libapm = "${libdir}/libapm.so.*"
62 FILES_libapm-dev = "${libdir}/libapm.* ${includedir}"
63 FILES_apm = "${bindir}/apm*"