summaryrefslogtreecommitdiff
path: root/utilities/lirc
diff options
context:
space:
mode:
authorroot <root@elwms02.(none)>2010-04-06 16:13:08 +0200
committerroot <root@elwms02.(none)>2010-04-06 16:13:08 +0200
commit0e7005fcc7483c01aa102fbea358c5ac65a48d62 (patch)
tree11517ce0d3d2977c6732b3aa583b0008083e0bd3 /utilities/lirc
downloadx-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.gz
x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.bz2
hello world
Diffstat (limited to 'utilities/lirc')
-rw-r--r--utilities/lirc/lirc/lircd.conf73
-rw-r--r--utilities/lirc/lirc/lircd.conf.hauppauge199
-rw-r--r--utilities/lirc/lirc/lircd.conf.rcx11583
-rw-r--r--utilities/lirc/lirc/lircd.conf.technisat73
-rw-r--r--utilities/lirc/lirc/lircd.conf.vivcontrol663
-rw-r--r--utilities/lirc/lirc/lircmd.conf5
-rw-r--r--utilities/lirc/lirc/lircrc142
-rw-r--r--utilities/lirc/lirc_init130
-rw-r--r--utilities/lirc/utilitie.sh214
9 files changed, 982 insertions, 0 deletions
diff --git a/utilities/lirc/lirc/lircd.conf b/utilities/lirc/lirc/lircd.conf
new file mode 100644
index 0000000..88250b4
--- /dev/null
+++ b/utilities/lirc/lirc/lircd.conf
@@ -0,0 +1,73 @@
+# brand: Technisat
+# model no. of remote control: TTS35AI
+# devices being controlled by this remote: Skystar 2.6D
+#
+
+begin remote
+
+ name TTS35AI
+ bits 13
+ flags RC5|CONST_LENGTH
+ eps 30
+ aeps 100
+
+ one 882 803
+ zero 882 803
+ plead 905
+ gap 112766
+ toggle_bit 2
+ min_repeat 3
+
+ begin codes
+ Power 0x1A8C
+ Mute 0x1A8D
+ 1 0x1281
+ 2 0x1A82
+ 3 0x1283
+ 4 0x1A84
+ 5 0x1285
+ 6 0x1A86
+ 7 0x1287
+ 8 0x1A88
+ 9 0x1289
+ 0 0x1A80
+# -/-- 0x128A
+ User1 0x128A
+# A/B 0x1AA3
+ User2 0x1AA3
+ Red 0x0AAB
+ Green 0x02AC
+ Yellow 0x0AAD
+ Blue 0x02AE
+ Ok 0x0A97
+ Up 0x12A0
+ Down 0x1AA1
+ Left 0x1291
+ Right 0x1A90
+# SFI 0x12AF
+ User3 0x12AF
+# Exit 0x1AA2
+ Back 0x1AA2
+# INFO 0x028F
+ User4 0x028F
+ Prog+ 0x1AA0
+ Prog- 0x12A1
+# TV/Radio 0x0293
+ User5 0x0293
+ Volume+ 0x1A90
+ Volume- 0x1291
+ Menu 0x0A92
+# Hilfe 0x1A8F
+ User6 0x1A8F
+# TXT 0x12BC
+ User7 0x12BC
+# STOP 0x1AA9
+ User8 0x1AA9
+# EXT 0x12B8
+ User9 0x12B8
+# HILFE2 0x0AB6
+ end codes
+
+end remote
+
+
diff --git a/utilities/lirc/lirc/lircd.conf.hauppauge b/utilities/lirc/lirc/lircd.conf.hauppauge
new file mode 100644
index 0000000..0dacd15
--- /dev/null
+++ b/utilities/lirc/lirc/lircd.conf.hauppauge
@@ -0,0 +1,199 @@
+#
+# this config file was automatically generated
+# using lirc-0.5.5pre8 on Sun Apr 18 11:43:45 1999
+#
+# contributed by Jens Leuschner <leuschner@gmx.net>
+#
+# brand: Hauppauge
+# model:
+# supported devices: WinTV primo; WinTV pci; WinTV radio
+#
+# This config file will work with both homebrew receivers and
+# original Hauppauge TV cards !!!
+#
+
+begin remote
+
+ name Hauppauge
+ bits 13
+ flags SHIFT_ENC
+ eps 30
+ aeps 100
+
+ one 950 830
+ zero 950 830
+ plead 960
+ gap 89584
+ repeat_bit 2
+
+ begin codes
+ Red 0x000000000000100F
+ Green 0x000000000000100C
+ Ok 0x000000000000102E
+ Up 0x0000000000001020
+ Down 0x0000000000001021
+ Left 0x0000000000001011
+ Right 0x0000000000001010
+ Yellow 0x000000000000100D
+ Blue 0x0000000000001022
+ 1 0x0000000000001001
+ 2 0x0000000000001002
+ 3 0x0000000000001003
+ 4 0x0000000000001004
+ 5 0x0000000000001005
+ 6 0x0000000000001006
+ 7 0x0000000000001007
+ 8 0x0000000000001008
+ 9 0x0000000000001009
+ 0 0x0000000000001000
+ Back 0x000000000000101E
+ Menu 0x0000000000001026
+ end codes
+
+end remote
+
+
+#
+# this config file was automatically generated
+# using lirc-0.6.6(animax) on Tue Apr 15 19:50:27 2003
+#
+# contributed by
+#
+# brand: Hauppauge
+# model no. of remote control:
+# devices being controlled by this remote: PVR 2/350
+#
+
+begin remote
+
+ name hauppauge_pvr
+ bits 13
+ flags RC5|CONST_LENGTH
+ eps 30
+ aeps 100
+
+ one 969 811
+ zero 969 811
+ plead 1097
+ gap 114605
+ toggle_bit 2
+
+
+ begin codes
+ Power 0x00000000000017FD
+ Go 0x00000000000017FB
+ 1 0x00000000000017C1
+ 2 0x00000000000017C2
+ 3 0x00000000000017C3
+ 4 0x00000000000017C4
+ 5 0x00000000000017C5
+ 6 0x00000000000017C6
+ 7 0x00000000000017C7
+ 8 0x00000000000017C8
+ 9 0x00000000000017C9
+ Back/Exit 0x00000000000017DF
+ 0 0x00000000000017C0
+ Menu 0x00000000000017CD
+ Red 0x00000000000017CB
+ Green 0x00000000000017EE
+ Yellow 0x00000000000017F8
+ Blue 0x00000000000017E9
+ Ch+ 0x00000000000017E0
+ Ch- 0x00000000000017E1
+ Vol- 0x00000000000017D1
+ Vol+ 0x00000000000017D0
+ Ok 0x00000000000017E5
+ Mute 0x00000000000017CF
+ Blank 0x00000000000017CC
+ Full 0x00000000000017FC
+ Rewind 0x00000000000017F2
+ Play 0x00000000000017F5
+ Forward 0x00000000000017F4
+ Record 0x00000000000017F7
+ Stop 0x00000000000017F6
+ Pause 0x00000000000017F0
+ Replay 0x00000000000017E4
+ Skip 0x00000000000017DE
+ end codes
+
+end remote
+
+
+#
+# this config file was automatically generated
+# using lirc-0.7.0(any) on Sun Nov 28 20:25:09 2004
+#
+# contributed by
+#
+# brand: Hauppauge 350
+# Created: G.J. Werler (The Netherlands)
+# Project: Mythtv Fedora Pundit-R www.mythtvportal.com
+# Date: 2004/11/28
+# model no. of remote control: Hauppauge A415-HPG
+# devices being controlled by this remote: PVR-350
+#
+
+begin remote
+
+ name Hauppauge_350
+ bits 13
+ flags RC5|CONST_LENGTH
+ eps 30
+ aeps 100
+
+ one 969 811
+ zero 969 811
+ plead 1097
+ gap 114605
+ toggle_bit 2
+
+
+ begin codes
+ Go 0x00000000000017BB
+ Power 0x00000000000017BD
+ TV 0x000000000000179C
+ Videos 0x0000000000001798
+ Music 0x0000000000001799
+ Pictures 0x000000000000179A
+ Guide 0x000000000000179B
+ Radio 0x000000000000178C
+ Up 0x0000000000001794
+ Left 0x0000000000001796
+ Right 0x0000000000001797
+ Down 0x0000000000001795
+ OK 0x00000000000017A5
+ Back/Exit 0x000000000000179F
+ Menu/i 0x000000000000178D
+ Vol+ 0x0000000000001790
+ Vol- 0x0000000000001791
+ Prev.Ch 0x0000000000001792
+ Mute 0x000000000000178F
+ Ch+ 0x00000000000017A0
+ Ch- 0x00000000000017A1
+ Record 0x00000000000017B7
+ Stop 0x00000000000017B6
+ Rewind 0x00000000000017B2
+ Play 0x00000000000017B5
+ Forward 0x00000000000017B4
+ Replay/SkipBackward 0x00000000000017A4
+ Pause 0x00000000000017B0
+ SkipForward 0x000000000000179E
+ 1 0x0000000000001781
+ 2 0x0000000000001782
+ 3 0x0000000000001783
+ 4 0x0000000000001784
+ 5 0x0000000000001785
+ 6 0x0000000000001786
+ 7 0x0000000000001787
+ 8 0x0000000000001788
+ 9 0x0000000000001789
+ Asterix 0x000000000000178A
+ 0 0x0000000000001780
+ # 0x000000000000178E
+ Red 0x000000000000178B
+ Green 0x00000000000017AE
+ Yellow 0x00000000000017B8
+ Blue 0x00000000000017A9
+ end codes
+
+end remote
diff --git a/utilities/lirc/lirc/lircd.conf.rcx115 b/utilities/lirc/lirc/lircd.conf.rcx115
new file mode 100644
index 0000000..a5cb30c
--- /dev/null
+++ b/utilities/lirc/lirc/lircd.conf.rcx115
@@ -0,0 +1,83 @@
+
+# Please make this file available to others
+# by sending it to <lirc@bartelmus.de>
+#
+# this config file was automatically generated
+# using lirc-0.8.2(default) on Thu Feb 14 15:05:16 2008
+#
+# contributed by
+#
+# brand: medion
+# model no. of remote control: rcx115
+# devices being controlled by this remote: sat-receiver (md 24242)
+#
+
+begin remote
+
+ name rcx115
+ bits 16
+ flags SPACE_ENC|CONST_LENGTH
+ eps 30
+ aeps 100
+
+ header 9132 4432
+ one 652 1607
+ zero 652 478
+ ptrail 653
+ repeat 9134 2171
+ pre_data_bits 16
+ pre_data 0x10EF
+ gap 108758
+# toggle_bit_mask 0x0
+
+ begin codes
+ Power 0x50AF
+ Mute 0xD02F
+ 1 0x807F
+ 2 0x40BF
+ 3 0xC03F
+ 4 0x20DF
+ 5 0xA05F
+ 6 0x609F
+ 7 0xE01F
+ 8 0x10EF
+ 9 0x906F
+ 0 0x00FF
+# Prog+ 0xF807
+# Prog- 0x708F
+ Channel+ 0xF807
+ Channel- 0x708F
+ Volume+ 0x04FB
+ Volume- 0x08F7
+ Menu 0x30CF
+# Opt 0xB04F
+# FF 0xF00F
+# RW 0xE817
+ User1 0xB04F
+ User2 0xF00F
+ User3 0xE817
+ Up 0x8877
+ Down 0x48B7
+ Left 0xC837
+ Right 0x28D7
+ Ok 0xA857
+# Exit 0x6897
+ Back 0x6897
+ Info 0x18E7
+# EPG 0xD827
+# TV/Radio 0x9867
+# Pr 0x14EB
+# Text 0x58A7
+ User4 0xD827
+ User5 0x9867
+ User6 0x14EB
+ User7 0x58A7
+ Red 0x7887
+ Green 0x847B
+ Yellow 0x38C7
+ Blue 0xB847
+ end codes
+
+end remote
+
+
diff --git a/utilities/lirc/lirc/lircd.conf.technisat b/utilities/lirc/lirc/lircd.conf.technisat
new file mode 100644
index 0000000..88250b4
--- /dev/null
+++ b/utilities/lirc/lirc/lircd.conf.technisat
@@ -0,0 +1,73 @@
+# brand: Technisat
+# model no. of remote control: TTS35AI
+# devices being controlled by this remote: Skystar 2.6D
+#
+
+begin remote
+
+ name TTS35AI
+ bits 13
+ flags RC5|CONST_LENGTH
+ eps 30
+ aeps 100
+
+ one 882 803
+ zero 882 803
+ plead 905
+ gap 112766
+ toggle_bit 2
+ min_repeat 3
+
+ begin codes
+ Power 0x1A8C
+ Mute 0x1A8D
+ 1 0x1281
+ 2 0x1A82
+ 3 0x1283
+ 4 0x1A84
+ 5 0x1285
+ 6 0x1A86
+ 7 0x1287
+ 8 0x1A88
+ 9 0x1289
+ 0 0x1A80
+# -/-- 0x128A
+ User1 0x128A
+# A/B 0x1AA3
+ User2 0x1AA3
+ Red 0x0AAB
+ Green 0x02AC
+ Yellow 0x0AAD
+ Blue 0x02AE
+ Ok 0x0A97
+ Up 0x12A0
+ Down 0x1AA1
+ Left 0x1291
+ Right 0x1A90
+# SFI 0x12AF
+ User3 0x12AF
+# Exit 0x1AA2
+ Back 0x1AA2
+# INFO 0x028F
+ User4 0x028F
+ Prog+ 0x1AA0
+ Prog- 0x12A1
+# TV/Radio 0x0293
+ User5 0x0293
+ Volume+ 0x1A90
+ Volume- 0x1291
+ Menu 0x0A92
+# Hilfe 0x1A8F
+ User6 0x1A8F
+# TXT 0x12BC
+ User7 0x12BC
+# STOP 0x1AA9
+ User8 0x1AA9
+# EXT 0x12B8
+ User9 0x12B8
+# HILFE2 0x0AB6
+ end codes
+
+end remote
+
+
diff --git a/utilities/lirc/lirc/lircd.conf.vivcontrol6 b/utilities/lirc/lirc/lircd.conf.vivcontrol6
new file mode 100644
index 0000000..5a7cebe
--- /dev/null
+++ b/utilities/lirc/lirc/lircd.conf.vivcontrol6
@@ -0,0 +1,63 @@
+#
+# this config file was automatically generated
+# using WinLIRC 0.6.5 (LIRC 0.6.1pre3) on Mon May 03 13:45:32 2004
+#
+# contributed by
+#
+# brand: Vivanco
+# model: Viv.Control6
+# supported devices: DVD player (code 278)
+#
+
+begin remote
+
+ name Viv.Control6
+ bits 11
+ flags SPACE_ENC
+ eps 25
+ aeps 100
+
+ header 2479 466
+ one 1279 466
+ zero 673 466
+ ptrail 673
+ post_data_bits 8
+ post_data 0xC9
+ gap 13186
+ toggle_bit 0
+
+
+ begin codes
+ Power 0x0000000000000545
+ Up 0x0000000000000465
+ Down 0x0000000000000065
+ 1 0x0000000000000005
+ 2 0x0000000000000405
+ 3 0x0000000000000205
+ 4 0x0000000000000605
+ 5 0x0000000000000105
+ 6 0x0000000000000505
+ 7 0x0000000000000305
+ 8 0x0000000000000705
+ 9 0x0000000000000085
+ 0 0x0000000000000485
+ User1 0x0000000000000655
+ User2 0x0000000000000155
+ Mute 0x0000000000000255
+ Menu 0x00000000000006C5
+ Ok 0x0000000000000685
+ Back 0x0000000000000785
+ Up 0x00000000000004F5
+ Down 0x00000000000002F5
+ Left 0x00000000000006F5
+ Right 0x00000000000001F5
+ Red 0x0000000000000665
+ Yellow 0x0000000000000265
+ Blue 0x0000000000000165
+ User3 0x0000000000000385
+ Green 0x00000000000000E5
+ User4 0x00000000000004E5
+ end codes
+
+end remote
+
diff --git a/utilities/lirc/lirc/lircmd.conf b/utilities/lirc/lirc/lircmd.conf
new file mode 100644
index 0000000..8aa0168
--- /dev/null
+++ b/utilities/lirc/lirc/lircmd.conf
@@ -0,0 +1,5 @@
+#UNCONFIGURED
+#
+# To find out how to get a proper configuration file please read:
+#
+# /usr/share/doc/lirc/README.Debian
diff --git a/utilities/lirc/lirc/lircrc b/utilities/lirc/lirc/lircrc
new file mode 100644
index 0000000..96e9124
--- /dev/null
+++ b/utilities/lirc/lirc/lircrc
@@ -0,0 +1,142 @@
+# Zum starten diverser Programme kann irexec benutzt werden: irexec -d
+# "remote" muss mit "name" in lircd.conf übereinstimmen
+#
+#
+#
+
+
+begin
+ remote = TTS35AI
+ button = Power
+ prog = irexec
+ repeat = 0
+ config = mplayer -vo xv -ao oss dvd://1
+end
+
+begin
+ remote = TTS35AI
+ prog = xmms
+ button = One
+ repeat = 0
+ config = PLAY
+
+end
+
+begin
+ remote = TTS35AI
+ prog = xmms
+ button = Stop
+ repeat = 0
+ config = STOP
+
+end
+
+begin
+ remote = TTS35AI
+ prog = xmms
+ button = VolU
+ repeat = 0
+ config = VOL_UP 5
+
+end
+
+begin
+ remote = TTS35AI
+ prog = xmms
+ button = VolD
+ repeat = 0
+ config = VOL_DOWN 5
+
+end
+
+begin
+ remote = TTS35AI
+ prog = xmms
+ button = ProgU
+ repeat = 0
+ config = PREV
+
+end
+
+begin
+ remote = TTS35AI
+ prog = xmms
+ button = ProgD
+ repeat = 0
+ config = NEXT
+
+end
+
+begin
+ remote = TTS35AI
+ prog = xmms
+ button = Forward
+ repeat = 1
+ config = FWD 5
+
+end
+
+begin
+ remote = TTS35AI
+ prog = xmms
+ button = Rewind
+ repeat = 1
+ config = BWD 5
+
+end
+
+begin
+ remote = TTS35AI
+ button = Volume+
+ prog = mplayer
+ config = volume 1
+ repeat = 1
+end
+
+begin
+ remote = TTS35AI
+ button = Volume+
+ prog = mplayer
+ config = volume -1
+ repeat = 1
+end
+
+begin
+ remote = TTS35AI
+ button = Up
+ prog = mplayer
+ config = pause
+ repeat = 0
+end
+
+begin
+ remote = TTS35AI
+ button = Down
+ prog = mplayer
+ config = quit
+ repeat = 0
+end
+
+begin
+ remote = TTS35AI
+ button = OK
+ prog = mplayer
+ config = vo_fullscreen
+ repeat = 0
+end
+
+begin
+ remote = TTS35AI
+ button = Left
+ prog = mplayer
+ config = seek -50
+ repeat = 1
+end
+
+begin
+ remote = TTS35AI
+ button = Right
+ prog = mplayer
+ config = seek 50
+ repeat = 1
+end
diff --git a/utilities/lirc/lirc_init b/utilities/lirc/lirc_init
new file mode 100644
index 0000000..05afcb0
--- /dev/null
+++ b/utilities/lirc/lirc_init
@@ -0,0 +1,130 @@
+#! /bin/sh
+#
+# This is an init script for Debian.
+# Copy it to /etc/init.d/lirc and type
+# > update-rc.d lirc defaults 20
+#
+
+# default configuration
+DEVICE="/dev/lirc0"
+DRIVER="default"
+LOAD_MODULES=true
+MODULES="lirc_dev lirc_serial"
+
+LIRCD="/usr/sbin/lircd"
+LIRCD_ARGS="--permission=666"
+#LIRCD_CONF="/etc/lirc/lircd.conf"
+
+LIRCMD="/usr/sbin/lircd"
+#LIRCMD_CONF="/etc/lirc/lircmd.conf"
+
+START_LIRCD=true
+START_LIRCMD=true
+
+# load configuration if any
+if [ -f /etc/default/lirc ] ; then
+ . /etc/default/lirc
+fi
+
+[ ! -n "$LIRCD_CONF" ] && LIRCD_CONF="/etc/lirc/lircd.conf"
+[ ! -n "$LIRCMD_CONF" ] && LIRCMD_CONF="/etc/lirc/lircmd.conf"
+
+# functions
+load_modules ()
+{
+ local MODULES_MISSING=false
+
+ for mod in $*
+ do
+ modprobe -k $mod 2> /dev/null || MODULES_MISSING=true
+ done
+
+ if $MODULES_MISSING; then
+ echo "#####################################################"
+ echo "## I couldn't load the required kernel modules ##"
+ echo "## You should install lirc-modules-source to build ##"
+ echo "## kernel support for your hardware. ##"
+ echo "#####################################################"
+ echo "## If this message is not appropriate you may set ##"
+ echo "## LOAD_MODULES=false in /etc/default/lirc ##"
+ echo "#####################################################"
+ START_LIRCMD=false
+ START_LIRCD=false
+ fi
+}
+
+build_args ()
+{
+ local ARGS="$*"
+ if [ -n "$DEVICE" ] && [ "$DEVICE" != "none" ]; then
+ if [ -d /dev/lirc ] && [ "$DEVICE" = "/dev/lirc" ];then
+ #new device names
+ DEVICE="/dev/lirc/0"
+ fi
+ ARGS="--device=$DEVICE $ARGS"
+ fi
+ if [ -n "$DRIVER" ] && [ "$DRIVER" != "none" ]; then
+ ARGS="--driver=$DRIVER $ARGS"
+ fi
+ echo $ARGS
+}
+
+# test
+test -f $LIRCD || exit 0
+test -f $LIRCMD || exit 0
+
+if [ ! -f $LIRCD_CONF ] || grep -q "^#UNCONFIGURED" $LIRCD_CONF ; then
+ if [ "$1" = "start" ] ; then
+ echo "##################################################"
+ echo "## LIRC IS NOT CONFIGURED ##"
+ echo "## ##"
+ echo "## read /usr/share/doc/lirc/html/configure.html ##"
+ echo "##################################################"
+ fi
+ START_LIRCD=false
+ START_LIRCMD=false
+fi
+if [ ! -f $LIRCMD_CONF ] || grep -q "^#UNCONFIGURED" $LIRCMD_CONF ; then
+ START_LIRCMD=false
+fi
+
+# run
+case "$1" in
+ start)
+ if $LOAD_MODULES && $START_LIRCD ; then
+ load_modules $MODULES
+ fi
+ if $START_LIRCD ; then
+ echo -n "Starting lirc daemon: lircd"
+ LIRCD_ARGS=`build_args $LIRCD_ARGS`
+ start-stop-daemon --start --quiet --exec $LIRCD -- $LIRCD_ARGS $LIRCD_CONF < /dev/null
+ fi
+ if $START_LIRCMD ; then
+ echo -n " lircmd"
+ start-stop-daemon --start --quiet --exec $LIRCMD -- $LIRCMD_CONF < /dev/null
+ fi
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping lirc daemon: lircmd"
+ start-stop-daemon --stop --quiet --exec $LIRCMD
+ echo -n " lircd"
+ start-stop-daemon --stop --quiet --exec $LIRCD
+ echo "."
+ ;;
+ reload|force-reload)
+ start-stop-daemon --stop --quiet --signal 1 --exec $LIRCD
+ start-stop-daemon --stop --quiet --signal 1 --exec $LIRCMD
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/lircd {start|stop|reload|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/utilities/lirc/utilitie.sh b/utilities/lirc/utilitie.sh
new file mode 100644
index 0000000..230ca0c
--- /dev/null
+++ b/utilities/lirc/utilitie.sh
@@ -0,0 +1,214 @@
+#!/bin/sh
+
+# x-vdr (Installations-Skript fuer einen VDR mit Debian als Basis)
+# von Marc Wernecke - www.zulu-entertainment.de
+# 17.03.2009
+
+# lirc
+
+source ./../../x-vdr.conf
+source ./../../setup.conf
+source ./../../functions
+
+# uncomment to reset LINUXVERSION
+#LINUXVERSION=
+
+# if you got into trouble, try again with a newer version like
+# http://www.lirc.org/software/snapshots/lirc-0.8.5pre1.tar.bz2
+
+WEB="http://prdownloads.sourceforge.net/lirc/lirc-0.8.4a.tar.bz2"
+VERSION="lirc-0.8.4a"
+LINK="lirc"
+
+VAR=`basename $WEB`
+DIR=`pwd`
+
+KERNEL=`uname -r`
+LIRC_MODULES="/lib/modules/$KERNEL/misc"
+[ "$LINUXVERSION" = "sidux" ] && LIRC_MODULES="/lib/modules/$KERNEL/extra/lirc-modules"
+LIRC_DRIVER="serial"
+AUTOSERIAL="/var/lib/setserial/autoserial.conf"
+MODPROBE="/etc/modprobe.d/lirc"
+if [ "$lirc_port" = "2" ]; then
+ LIRC_PORT="0x2f8"
+ LIRC_IRQ="3"
+ SERIAL="/dev/ttyS1"
+else
+ LIRC_PORT="0x3f8"
+ LIRC_IRQ="4"
+ SERIAL="/dev/ttyS0"
+fi
+
+# make
+function make_util() {
+ if [ "$LINUXVERSION" != "sidux" ]; then
+ # pre install
+ if [ "`apt_installed lirc`" != "xvdr" ]; then
+ apt_remove "lirc $(apt-cache search liblircclient | cut -d" " -f1 | grep liblircclient)"
+ fi
+
+ # download and untar
+ download_util
+ extract_util
+
+ # symlink
+ cd $SOURCEDIR
+ rm -f $LINK
+ ln -vfs $VERSION $LINK
+
+ # install
+ WITH_LIRC_DRIVER=
+ for i in $LIRC_DRIVER; do
+ WITH_LIRC_DRIVER="$WITH_LIRC_DRIVER --with-driver=$i"
+ done
+ if [ ! "$WITH_LIRC_DRIVER" ]; then
+ LIRC_DRIVER="serial"
+ WITH_LIRC_DRIVER="--with-driver=serial"
+ fi
+
+ cd $SOURCEDIR/$LINK
+ ./configure --prefix=$PREFIX $WITH_LIRC_DRIVER --with-port=$LIRC_PORT --with-irq=$LIRC_IRQ --enable-debug
+ make && checkinstall --fstrans=no --install=yes --pkgname=lirc --pkgversion "0.8.4a-xvdr" --default && TEST=ok
+
+ # test
+ if [ "$TEST" != "ok" ]; then
+ log "ERROR - $VERSION konnte nicht erstellt werden"
+ return 1
+ fi
+
+ # save deb file
+ [ -d "$DIR/packages" ] || mkdir -p $DIR/packages
+ cp -f lirc*.deb $DIR/packages
+
+ # dummy
+ cd $DIR/packages
+ echo "Section: misc
+Priority: optional
+Standards-Version: 3.6.2
+
+Package: liblircclient0
+Version: 0.8.4a-xvdr-1
+Maintainer: Musterman <Musterman@musterman.de>
+Depends: ffmpeg
+Provides: ffmpeg
+Architecture: all
+Description: Dummy-liblircclient0
+" > ./liblircclient0
+
+ equivs-build liblircclient0
+ dpkg -i liblircclient0_0.8.4a-xvdr-1_all.deb
+
+ ldconfig
+ fi
+
+ # config
+ TEST=`which lircd`
+ if [ "$TEST" ] && [ -f $LIRC_MODULES/lirc_dev.ko ]; then
+ # lirc_serial
+ if [ -f $LIRC_MODULES/lirc_serial.ko ]; then
+ setserial $SERIAL uart none
+ echo "#KERNEL" > /var/lib/setserial/autoserial.conf
+ echo "$SERIAL uart none" >> /var/lib/setserial/autoserial.conf
+ echo "" >> /var/lib/setserial/autoserial.conf
+
+ echo "alias char-major-61 lirc_serial" > /etc/modprobe.d/lirc
+ echo "options lirc_serial irq=$LIRC_IRQ io=$LIRC_PORT" >> /etc/modprobe.d/lirc
+ echo "" >> /etc/modprobe.d/lirc
+ depmod
+ fi
+
+ # /etc/default/lirc
+ MODULES="lirc_dev"
+ for i in $LIRC_DRIVER; do
+ MODULES="$MODULES lirc_$i"
+ done
+
+ echo "# /etc/default/lirc
+#
+# Arguments which will be used when launching lircd
+LIRCD_ARGS=\"--permission=666\"
+
+#Don't start lircmd even if there seems to be a good config file
+#START_LIRCMD=false
+
+#Try to load appropriate kernel modules
+LOAD_MODULES=true
+
+# Run \"lircd --driver=help\" for a list of supported drivers.
+DRIVER=\"default\"
+# If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be
+# automatically used instead
+DEVICE=\"/dev/lirc0\"
+MODULES=\"$MODULES\"
+
+# Default configuration files for your hardware
+LIRCD_CONF=\"/etc/lirc/lircd.conf\"
+LIRCMD_CONF=\"/etc/lirc/lircmd.conf\"
+" > /etc/default/lirc
+
+ # copy files
+ cd $DIR
+ cp -rf lirc /etc
+ cp -f lirc_init /etc/init.d/lirc
+ chmod 0755 /etc/init.d/lirc
+
+ # autostart
+ unfreeze_rc
+ update-rc.d lirc defaults 20
+ freeze_rc
+
+ log "SUCCESS - $VERSION erstellt"
+ else
+ log "ERROR - $VERSION konnte nicht erstellt werden"
+ fi
+}
+
+# clean
+function clean_util() {
+ if [ "$LINUXVERSION" != "sidux" ]; then
+ # uninstall
+ apt_remove "lirc liblircclient0"
+
+ # remove source
+ cd $SOURCEDIR
+ [ -L "$LINK" ] && rm -rf "$LINK"
+ [ -d "$VERSION" ] && rm -rf "$VERSION"
+
+ ldconfig
+ fi
+
+ # remove config
+ rm -rf /etc/lirc
+ rm -f /etc/default/lirc
+ rm -f /etc/modprobe.d/lirc
+ depmod
+
+ # remove autostart
+ unfreeze_rc
+ update-rc.d -f lirc remove
+ freeze_rc
+ rm -f /etc/init.d/lirc
+}
+
+# test
+function status_util() {
+ TEST=`which lircd`
+ if [ "$TEST" ] && [ -f $LIRC_MODULES/lirc_dev.ko ]; then
+ [ "$LINUXVERSION" = "sidux" ] && [ -f /etc/default/lirc ] && echo "2" && return 0
+ [ -d $SOURCEDIR/$LINK ] && echo "2" && return 0
+ echo "1"
+ else
+ echo "0"
+ fi
+}
+
+# commands
+if [ $# \> 0 ]; then
+ cmd=$1
+ cmd_util
+else
+ make_util
+ status_util
+fi
+
+exit 0