summaryrefslogtreecommitdiffstats
path: root/abs/extra/community/athcool
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
commit7b29169fff9e7c624890c5edffe85def8a293136 (patch)
tree47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/extra/community/athcool
parentc491dea779dac29afff3578bf8245943817c2339 (diff)
downloadlinhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2
LinHES 6.01.00
Diffstat (limited to 'abs/extra/community/athcool')
-rw-r--r--abs/extra/community/athcool/PKGBUILD24
-rw-r--r--abs/extra/community/athcool/athcool35
-rw-r--r--abs/extra/community/athcool/athcool.install18
-rwxr-xr-xabs/extra/community/athcool/finish3
-rw-r--r--abs/extra/community/athcool/run2
5 files changed, 82 insertions, 0 deletions
diff --git a/abs/extra/community/athcool/PKGBUILD b/abs/extra/community/athcool/PKGBUILD
new file mode 100644
index 0000000..c5a3290
--- /dev/null
+++ b/abs/extra/community/athcool/PKGBUILD
@@ -0,0 +1,24 @@
+pkgname=athcool
+pkgver=0.3.12
+pkgrel=3
+pkgdesc="Small utility allowing to enable powersaving mode on AMD Duron/Athlon/Athlon XP processors."
+url="http://members.jcom.home.ne.jp/jacobi/linux/softwares.html"
+depends=(pciutils)
+license="GPL"
+install=athcool.install
+arch=(i686)
+source=(http://members.jcom.home.ne.jp/jacobi/linux/files/$pkgname-$pkgver.tar.gz
+athcool run finish)
+md5sums=('f2e0f4fbd04f5e1f09aa60a3ecb24645'
+ 'bbf32484cec6431568ccf51c2516f9e7'
+ 'b9cf31ac580c1665d50d70e405d276bc')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+ /bin/install -D -m0755 ../athcool $startdir/pkg/etc/rc.d/athcool
+ mkdir -p $pkgdir/etc/sv/athcool/supervise
+ install -D -m0755 ../run $pkgdir/etc/sv/athcool
+ install -D -m0755 ../finish $pkgdir/etc/sv/athcool
+}
diff --git a/abs/extra/community/athcool/athcool b/abs/extra/community/athcool/athcool
new file mode 100644
index 0000000..f49bd40
--- /dev/null
+++ b/abs/extra/community/athcool/athcool
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+ATHCOOL=/usr/sbin/athcool
+
+case "$1" in
+ start)
+ stat_busy "Enabling Athcool"
+ $ATHCOOL on > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Disabling Athcool"
+ $ATHCOOL off > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ /bin/sleep 1
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/extra/community/athcool/athcool.install b/abs/extra/community/athcool/athcool.install
new file mode 100644
index 0000000..8896da2
--- /dev/null
+++ b/abs/extra/community/athcool/athcool.install
@@ -0,0 +1,18 @@
+# arg 1: the new package version
+post_install() {
+ add_service.sh athcool
+}
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ remove_service.sh athcool
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/community/athcool/finish b/abs/extra/community/athcool/finish
new file mode 100755
index 0000000..cae6b1b
--- /dev/null
+++ b/abs/extra/community/athcool/finish
@@ -0,0 +1,3 @@
+#!/bin/bash
+exec 2>&1
+sv down athcool
diff --git a/abs/extra/community/athcool/run b/abs/extra/community/athcool/run
new file mode 100644
index 0000000..b43936c
--- /dev/null
+++ b/abs/extra/community/athcool/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/sbin/athcool on 2>&1