summaryrefslogtreecommitdiff
path: root/acpid/acpid_1.0.2.oe
blob: 7a163c09e5a9a71969aae56eb37ffcf70686cd33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
DEPENDS = virtual/libc

SRC_URI := ${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.gz

EXTRA_OEMAKE=
do_compile () {
	oe_runmake 'CC=${CC}' 'CROSS=${HOST_PREFIX}'
}

do_install () {
	oe_runmake 'INSTPREFIX=${D}' install
	install -d ${D}/${sysconfdir}/init.d
	cat ${FILESDIR}/init | sed -e's,/usr/sbin,${sbindir},g' > ${D}/${sysconfdir}/init.d/acpid
	chmod 755 ${D}/${sysconfdir}/init.d/acpid
}

pkg_postinst () {
	if test -n "$D"; then
		D="-r $D"
	fi
	update-rc.d $D acpid defaults
}

pkg_prerm () {
	if test -n "$D"; then
		D="-r $D"
	fi
	update-rc.d $D acpid remove
}