summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/community
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2010-03-21 03:47:16 (GMT)
committerJames Meyer <james.meyer@operamail.com>2010-03-21 03:47:16 (GMT)
commit8fe536ba935dd38e6a1ccfd1066fc9e4d09f1dd3 (patch)
treee34b3a4ee42af84b6d5bbb5aaafa4d5fa877de52 /abs/extra-testing/community
parent3e0887cb811e0e1bb9fa730c50a22c101117c9fd (diff)
parent72aa4f632af6cae15a7f74973cd8230f30bd8536 (diff)
downloadlinhes_pkgbuild-8fe536ba935dd38e6a1ccfd1066fc9e4d09f1dd3.zip
linhes_pkgbuild-8fe536ba935dd38e6a1ccfd1066fc9e4d09f1dd3.tar.gz
linhes_pkgbuild-8fe536ba935dd38e6a1ccfd1066fc9e4d09f1dd3.tar.bz2
Merge branch 'HEAD' of ssh://jams@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/extra-testing/community')
-rw-r--r--abs/extra-testing/community/mythpywii/CONTROLS25
-rw-r--r--abs/extra-testing/community/mythpywii/PKGBUILD22
-rw-r--r--abs/extra-testing/community/mythpywii/mythpywii.install59
-rw-r--r--abs/extra-testing/community/mythpywii/wiimote.rules6
-rw-r--r--abs/extra-testing/community/network-ups-tools/PKGBUILD53
-rw-r--r--abs/extra-testing/community/network-ups-tools/finish17
-rw-r--r--abs/extra-testing/community/network-ups-tools/nut.install20
-rw-r--r--abs/extra-testing/community/network-ups-tools/run17
8 files changed, 213 insertions, 6 deletions
diff --git a/abs/extra-testing/community/mythpywii/CONTROLS b/abs/extra-testing/community/mythpywii/CONTROLS
new file mode 100644
index 0000000..d733964
--- /dev/null
+++ b/abs/extra-testing/community/mythpywii/CONTROLS
@@ -0,0 +1,25 @@
+ * Keypad : same as keypad on keyboard
+ * A : Enter (Accept, OK, next, .)
+ * Minus (-) : d (Delete)
+ * Home : escape (Exit to previous menu/exit mythfrontend)
+ * Plus (+) : p (Play/pause)
+ * 1 : Info
+ * 2 : Menu
+ * B + left : rewind to beginning of video
+ * B + twist wiimote : rewind (if twisted to the left) or fastforward
+ (otherwise) with speed dependant on twist amount.
+ * B + A + twist wiimote: timestretching . slower (if twisted left) or
+ faster (if twisted right)
+
+A comment on twisting:
+Point the wii remote at the screen, and twist from the elbow so that it
+ continues to point at the screen.
+
+The maximum fastforward/rewind speed is 180x. The speeds are dictated by
+mythfrontend itself. When you rotate the wiimote, you will feel a slight
+vibration (0.05 seconds) to let you know you have gone up or down a speed
+segment. To stop fastforwarding/rewinding, simply let go of B.
+
+Beware: there is no power saving built in. However you should be able to
+turn the wiimote off (power button) when not in use, and turn it back on
+by holding down 1 and 2 to make it sync.
diff --git a/abs/extra-testing/community/mythpywii/PKGBUILD b/abs/extra-testing/community/mythpywii/PKGBUILD
index 4b57c77..38e456f 100644
--- a/abs/extra-testing/community/mythpywii/PKGBUILD
+++ b/abs/extra-testing/community/mythpywii/PKGBUILD
@@ -2,17 +2,27 @@
# Maintainer: Cecil Watson<knoppmyth@gmail.com>
pkgname=mythpywii
-pkgver=1
-pkgrel=1
+pkgver=17
+pkgrel=8
pkgdesc="Control MythTV using Wiimote."
arch=('i686' 'x86_64')
license=('GPL2')
url="http://www.benjiegillam.com/"
depends=('bluez' 'python-pybluez' 'cwiid-svn')
-#install=mythpywii.install
-source=(http://www.benjiegillam.com/code/myth_py_wii.py)
+install=mythpywii.install
+source=(http://www.benjiegillam.com/code/myth_py_wii.py \
+ wiimote.rules mythpywii.install CONTROLS)
build() {
- mkdir -p $startdir/pkg/usr/bin
- install -D -m 755 myth_py_wii.py $startdir/pkg/usr/bin
+ install -D -m755 ${srcdir}/myth_py_wii.py ${startdir}/pkg/usr/bin/myth_py_wii.py || return 1
+ install -D -m644 ${srcdir}/wiimote.rules ${startdir}/pkg/etc/udev/rules.d/z90-wiimote.rules || return 1
+ install -d -o mythtv -g mythtv ${startdir}/pkg/home/mythtv/.cwiid/wminput || return 1
+ install -D -m755 -o mythtv -g mythtv /etc/cwiid/wminput/{acc_led,buttons,gamepad,neverball,nunchuk_stick2btn,acc_ptr,ir_ptr,nunchuk_acc_ptr} ${startdir}/pkg/home/mythtv/.cwiid/wminput || return 1
+ install -D -m644 ${srcdir}/CONTROLS ${startdir}/pkg/usr/share/docs/mythpywii/CONTROLS || return 1
+ cd ${startdir}/pkg/home/mythtv/.cwiid/wminput
+ ln -s acc_led default
}
+md5sums=('5bd5e1bb9c4cbfabbffdb28ff616e83b'
+ '0d817a971d414b9320587a4cf289386b'
+ '64fa8dbd324dac68f71753ebd828d358'
+ '0872cbdb3def3dd9aa2b97b191ad76d8')
diff --git a/abs/extra-testing/community/mythpywii/mythpywii.install b/abs/extra-testing/community/mythpywii/mythpywii.install
new file mode 100644
index 0000000..8d0b867
--- /dev/null
+++ b/abs/extra-testing/community/mythpywii/mythpywii.install
@@ -0,0 +1,59 @@
+post_install() {
+ . /home/mythtv/.mythtv/mysql.txt
+ # Enable the Network Remote Control Interface for use with the wiimote.
+ # Get local machine's hostname
+ HOST=`cat /etc/hostname`
+ # Update mysql for Network Remote Control Support
+ mysql -u mythtv -pmythtv --host=${DBHostName} mythconverg -e \
+ "UPDATE settings SET data = '1' WHERE value = 'NetworkControlEnabled' AND hostname = '${HOST}'";
+ echo "------------------------------------------------------------"
+ echo "myth_py_wii.py expects the Network Control Port to be set to"
+ echo "mythtv's default port of 6546. It will not work if you have"
+ echo "changed it to something else."
+ echo "------------------------------------------------------------"
+ # Add myth_py_wii.py to ~/mythtv/.fluxbox/apps before LinHES-run
+ sed -i '/LinHES-run/ i [startup] {/usr/bin/myth_py_wii.py >/dev/null}' /home/mythtv/.fluxbox/apps
+ # udev needs to pick up our new rule for the mythpywii.
+ udevadm trigger --subsystem-match="misc" --subsystem-match="bluetooth"
+ # Add the uinput module
+ modprobe uinput
+ # Ensure this module is loaded across reboots
+ echo "# uinput is needed by mythpywii" >> /etc/modules.mythvantage
+ echo "uinput" >> /etc/modules.mythvantage
+ # Bring up the bluetooth interface -- udev will do this after reboot
+ /usr/sbin/hciconfig hci0 up
+ # Punting on the multiple bluetooth adapter question.
+ echo "It is assumed your bluetooth adapter will be hci0."
+ echo "If you have more than one bluetooth adapter, you"
+ echo "may need to edit /etc/udev/rules.d/z90-wiimote.rules"
+ echo "--------------------------------------------------------------"
+ echo "--------------------------------------------------------------"
+ # Unfortunately there does not seem to be a way to do this without
+ # the user manually intervening.
+ echo "To use your wiimote you will need to restart the frontend service."
+ echo "$ sudo sv restart frontend"
+ echo "or simply reboot your machine."
+ echo "--------------------------------------------------------------"
+ echo "--------------------------------------------------------------"
+ echo "After frontend restart, you should now be able to pair your"
+ echo "Wiimote with your bluetooth adapter by pressing 1 & 2 at the"
+ echo "same time. After a few seconds the wiimote should vibrate and the"
+ echo "LEDs will show [ # . . # ] where # is on and . is off."
+ echo "--------------------------------------------------------------"
+ echo "See /usr/share/docs/mythpywii/CONTROLS for more information."
+ echo "--------------------------------------------------------------"
+}
+
+post_remove() {
+ . /home/mythtv/.mythtv/mysql.txt
+ # kill myth_py_wii.py
+ WIIPID=`pidof -o %PPID /usr/bin/myth_py_wii.py`
+ [ -n "$WIIPID" ] && kill $WIIPID
+ # Remove uinput
+ sed -i '/uinput/d' /etc/modules.mythvantage
+ # Remove line in .fluxbox/apps
+ sed -i '/myth_py_wii.py/d' /home/mythtv/.fluxbox/apps
+ # Remove network remote control support
+ mysql -u mythtv -pmythtv --host=${DBHostName} mythconverg -e \
+ "UPDATE settings SET data = '0' WHERE value = 'NetworkControlEnabled' AND hostname = '${HOST}'";
+}
diff --git a/abs/extra-testing/community/mythpywii/wiimote.rules b/abs/extra-testing/community/mythpywii/wiimote.rules
new file mode 100644
index 0000000..4bb2d9d
--- /dev/null
+++ b/abs/extra-testing/community/mythpywii/wiimote.rules
@@ -0,0 +1,6 @@
+# For Bluetooth/Wiimote
+ KERNEL=="uinput", MODE="0660", GROUP="mythtv"
+
+# Automaticly bring up/down the bluetooth interface
+ ACTION=="add", KERNEL=="hci%n", SUBSYSTEM=="bluetooth", RUN+="/usr/sbin/hciconfig hci%n up"
+ ACTION=="remove", KERNEL=="hci%n", SUBSYSTEM=="bluetooth", RUN+="/usr/sbin/hciconfig hci%n down"
diff --git a/abs/extra-testing/community/network-ups-tools/PKGBUILD b/abs/extra-testing/community/network-ups-tools/PKGBUILD
new file mode 100644
index 0000000..515adf8
--- /dev/null
+++ b/abs/extra-testing/community/network-ups-tools/PKGBUILD
@@ -0,0 +1,53 @@
+# $Id: PKGBUILD 12757 2010-03-13 04:22:57Z dgriffiths $
+# Maintainer: Roman Kyrylych <roman@archlinux.org>
+# Contributor: Giuseppe Lucarelli <luk@rebelsoft.org>
+
+pkgname=network-ups-tools
+pkgver=2.4.3
+pkgrel=1
+pkgdesc="NUT is a collection of programs for monitoring and administering UPS hardware"
+arch=('i686' 'x86_64')
+url="http://www.networkupstools.org/"
+license=('GPL2')
+depends=('openssl' 'hal' 'gd')
+makedepends=('libusb')
+backup=(etc/ups/{ups.conf,upsd.conf,upsd.users,upsmon.conf,upssched.conf})
+install=nut.install
+source=(http://www.networkupstools.org/source/2.4/nut-$pkgver.tar.gz run finish)
+options=('!emptydirs' '!libtool')
+
+build() {
+cd $srcdir/nut-$pkgver
+./configure --with-user=nut \
+--prefix=/usr \
+--datadir=/usr/share/ups \
+--sysconfdir=/etc/ups \
+--with-group=nut \
+--with-hal \
+--with-usb \
+--with-cgi \
+--with-cgipath=/usr/share/webapps/nut \
+--with-htmlpath=/usr/share/webapps/nut \
+--with-udev-dir=/etc/udev || return 1
+
+ make || return 1
+ make DESTDIR=$pkgdir install
+ #ugly hack because --with-pkgconfig-dir doesn't work
+ install -D -m644 lib/libupsclient.pc $pkgdir/usr/lib/pkgconfig
+
+ install -D -m644 conf/ups.conf.sample $pkgdir/etc/ups/ups.conf
+ install -D -m640 conf/upsd.conf.sample $pkgdir/etc/ups/upsd.conf
+ install -D -m640 conf/upsd.users.sample $pkgdir/etc/ups/upsd.users
+ install -D -m640 conf/upsmon.conf.sample $pkgdir/etc/ups/upsmon.conf
+ install -D -m644 conf/upssched.conf.sample $pkgdir/etc/ups/upssched.conf
+ install -D -m755 ../run $pkgdir/etc/sv/upsd/run || return 1
+ install -D -m755 ../finish $pkgdir/etc/sv/upsd/finish || return 1
+
+ # Fix udev rules
+ sed -i "s|SYSFS|ATTRS|g" $pkgdir/etc/udev/rules.d/52-nut-usbups.rules
+ install -dm755 ${pkgdir}/lib
+ mv ${pkgdir}/etc/udev ${pkgdir}/lib
+}
+md5sums=('6f893b61b07915e7a139324fa3f79121'
+ '81cfad544c6342125057f9cb978515fb'
+ 'b5b2e266774acfbc80e64ddfbd4057ee')
diff --git a/abs/extra-testing/community/network-ups-tools/finish b/abs/extra-testing/community/network-ups-tools/finish
new file mode 100644
index 0000000..d031d4e
--- /dev/null
+++ b/abs/extra-testing/community/network-ups-tools/finish
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/upsd`
+
+ stat_runit "Stopping UPSd Daemon"
+ /usr/bin/upsdrvctl stop &> /dev/null
+ /usr/sbin/upsmon -c stop &> /dev/null
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon upsd
+ stat_done
+ fi
diff --git a/abs/extra-testing/community/network-ups-tools/nut.install b/abs/extra-testing/community/network-ups-tools/nut.install
new file mode 100644
index 0000000..5bec199
--- /dev/null
+++ b/abs/extra-testing/community/network-ups-tools/nut.install
@@ -0,0 +1,20 @@
+post_install() {
+ groupadd -g 55 nut &> /dev/null
+ useradd -u 55 -g nut -G tty -d /var/state/ups -s /bin/false nut >/dev/null 2>&1
+ mkdir -p /var/state/ups/
+ chmod 0770 /var/state/ups/
+ chown root:nut /var/state/ups/
+ chown root:nut /etc/ups/upsd.conf /etc/ups/upsd.users /etc/ups/upsmon.conf
+ echo ">>> Before starting your UPSd daemon, you must"
+ echo ">>> edit /etc/ups/ups.conf in order to set your"
+ echo ">>> UPS driver and port."
+ echo ">>> Then add upsd as a service."
+ echo ">>> $ sudo add_service.sh upsd."
+}
+
+pre_remove() {
+ remove_service.sh upsd
+ userdel nut >/dev/null 2>&1
+ groupdel nut >/dev/null 2>&1
+ rm -rf /var/state/ups/
+}
diff --git a/abs/extra-testing/community/network-ups-tools/run b/abs/extra-testing/community/network-ups-tools/run
new file mode 100644
index 0000000..f549950
--- /dev/null
+++ b/abs/extra-testing/community/network-ups-tools/run
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/upsd`
+
+ stat_runit "Starting UPSd Daemon"
+ /usr/bin/upsdrvctl start &> /dev/null
+ [ -z "$PID" ] && /usr/sbin/upsd -f &>/dev/null
+ /usr/sbin/upsmon &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon upsd
+ stat_done
+ fi