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)
This commit is contained in:
Chris Rees
2011-06-12 20:21:13 +00:00
parent 0b37cd54aa
commit 2b280d1294
5 changed files with 86 additions and 0 deletions

View File

@@ -20,6 +20,7 @@
SUBDIR += agef
SUBDIR += ah-tty
SUBDIR += aimage
SUBDIR += aird
SUBDIR += am-utils
SUBDIR += amrstat
SUBDIR += anacron

26
sysutils/aird/Makefile Normal file
View File

@@ -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>

2
sysutils/aird/distinfo Normal file
View File

@@ -0,0 +1,2 @@
SHA256 (aird-1.0.tar.gz) = e9f7251bf2099d1d299f6e56ac307e8eda9bdeea50704d9f4a8a63d950809f2f
SIZE (aird-1.0.tar.gz) = 4515

View File

@@ -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"

14
sysutils/aird/pkg-descr Normal file
View File

@@ -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