summaryrefslogtreecommitdiff
blob: 6d9c1b1c2cb4a66cbf7c67ee1ebfc0a1097db113 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Ben Lutgens <lamer@gentoo.org> 
# Submitted by Craig Joly <joly@ee.ualberta.ca>
# $Header: /var/cvsroot/gentoo-x86/sys-apps/apmd/apmd-3.0.1.ebuild,v 1.4 2001/08/31 03:23:39 pm Exp $


S=${WORKDIR}/${P}
DESCRIPTION="Advanced Power Management Daemon"
SRC_URI="ftp://ftp.debian.org/debian/pool/main/a/apmd/apmd_3.0.1-1.tar.gz"
HOMEPAGE="http://www.worldvisions.ca/~apenwarr/apmd/"

src_unpack() {
	unpack ${A}
	cd ${S}
	sed -e "s:PREFIX=\/usr:PREFIX=\$\{DESTDIR\}\/usr:" Makefile | \
	sed -e "s:APMD_PROXY_DIR\=\/etc:APMD_PROXY_DIR\=\$\{DESTDIR\}\/etc\/apm:" | \
	sed -e "97d" | cat > Makefile
}

src_compile() {

    try emake

}

src_install () {

	try make DESTDIR=${D} install
	dodir /etc/apm/{event.d,suspend.d,resume.d}
	insinto /etc/apm
	insopts -m 0755
	doins ${S}/debian/apmd_proxy

	insinto /etc/rc.d/init.d
	insopts -m 0755 
	doins ${FILESDIR}/apmd
	doins ${FILESDIR}/svc-apmd

	insinto /var/lib/supervise/services/apmd
	insopts -m 0755
	doins ${FILESDIR}/run

	dodoc ANNOUNCE BUGS.apmsleep COPYING COPYING.LIB ChangeLog LSM \
		README README.transfer 
}