aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Somero <dsomero@hotmail.com>2010-05-11 20:02:02 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 20:02:02 +0200
commitcaba00dee0659b8a0cc4d1e97d15c69261a51c06 (patch)
treed80bb37735195e38ff61333dee4e293983bbd188
parentddce670a824a0416c17d9d5532c795b96815b548 (diff)
system/lirc: Added to 12.0 repository
-rw-r--r--system/lirc/README42
-rw-r--r--system/lirc/doinst.sh18
-rw-r--r--system/lirc/lirc.SlackBuild134
-rw-r--r--system/lirc/lirc.info8
-rw-r--r--system/lirc/slack-desc19
5 files changed, 221 insertions, 0 deletions
diff --git a/system/lirc/README b/system/lirc/README
new file mode 100644
index 0000000000000..1bafc3649d2c5
--- /dev/null
+++ b/system/lirc/README
@@ -0,0 +1,42 @@
+LIRC is a package that allows you to decode and send infra-red signals of
+many (but not all) commonly used remote controls. LIRC is released under
+the GNU General Public License. It consists of lircd and lircmd daemons.
+
+Configuring lircd (the LIRC daemon)
+
+ 1. Check if there is already a config file in /etc/lircd.conf. If not,
+ 2. Check if there is a config file available for your remote control at
+ the LIRC homepage and if so, copy it to /etc/lircd.conf. If not,
+ 3. Start irrecord (close all applications that access /dev/lirc first)
+ and follow the instructions given to you by this program. Copy the
+ resulting file to /etc/lircd.conf. If you have trouble creating a
+ working config file, please read the chapter about adding new remote
+ controls -- http://www.lirc.org/html/help.html#new_remote
+
+Q: How can I use the infrared remote shipped with the tv card ?
+
+In the 2.6 kernels the remote simply is registered as keyboard input device
+within the linux input layer. When using the saa7134 driver it "just works",
+with bttv you'll have to load either ir-kbd-gpio or ir-kbd-i2c depending on
+your TV card. If in doubt just try both. Have a look at /proc/bus/input/devices
+file to see whenever the device is present or not.
+
+With the driver loaded the IR just works like a additional keyboard. The numbers
+are mapped to the keypad keys. Depending on the X-Servers keyboard configuration
+(try to pick a multimedia keyboard) other keys like the ones for volume control
+might work too.
+
+Q: But I want use lircd for IR input.
+
+No problem, you can do that too:
+
+ 1. Get a recent lircd version with linux input layer support. The 0.6.6
+ release is too old, a cvs snapshot or a 0.7 pre-release should do. You
+ only need to build the lircd daemon + tools, no lirc kernel drivers
+ needed. Take care that the dev/input driver is included when building
+ lircd (either ./configure --with-driver=any to simply include all drivers
+ or --with-driver=devinput).
+ 2. Load the evdev module (which is part of the linux input layer). Check
+ /proc/bus/input/devices to see which eventn device the IR input device has.
+ 3. Start the daemon this way:
+ /usr/sbin/lircd -H dev/input -d /dev/input/eventn.
diff --git a/system/lirc/doinst.sh b/system/lirc/doinst.sh
new file mode 100644
index 0000000000000..843f41a053ad6
--- /dev/null
+++ b/system/lirc/doinst.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/lircd.conf.new
+config etc/lircmd.conf.new
+config etc/lircrc.new
+
diff --git a/system/lirc/lirc.SlackBuild b/system/lirc/lirc.SlackBuild
new file mode 100644
index 0000000000000..42daaace28d05
--- /dev/null
+++ b/system/lirc/lirc.SlackBuild
@@ -0,0 +1,134 @@
+#!/bin/sh
+
+# Slackware build script for lirc
+
+# Copyright 2007 David Somero <dsomero@hotmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified by Robby Workman of the SlackBuilds.org project
+# No additional license terms and no copyright claim :-)
+
+PRGNAM=lirc
+VERSION=0.8.2
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-2}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+PKG_VERSION=${PKG_VERSION:-$VERSION} # Only changes if BLASTER=yes
+
+# Any of these can be changed by passing the desired value on command line
+# when executing the build script. For example:
+# BLASTER=yes ./lirc.SlackBuild
+# Note that IRQ and PORT are only important if BLASTER is "yes"
+BLASTER=${BLASTER:-no}
+IRQ=${IRQ:-4}
+PORT=${PORT:-0x3f8}
+KERNEL=${KERNEL:-$(uname -r)}
+
+if [ "${ARCH}" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "${ARCH}" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R a-s,u+w,go+r-w .
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --enable-sandboxed \
+ --with-driver=userspace \
+ --with-x \
+ --program-prefix="" \
+ --program-suffix=""
+
+make
+make install DESTDIR=$PKG
+
+if [ "$BLASTER" = "yes" ] ;then
+ make distclean
+
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --enable-sandboxed \
+ --with-driver=serial \
+ --with-transmitter \
+ --with-x \
+ --with-major=61 \
+ --with-port=$PORT\
+ --with-irq=$IRQ \
+ --with-moduledir=/lib/modules/$KERNEL/misc
+
+ make
+ make install DESTDIR=$PKG
+ PKG_VERSION=${VERSION}_$(echo $KERNEL | tr '-' '_')
+fi
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$PKG_VERSION
+cp -a ANNOUNCE AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \
+ doc/lirc.hwdb contrib/lircrc $PKG/usr/doc/$PRGNAM-$PKG_VERSION
+install -m 0644 $CWD/$PRGNAM.SlackBuild $PKG/usr/doc/$PRGNAM-$PKG_VERSION
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+)
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+install -D -m 0644 contrib/lircd.conf $PKG/etc/lircd.conf.new
+install -D -m 0644 contrib/lircmd.conf $PKG/etc/lircmd.conf.new
+install -D -m 0644 contrib/lircrc $PKG/etc/lircrc.new
+install -D -m 0644 contrib/lirc.rules $PKG/etc/udev/rules.d/96-lirc.rules
+
+rm -rf $PKG/dev # We don't need this
+
+mkdir -p $PKG/install
+install -m 0644 $CWD/doinst.sh $PKG/install/doinst.sh
+install -m 0644 $CWD/slack-desc $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKG_VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/system/lirc/lirc.info b/system/lirc/lirc.info
new file mode 100644
index 0000000000000..5800f2bbcbe75
--- /dev/null
+++ b/system/lirc/lirc.info
@@ -0,0 +1,8 @@
+PRGNAM="lirc"
+VERSION="0.8.2"
+HOMEPAGE="http://www.lirc.org/"
+DOWNLOAD="http://downloads.sourceforge.net/lirc/lirc-0.8.2.tar.bz2"
+MD5SUM="83e7060a6693b81075c178d7e3b215af"
+MAINTAINER="David Somero"
+EMAIL="dsomero@hotmail.com "
+APPROVED="rworkman"
diff --git a/system/lirc/slack-desc b/system/lirc/slack-desc
new file mode 100644
index 0000000000000..3136c60795c47
--- /dev/null
+++ b/system/lirc/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+lirc: lirc (Linux InfraRed Remote Control)
+lirc:
+lirc: LIRC is a package that allows you to decode and send infra-red
+lirc: signals of many (but not all) commonly used remote controls.
+lirc:
+lirc: LIRC is released under GNU General Public License. It consists
+lirc: of lircd and lircmd daemons.
+lirc:
+lirc:
+lirc:
+lirc: