summaryrefslogtreecommitdiffstats
path: root/abs/core/pm-utils
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/pm-utils')
-rw-r--r--abs/core/pm-utils/11netcfg26
-rw-r--r--abs/core/pm-utils/PKGBUILD29
-rw-r--r--abs/core/pm-utils/pm-utils.install15
-rw-r--r--abs/core/pm-utils/service.patch15
4 files changed, 85 insertions, 0 deletions
diff --git a/abs/core/pm-utils/11netcfg b/abs/core/pm-utils/11netcfg
new file mode 100644
index 0000000..1b4d05e
--- /dev/null
+++ b/abs/core/pm-utils/11netcfg
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+. /usr/lib/pm-utils/functions
+
+suspend_netcfg() {
+ netcfg2 all-suspend
+}
+
+resume_netcfg() {
+ netcfg2 all-resume
+}
+
+if [ -x /usr/bin/netcfg2 ]; then
+ case "$1" in
+ hibernate|suspend)
+ suspend_netcfg
+ ;;
+ thaw|resume)
+ resume_netcfg
+ ;;
+ *)
+ ;;
+ esac
+fi
+
+exit $?
diff --git a/abs/core/pm-utils/PKGBUILD b/abs/core/pm-utils/PKGBUILD
new file mode 100644
index 0000000..0ca060c
--- /dev/null
+++ b/abs/core/pm-utils/PKGBUILD
@@ -0,0 +1,29 @@
+#$Id: PKGBUILD 7546 2008-08-02 21:35:07Z jgc $
+#Maintainer: Jan de Groot <jgc@archlinux.org>
+pkgname=pm-utils
+pkgver=1.1.2.4
+pkgrel=1
+pkgdesc="Utilities and scripts for power management"
+arch=('i686' 'x86_64')
+url="http://pm-utils.freedesktop.org"
+license=('GPL')
+depends=('glibc' 'vbetool' 'procps')
+makedepends=('xmlto')
+install=pm-utils.install
+source=(http://pm-utils.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz
+ service.patch
+ 11netcfg)
+md5sums=('5aa6d338fb8172f1826a1b08ae601a42'
+ '3e170a6c7ae7d9110f95bab54235c089'
+ '9839687c8787d99fd4ff36aa3238c27b')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ patch -Np0 -i ${startdir}/src/service.patch || return 1
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var || return 1
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+
+ #Install additional hooks
+ install -m755 ${startdir}/src/11netcfg ${startdir}/pkg/usr/lib/pm-utils/sleep.d/11netcfg || return 1
+}
diff --git a/abs/core/pm-utils/pm-utils.install b/abs/core/pm-utils/pm-utils.install
new file mode 100644
index 0000000..5e8232d
--- /dev/null
+++ b/abs/core/pm-utils/pm-utils.install
@@ -0,0 +1,15 @@
+# arg 1: the new package version
+post_install() {
+ cat << _EOF
+
+Powersave has been deprecated as suspend/resume framework and has been replaced
+by pm-utils. Pm-utils provides everything you need for suspend/resume, but does
+not load your cpufreq modules like powersaved does. You have to load these
+modules by hand if you want to use them.
+
+_EOF
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/core/pm-utils/service.patch b/abs/core/pm-utils/service.patch
new file mode 100644
index 0000000..422b3f5
--- /dev/null
+++ b/abs/core/pm-utils/service.patch
@@ -0,0 +1,15 @@
+--- pm/functions.in~ 2008-04-10 17:39:48.000000000 +0000
++++ pm/functions.in 2008-04-10 17:39:58.000000000 +0000
+@@ -138,10 +138,10 @@
+ if ! command_exists service; then
+ service()
+ {
+- if [ -x "/etc/init.d/$1" ]; then
++ if [ -x "/etc/rc.d/$1" ]; then
+ svc="$1"
+ shift
+- "/etc/init.d/$svc" "$@"
++ "/etc/rc.d/$svc" "$@"
+ else
+ log "$1" $": unrecognized service" 1>&2
+ return 1