summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonny Davies <woodchip@gentoo.org>2001-10-14 09:11:36 +0000
committerDonny Davies <woodchip@gentoo.org>2001-10-14 09:11:36 +0000
commit24e7c1ded7f8fbc091960a0c67fd73e0813ee530 (patch)
tree71da7a6d9b390f531b2491d4fc4d28129fa00a0f /sys-apps/apmd
parentapmd rc5/rc6 support (diff)
downloadhistorical-24e7c1ded7f8fbc091960a0c67fd73e0813ee530.tar.gz
historical-24e7c1ded7f8fbc091960a0c67fd73e0813ee530.tar.bz2
historical-24e7c1ded7f8fbc091960a0c67fd73e0813ee530.zip
Make it support rc5/rc6. Add rc6 initscript. Respect users CFLAGS;
previously this wasnt so. Add DEPEND, with X conditionally. Small patch to accomodate people without X in USE. Remove old files.
Diffstat (limited to 'sys-apps/apmd')
-rw-r--r--sys-apps/apmd/apmd-3.0.1-r1.ebuild40
-rw-r--r--sys-apps/apmd/apmd-3.0.1-r6.ebuild40
-rw-r--r--sys-apps/apmd/apmd-3.0.1.ebuild46
-rw-r--r--sys-apps/apmd/files/apmd.rc5 (renamed from sys-apps/apmd/files/apmd)0
-rw-r--r--sys-apps/apmd/files/apmd.rc625
-rw-r--r--sys-apps/apmd/files/digest-apmd-3.0.1-r1 (renamed from sys-apps/apmd/files/digest-apmd-3.0.1)0
-rw-r--r--sys-apps/apmd/files/digest-apmd-3.0.1-r61
7 files changed, 106 insertions, 46 deletions
diff --git a/sys-apps/apmd/apmd-3.0.1-r1.ebuild b/sys-apps/apmd/apmd-3.0.1-r1.ebuild
new file mode 100644
index 000000000000..cc44994ee30f
--- /dev/null
+++ b/sys-apps/apmd/apmd-3.0.1-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Craig Joly <joly@ee.ualberta.ca>, Ben Lutgens <lamer@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/apmd/apmd-3.0.1-r1.ebuild,v 1.1 2001/10/14 09:11:36 woodchip 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/"
+
+DEPEND="virtual/glibc X? ( virtual/x11 )"
+
+src_unpack() {
+
+ unpack ${A} ; cd ${S}
+
+ cp Makefile Makefile.orig
+ sed -e "s:PREFIX=\/usr:PREFIX=\$\{DESTDIR\}\/usr:" \
+ -e "s:APMD_PROXY_DIR\=\/etc:APMD_PROXY_DIR\=\$\{DESTDIR\}\/etc\/apm:" \
+ -e "97d" \
+ -e "s:MANDIR\=\${PREFIX}\/man:MANDIR\=\${PREFIX}\/share\/man:" \
+ Makefile.orig > Makefile
+
+ use X || sed -e "/^EXES=/s/xapm//" -e "/install.*xapm/d" Makefile | cat > Makefile
+}
+
+src_compile() {
+
+ make CFLAGS="${CFLAGS}" || die "compile problem"
+}
+
+src_install () {
+
+ make DESTDIR=${D} install || die
+ dodir /etc/apm/{event.d,suspend.d,resume.d}
+ exeinto /etc/apm ; doexe debian/apmd_proxy
+ dodoc ANNOUNCE BUGS.apmsleep COPYING* README* ChangeLog LSM
+
+ exeinto /etc/rc.d/init.d ; newexe ${FILESDIR}/apmd.rc5 apmd
+}
diff --git a/sys-apps/apmd/apmd-3.0.1-r6.ebuild b/sys-apps/apmd/apmd-3.0.1-r6.ebuild
new file mode 100644
index 000000000000..01bfe6dae711
--- /dev/null
+++ b/sys-apps/apmd/apmd-3.0.1-r6.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Craig Joly <joly@ee.ualberta.ca>, Ben Lutgens <lamer@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/apmd/apmd-3.0.1-r6.ebuild,v 1.1 2001/10/14 09:11:36 woodchip 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/"
+
+DEPEND="virtual/glibc X? ( virtual/x11 )"
+
+src_unpack() {
+
+ unpack ${A} ; cd ${S}
+
+ cp Makefile Makefile.orig
+ sed -e "s:PREFIX=\/usr:PREFIX=\$\{DESTDIR\}\/usr:" \
+ -e "s:APMD_PROXY_DIR\=\/etc:APMD_PROXY_DIR\=\$\{DESTDIR\}\/etc\/apm:" \
+ -e "97d" \
+ -e "s:MANDIR\=\${PREFIX}\/man:MANDIR\=\${PREFIX}\/share\/man:" \
+ Makefile.orig > Makefile
+
+ use X || sed -e "/^EXES=/s/xapm//" -e "/install.*xapm/d" Makefile | cat > Makefile
+}
+
+src_compile() {
+
+ make CFLAGS="${CFLAGS}" || die "compile problem"
+}
+
+src_install () {
+
+ make DESTDIR=${D} install || die
+ dodir /etc/apm/{event.d,suspend.d,resume.d}
+ exeinto /etc/apm ; doexe debian/apmd_proxy
+ dodoc ANNOUNCE BUGS.apmsleep COPYING* README* ChangeLog LSM
+
+ exeinto /etc/init.d ; newexe ${FILESDIR}/apmd.rc6 apmd
+}
diff --git a/sys-apps/apmd/apmd-3.0.1.ebuild b/sys-apps/apmd/apmd-3.0.1.ebuild
deleted file mode 100644
index 6d9c1b1c2cb4..000000000000
--- a/sys-apps/apmd/apmd-3.0.1.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# 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
-}
diff --git a/sys-apps/apmd/files/apmd b/sys-apps/apmd/files/apmd.rc5
index 2f9722a8cc0e..2f9722a8cc0e 100644
--- a/sys-apps/apmd/files/apmd
+++ b/sys-apps/apmd/files/apmd.rc5
diff --git a/sys-apps/apmd/files/apmd.rc6 b/sys-apps/apmd/files/apmd.rc6
new file mode 100644
index 000000000000..18258c333ff2
--- /dev/null
+++ b/sys-apps/apmd/files/apmd.rc6
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+
+depend() {
+ need localmount
+}
+
+checkconfig() {
+ if [ ! -e /proc/apm ] ; then
+ eerror "APM support has not been compiled into the kernel"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting apmd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/apmd -- -P /etc/apm/apmd_proxy
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping apmd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/apmd.pid
+ eend $?
+}
diff --git a/sys-apps/apmd/files/digest-apmd-3.0.1 b/sys-apps/apmd/files/digest-apmd-3.0.1-r1
index 67e9a7925a22..67e9a7925a22 100644
--- a/sys-apps/apmd/files/digest-apmd-3.0.1
+++ b/sys-apps/apmd/files/digest-apmd-3.0.1-r1
diff --git a/sys-apps/apmd/files/digest-apmd-3.0.1-r6 b/sys-apps/apmd/files/digest-apmd-3.0.1-r6
new file mode 100644
index 000000000000..67e9a7925a22
--- /dev/null
+++ b/sys-apps/apmd/files/digest-apmd-3.0.1-r6
@@ -0,0 +1 @@
+MD5 cf3fb2c7165bfa5c963b38fa150527d3 apmd_3.0.1-1.tar.gz