summaryrefslogtreecommitdiff
path: root/sysutils/aird
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2011-06-12 20:21:13 +0000
committerChris Rees <crees@FreeBSD.org>2011-06-12 20:21:13 +0000
commit2b280d12946099771ceccb1a5f978e42ddeb3f82 (patch)
treef17264e55b49f3392f23569c3a2700233e31a9f7 /sysutils/aird
parentAdded LICENSE line. (diff)
The aird daemon handles Apple IR receiver button events. If your system
has an USB Apple IR receiver, most likely you'll also have an Apple Remote. An Apple remote has six (6) buttons: Volume up, Volume down, Play/Pause, Forward, Backward and Menu. For each button you can assign a command to execute. Apple IR receiver modules are found on: o MacBook (any generation) o MacBook Pro (any generation) o Intel iMac o Intel MacMini WWW: http://wiki.freebsd.org/AppleMacbook PR: ports/156616 Submitted by: Chris Rees (myself) Approved by: rene (mentor)
Notes
Notes: svn path=/head/; revision=275474
Diffstat (limited to 'sysutils/aird')
-rw-r--r--sysutils/aird/Makefile26
-rw-r--r--sysutils/aird/distinfo2
-rw-r--r--sysutils/aird/files/aird.in43
-rw-r--r--sysutils/aird/pkg-descr14
4 files changed, 85 insertions, 0 deletions
diff --git a/sysutils/aird/Makefile b/sysutils/aird/Makefile
new file mode 100644
index 000000000000..800dc24686b6
--- /dev/null
+++ b/sysutils/aird/Makefile
@@ -0,0 +1,26 @@
+# New ports collection Makefile for: aird
+# Date created: 23 April 2011
+# Whom: crees
+#
+# $FreeBSD$
+#
+
+PORTNAME= aird
+PORTVERSION= 1.0
+CATEGORIES= sysutils
+MASTER_SITES= http://www.bayofrum.net/dist/${PORTNAME}/
+
+MAINTAINER= crees@FreeBSD.org
+COMMENT= Handles Apple IR receiver button events
+
+USE_RC_SUBR= ${PORTNAME}
+MAN1= ${PORTNAME}.1
+MANCOMPRESSED= yes
+
+PLIST_FILES= bin/${PORTNAME}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/${MAN1}.gz ${MAN1PREFIX}/man/man1
+
+.include <bsd.port.mk>
diff --git a/sysutils/aird/distinfo b/sysutils/aird/distinfo
new file mode 100644
index 000000000000..eecd911543bd
--- /dev/null
+++ b/sysutils/aird/distinfo
@@ -0,0 +1,2 @@
+SHA256 (aird-1.0.tar.gz) = e9f7251bf2099d1d299f6e56ac307e8eda9bdeea50704d9f4a8a63d950809f2f
+SIZE (aird-1.0.tar.gz) = 4515
diff --git a/sysutils/aird/files/aird.in b/sysutils/aird/files/aird.in
new file mode 100644
index 000000000000..119dc195370f
--- /dev/null
+++ b/sysutils/aird/files/aird.in
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# PROVIDE: aird
+# REQUIRE: LOGIN
+
+# Add the following lines to /etc/rc.conf or /etc/rc.conf.local to
+# enable aird:
+# aird_enable (bool): Set to "NO" by default.
+# aird_key: Unset by default; see man page on pairing.
+#
+# The following options have defaults sane for musicpd, they can be reassigned
+# in /etc/rc.conf
+#
+# aird_play, aird_forward, aird_up, aird_down, aird_back, aird_menu
+
+. /etc/rc.subr
+
+name="aird"
+rcvar=`set_rcvar`
+
+load_rc_config $name
+
+: ${aird_enable="NO"}
+: ${aird_play="%%PREFIX%%/bin/mpc toggle"}
+: ${aird_forward="%%PREFIX%%/bin/mpc next"}
+: ${aird_up="/usr/sbin/mixer vol +2"}
+: ${aird_down="/usr/sbin/mixer vol -2"}
+: ${aird_back="%%PREFIX%%/bin/mpc prev"}
+: ${aird_menu="%%PREFIX%%/bin/xterm -e ncmpc"}
+
+aird_key="${aird_key:+-k ${aird_key}}"
+
+command="%%PREFIX%%/bin/aird"
+pidfile="/var/run/aird.pid"
+command_args="-p ${pidfile} -f /dev/uhid1 ${aird_key}\
+ -P \"${aird_play}\" \
+ -F \"${aird_forward}\" \
+ -U \"${aird_up}\" \
+ -D \"${aird_down}\" \
+ -B \"${aird_back}\" \
+ -M \"${aird_menu}\""
+
+run_rc_command "$1"
diff --git a/sysutils/aird/pkg-descr b/sysutils/aird/pkg-descr
new file mode 100644
index 000000000000..489924010d13
--- /dev/null
+++ b/sysutils/aird/pkg-descr
@@ -0,0 +1,14 @@
+The aird daemon handles Apple IR receiver button events. If your system
+has an USB Apple IR receiver, most likely you'll also have an Apple
+Remote. An Apple remote has six (6) buttons: Volume up, Volume down,
+Play/Pause, Forward, Backward and Menu. For each button you can assign a
+command to execute.
+
+Apple IR receiver modules are found on:
+
+ o MacBook (any generation)
+ o MacBook Pro (any generation)
+ o Intel iMac
+ o Intel MacMini
+
+WWW: http://wiki.freebsd.org/AppleMacbook