Add a ton of missing package DESCRIPTION fields.
[vuplus_openembedded] / apmd / apmd_3.2.0.oe
1 SECTION = "base"
2 PRIORITY = "required"
3 MAINTAINER = "Greg Gilbert <greg@treke.net>"
4 RDEPENDS = "libc6"
5 DEPENDS = "virtual/libc"
6 DESCRIPTION = "Set of tools for managing notebook power consumption."
7
8 SRC_URI = "${DEBIAN_MIRROR}/main/a/${PN}/${PN}_${PV}.orig.tar.gz;"
9 SRC_URI_append =" file://${FILESDIR}/${PN}_${PV}-3.diff;patch=1"
10 SRC_URI_append =" file://${FILESDIR}/workaround.patch;patch=1"
11 SRC_URI_append =" file://${FILESDIR}/conf.patch;patch=1"
12 SRC_URI_append =" file://${FILESDIR}/proxy.patch;patch=1"
13 SRC_URI_append =" file://${FILESDIR}/compile.patch;patch=1"
14 SRC_URI_append =" file://${FILESDIR}/make.patch;patch=1"
15
16 S = "${WORKDIR}/apmd-${PV}.orig"
17
18 inherit libtool
19
20 do_compile() {
21     if [ -e ${STAGING_BINDIR}/${TARGET_SYS}-libtool ]; then
22         LIBTOOL=${STAGING_BINDIR}/${TARGET_SYS}-libtool
23     else
24         LIBTOOL=libtool
25     fi
26     oe_runmake "LIBTOOL=$LIBTOOL" apm apmd
27 }
28
29 do_stage() {
30     install -m 0755 .libs/libapm.so.1.0.0 ${STAGING_LIBDIR};
31 }
32
33 do_install() {
34
35     install -d ${D}/${sysconfdir}
36     install -d ${D}/${sysconfdir}/apm
37     install -d ${D}/${sysconfdir}/apm/event.d
38     install -d ${D}/${sysconfdir}/apm/other.d
39     install -d ${D}/${sysconfdir}/apm/suspend.d
40     install -d ${D}/${sysconfdir}/apm/resume.d
41     install -d ${D}/${sysconfdir}/apm/scripts.d
42     install -d ${D}/${sysconfdir}/default
43     install -d ${D}/${sysconfdir}/init.d
44     install -d ${D}/${sbindir}
45     install -d ${D}/${bindir}
46     install -d ${D}/${libdir}
47     install -d ${D}/${datadir}/apmd
48     install -m 4755 ${S}/.libs/apm ${D}/${bindir}/apm.orig
49     install -m 0755 ${FILESDIR}/apmwrapper ${D}/${bindir}/apm
50     install -m 0755 ${S}/.libs/apmd ${D}/${sbindir}/apmd
51     install -m 0755 ${S}/debian/apmd_proxy ${D}/${sysconfdir}/apm/
52     install -m 0644 ${S}/debian/apmd_proxy.conf ${D}/${datadir}/apmd/
53     install -m 0644 ${S}/debian/apmd.default ${D}/${sysconfdir}/default/apmd
54     install -m 0755 .libs/libapm.so.1.0.0 ${D}/${libdir}
55     ln -sf ./libapm.so.1.0.0 ${D}/${libdir}/libapm.so.1.0
56     ln -sf ./libapm.so.1.0.0 ${D}/${libdir}/libapm.so.1
57                 
58     cat ${FILESDIR}/init | sed -e 's,/usr/sbin,${sbindir},g; s,/etc,${sysconfdir},g;' > ${D}/${sysconfdir}/init.d/apmd
59     chmod 755 ${D}/${sysconfdir}/init.d/apmd
60 }
61
62 pkg_postinst () {
63         if test -n "$D"; then
64                 D="-r $D"
65         fi
66         update-rc.d $D apmd defaults
67 }
68
69 pkg_prerm () {
70         if test -n "$D"; then
71                 D="-r $D"
72         fi
73         update-rc.d $D apmd remove
74 }