From d798f804fc80acf9c335614bce8147a4262cad49 Mon Sep 17 00:00:00 2001 From: Cecil Hugh Watson Date: Wed, 14 Jan 2009 09:40:34 -0800 Subject: Additional themes for MythTV. ACPID. --- abs/core-testing/mythtv/stable/morethemes/PKGBUILD | 32 +++++++++++ abs/core-testing/mythtv/stable/myththemes/PKGBUILD | 4 +- abs/extra-testing/acpid/PKGBUILD | 38 +++++++++++++ abs/extra-testing/acpid/acpid | 35 ++++++++++++ abs/extra-testing/acpid/anything | 3 + abs/extra-testing/acpid/handler.sh | 65 ++++++++++++++++++++++ 6 files changed, 175 insertions(+), 2 deletions(-) create mode 100644 abs/core-testing/mythtv/stable/morethemes/PKGBUILD create mode 100644 abs/extra-testing/acpid/PKGBUILD create mode 100644 abs/extra-testing/acpid/acpid create mode 100644 abs/extra-testing/acpid/anything create mode 100644 abs/extra-testing/acpid/handler.sh diff --git a/abs/core-testing/mythtv/stable/morethemes/PKGBUILD b/abs/core-testing/mythtv/stable/morethemes/PKGBUILD new file mode 100644 index 0000000..dd05575 --- /dev/null +++ b/abs/core-testing/mythtv/stable/morethemes/PKGBUILD @@ -0,0 +1,32 @@ +# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $ +# Maintainer: Juergen Hoetzel +# Contributor: kleptophobiac@gmail.com + +pkgname=morethemes +pkgver=0.21 +pkgrel=1 +pkgdesc="Additional themes for MythTV" +arch=('i686' 'x86_64') +url="http://www.mythtv.org/" +license=('GPL') +depends=("mythtv>=${pkgver}") +source=("ftp://ftp.knoppmyth.net/R6/sources/${pkgname}.tar.bz2") +md5sums=('53f87f0498bc516585df78ff932785f4') +groups=('mythtv-extras') + +build() { + cd $startdir/src/themes + . /etc/profile.d/qt3.sh + + # use QT3 qmake + export PATH=$QTDIR/bin:$PATH + ./configure --prefix=/usr || return 1 + + qmake $pkgname.pro + make qmake || return 1 + make || return 1 + + # basic install + make INSTALL_ROOT=$startdir/pkg install || return 1 +} + diff --git a/abs/core-testing/mythtv/stable/myththemes/PKGBUILD b/abs/core-testing/mythtv/stable/myththemes/PKGBUILD index 5223b92..e11bf08 100644 --- a/abs/core-testing/mythtv/stable/myththemes/PKGBUILD +++ b/abs/core-testing/mythtv/stable/myththemes/PKGBUILD @@ -11,11 +11,11 @@ url="http://www.mythtv.org/" license=('GPL') depends=("mythtv>=${pkgver}") source=("ftp://ftp.knoppmyth.net/R6/sources/${pkgname}-${pkgver}-fixes.tar.bz2") -md5sums=('f13db28f928d70a11eaf416970d06eda') +md5sums=('25d4642344cbfd8ee0ceab75022e13fb') groups=('mythtv-extras') build() { - cd $startdir/src/$pkgname-$pkgver + cd $startdir/src/$pkgname . /etc/profile.d/qt3.sh # use QT3 qmake diff --git a/abs/extra-testing/acpid/PKGBUILD b/abs/extra-testing/acpid/PKGBUILD new file mode 100644 index 0000000..4fbbdf2 --- /dev/null +++ b/abs/extra-testing/acpid/PKGBUILD @@ -0,0 +1,38 @@ +# $Id: PKGBUILD 20369 2008-12-03 02:03:14Z thayer $ +# Contributor: Manolis Tzanidakis +# Contributor: Judd Vinet +# Maintainer: Thayer Williams + +pkgname=acpid +pkgver=1.0.8 +pkgrel=1 +pkgdesc="A daemon for delivering ACPI power management events" +url="http://acpid.sourceforge.net" +license=('GPL2') +arch=('i686' 'x86_64') +depends=(glibc) +source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz + acpid + anything + handler.sh) +backup=('etc/acpi/handler.sh' 'etc/acpi/events/anything') +md5sums=('1d9c52fe2c0b51f8463f357c2a3d3ddb' + '15903690f1bae4b3b0625b369de65521' + '2d37b98d6e74bab815604b8b48c6cfd4' + '0e8dd13793b1baa79a745f4034888367') + +build() { + cd $srcdir/$pkgname-$pkgver + /usr/bin/make || return 1 + /bin/install -d -m0755 $pkgdir/usr/bin || return 1 + /usr/bin/make INSTPREFIX=$pkgdir \ + MAN8DIR=$pkgdir/usr/share/man/man8 install || return 1 + + # install our supplementary scripts + /bin/install -D -m0755 $srcdir/acpid $pkgdir/etc/rc.d/acpid || return 1 + /bin/install -D -m0644 $srcdir/anything $pkgdir/etc/acpi/events/anything || return 1 + /bin/install -D -m0755 $srcdir/handler.sh $pkgdir/etc/acpi/handler.sh || return 1 + + # set world readable bit on the acpid binary + /bin/chmod 755 $pkgdir/usr/sbin/acpid || return 1 +} diff --git a/abs/extra-testing/acpid/acpid b/abs/extra-testing/acpid/acpid new file mode 100644 index 0000000..585944f --- /dev/null +++ b/abs/extra-testing/acpid/acpid @@ -0,0 +1,35 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/sbin/acpid` +case "$1" in + start) + stat_busy "Starting acpid" + [ -z "$PID" ] && /usr/sbin/acpid + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon acpid + stat_done + fi + ;; + stop) + stat_busy "Stopping acpid" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon acpid + stat_done + fi + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/abs/extra-testing/acpid/anything b/abs/extra-testing/acpid/anything new file mode 100644 index 0000000..d182898 --- /dev/null +++ b/abs/extra-testing/acpid/anything @@ -0,0 +1,3 @@ +# Pass all events to our one handler script +event=.* +action=/etc/acpi/handler.sh %e diff --git a/abs/extra-testing/acpid/handler.sh b/abs/extra-testing/acpid/handler.sh new file mode 100644 index 0000000..ad31d1a --- /dev/null +++ b/abs/extra-testing/acpid/handler.sh @@ -0,0 +1,65 @@ +#!/bin/sh +# Default acpi script that takes an entry for all actions + +# NOTE: This is a 2.6-centric script. If you use 2.4.x, you'll have to +# modify it to not use /sys + +minspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq` +maxspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq` +setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed" + +set $* + +case "$1" in + button/power) + #echo "PowerButton pressed!">/dev/tty5 + case "$2" in + PWRF) logger "PowerButton pressed: $2" ;; + *) logger "ACPI action undefined: $2" ;; + esac + ;; + button/sleep) + case "$2" in + SLPB) echo -n mem >/sys/power/state ;; + *) logger "ACPI action undefined: $2" ;; + esac + ;; + ac_adapter) + case "$2" in + AC) + case "$4" in + 00000000) + echo -n $minspeed >$setspeed + #/etc/laptop-mode/laptop-mode start + ;; + 00000001) + echo -n $maxspeed >$setspeed + #/etc/laptop-mode/laptop-mode stop + ;; + esac + ;; + *) logger "ACPI action undefined: $2" ;; + esac + ;; + battery) + case "$2" in + BAT0) + case "$4" in + 00000000) #echo "offline" >/dev/tty5 + ;; + 00000001) #echo "online" >/dev/tty5 + ;; + esac + ;; + CPU0) + ;; + *) logger "ACPI action undefined: $2" ;; + esac + ;; + button/lid) + #echo "LID switched!">/dev/tty5 + ;; + *) + logger "ACPI group/action undefined: $1 / $2" + ;; +esac -- cgit v0.12