~jon-raiford/mythbuntu/lirc

« back to all changes in this revision

Viewing changes to debian/lirc.config.in

  • Committer: Mario Limonciello
  • Date: 2008-11-09 02:40:13 UTC
  • Revision ID: superm1@ubuntu.com-20081109024013-agh4q4s1de11gf3i
drop lirc.config.in

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh -e
2
 
 
3
 
AC_DEFINE ()
4
 
{
5
 
        CFLAGS="-D$1 $CFLAGS"
6
 
}
7
 
 
8
 
SetupDriver() 
9
 
{
10
 
 
11
 
    dialog  --clear --backtitle "$BACKTITLE" \
12
 
            --title "Select your driver" \
13
 
            --menu "$CONFIG_DRIVER_TEXT" 18 74 11 \
14
 
               \
15
 
                        1 "Home-brew (16x50 UART compatible serial port)" \
16
 
                        2 "Home-brew (parallel port)" \
17
 
                        3 "Home-brew (soundcard input)" \
18
 
                        4 "Other serial port devices" \
19
 
                        5 "TV card" \
20
 
                        6 "IrDA hardware" \
21
 
                        7 "PDAs" \
22
 
                        8 "USB devices" \
23
 
                        9 "Network (UDP)" \
24
 
                        0 "Other (MIDI, Bluetooth, etc.)" \
25
 
                        a "None (network connections only)" 2> $TEMP
26
 
    if test "$?" = "0"; then
27
 
        {
28
 
        set `cat $TEMP`
29
 
        if false; then :
30
 
        elif test "$1" = "1"; then LIRC_DRIVER=serial;          DRIVER_PARAMETER=com1; DRIVER_PARAM_TYPE=com;
31
 
        elif test "$1" = "2"; then LIRC_DRIVER=parallel;        DRIVER_PARAMETER=lpt1; DRIVER_PARAM_TYPE=lpt;
32
 
        elif test "$1" = "3"; then 
33
 
            dialog  --clear --backtitle "$BACKTITLE" \
34
 
                    --title "Select your driver" \
35
 
                    --menu "$CONFIG_DRIVER_TEXT" 10 74 3 \
36
 
                       \
37
 
                        1 "Simple IR diode (EXPERIMENTAL)" \
38
 
                        2 "IR receiver IC connected to auido input (EXPERIMENTAL)" \
39
 
                        3 "IR receiver IC connected to auido input using ALSA (EXPERIMENTAL)" 2> $TEMP
40
 
            if test "$?" = "0"; then
41
 
                {
42
 
                set `cat $TEMP`
43
 
                if false; then :
44
 
                elif test "$1" = "1"; then LIRC_DRIVER=dsp;             DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
45
 
                elif test "$1" = "2"; then LIRC_DRIVER=audio;           DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
46
 
                elif test "$1" = "3"; then LIRC_DRIVER=audio_alsa;      DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
47
 
                fi
48
 
                }
49
 
                else
50
 
                    return;
51
 
                fi;
52
 
        elif test "$1" = "4"; then 
53
 
            dialog  --clear --backtitle "$BACKTITLE" \
54
 
                    --title "Select your driver" \
55
 
                    --menu "$CONFIG_DRIVER_TEXT" 19 74 12 \
56
 
                       \
57
 
                        1 "Anir Multimedia Magic" \
58
 
                        2 "CARACA" \
59
 
                        3 "Creative Infra Receiver/CIMR100" \
60
 
                        4 "IRdeo" \
61
 
                        5 "IRdeo Remote" \
62
 
                        6 "Irman / UIR" \
63
 
                        7 "Logitech/AST" \
64
 
                        8 "PCMAK serial receiver" \
65
 
                        9 "Miro PCTV receiver" \
66
 
                        0 "Packard Bell receiver" \
67
 
                        a "Pinnacle Systems PCTV (pro) receiver" \
68
 
                        b "PixelView RemoteMaster RC2000/RC3000" \
69
 
                        c "REALmagic (bundled with Hollywood Plus DVD card)" \
70
 
                        d "Slink-e (receive only)" \
71
 
                        e "Silitek SM-1000" \
72
 
                        f "Tekram Irmate 210 (16x50 UART compatible serial port)" \
73
 
                        g "UIRT2 (receive only, UIR mode)" \
74
 
                        h "UIRT2 (receive and transmit)" \
75
 
                        i "X10 MouseRemote RF Receiver (Serial)" \
76
 
                        j "X10 MouseRemote RF Receiver (PS/2)" \
77
 
                        k "X10 MP3 Anywhere RF Receiver" 2> $TEMP
78
 
            if test "$?" = "0"; then
79
 
                {
80
 
                set `cat $TEMP`
81
 
                if false; then :
82
 
                elif test "$1" = "1"; then LIRC_DRIVER=animax;          DRIVER_PARAMETER=com1; DRIVER_PARAM_TYPE=com;
83
 
                elif test "$1" = "2"; then LIRC_DRIVER=caraca;          DRIVER_PARAMETER=tty1; DRIVER_PARAM_TYPE=tty;
84
 
                elif test "$1" = "3"; then LIRC_DRIVER=creative;        DRIVER_PARAMETER=tty1; DRIVER_PARAM_TYPE=tty;
85
 
                elif test "$1" = "4"; then LIRC_DRIVER=irdeo;           DRIVER_PARAMETER=com1; DRIVER_PARAM_TYPE=com;
86
 
                elif test "$1" = "5"; then LIRC_DRIVER=irdeo_remote;    DRIVER_PARAMETER=com1; DRIVER_PARAM_TYPE=com;
87
 
                elif test "$1" = "6"; then LIRC_DRIVER=irman;           DRIVER_PARAMETER=tty1; DRIVER_PARAM_TYPE=tty;
88
 
                elif test "$1" = "7"; then LIRC_DRIVER=logitech;        DRIVER_PARAMETER=tty1; DRIVER_PARAM_TYPE=tty;
89
 
                elif test "$1" = "8"; then LIRC_DRIVER=pcmak;           DRIVER_PARAMETER=tty1; DRIVER_PARAM_TYPE=tty;
90
 
                elif test "$1" = "9"; then LIRC_DRIVER=pctv;            DRIVER_PARAMETER=tty1; DRIVER_PARAM_TYPE=tty;
91
 
                elif test "$1" = "0"; then LIRC_DRIVER=packard_bell;    DRIVER_PARAMETER=com1; DRIVER_PARAM_TYPE=com;
92
 
                elif test "$1" = "a"; then LIRC_DRIVER=pctv;            DRIVER_PARAMETER=tty1; DRIVER_PARAM_TYPE=tty;
93
 
                elif test "$1" = "b"; then LIRC_DRIVER=remotemaster;    DRIVER_PARAMETER=tty1; DRIVER_PARAM_TYPE=tty;
94
 
                elif test "$1" = "c"; then LIRC_DRIVER=realmagic;       DRIVER_PARAMETER=tty1; DRIVER_PARAM_TYPE=tty;
95
 
                elif test "$1" = "d"; then LIRC_DRIVER=slinke;          DRIVER_PARAMETER=tty3; DRIVER_PARAM_TYPE=tty;
96
 
                elif test "$1" = "e"; then LIRC_DRIVER=silitek;         DRIVER_PARAMETER=tty1; DRIVER_PARAM_TYPE=tty;
97
 
                elif test "$1" = "f"; then LIRC_DRIVER=tekram;          DRIVER_PARAMETER=com1; DRIVER_PARAM_TYPE=com;
98
 
                elif test "$1" = "g"; then LIRC_DRIVER=uirt2;           DRIVER_PARAMETER=tty1; DRIVER_PARAM_TYPE=tty;
99
 
                elif test "$1" = "h"; then LIRC_DRIVER=uirt2_raw;       DRIVER_PARAMETER=tty1; DRIVER_PARAM_TYPE=tty;
100
 
                elif test "$1" = "i"; then LIRC_DRIVER=mouseremote;     DRIVER_PARAMETER=tty1; DRIVER_PARAM_TYPE=tty;
101
 
                elif test "$1" = "j"; then LIRC_DRIVER=mouseremote_ps2; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
102
 
                elif test "$1" = "k"; then LIRC_DRIVER=mp3anywhere;     DRIVER_PARAMETER=tty1; DRIVER_PARAM_TYPE=tty;
103
 
                fi
104
 
                }
105
 
                else
106
 
                    return;
107
 
                fi;
108
 
        elif test "$1" = "5"; then 
109
 
            dialog  --clear --backtitle "$BACKTITLE" \
110
 
                    --title "Select your driver" \
111
 
                    --menu "$CONFIG_DRIVER_TEXT" 19 74 12 \
112
 
                       \
113
 
                        1 "Askey Magic TView CPH03x (card=1)" \
114
 
                        2 "Askey/Typhoon/Anubis Magic TView CPH051/061 (bt878) (card=24)" \
115
 
                        3 "Asus TV-Box" \
116
 
                        4 "AverMedia TV card (TVCapture, TVPhone) (card=6)" \
117
 
                        5 "AverMedia TV card (TVCapture98, TVPhone98) (card=13/41)" \
118
 
                        6 "AverMedia TV card (VDOMATE) (use card=13)" \
119
 
                        7 "BestBuy Easy TV (BT848) (card=55)" \
120
 
                        8 "BestBuy Easy TV (BT878) (card=62)" \
121
 
                        9 "Chronos Video Shuttle II (card=35)" \
122
 
                        0 "Creative BreakOut-Box" \
123
 
                        a "Dynalink Magic TView (card=48)" \
124
 
                        b "FlyVideo II (card=8)" \
125
 
                        c "FlyVideo 98 (card=30)" \
126
 
                        d "FlyVideo 98/FM /2000S (card=56)" \
127
 
                        e "Flyvideo 98FM (LR50Q) / Typhoon TView TV/FM Tuner (card=36)" \
128
 
                        f "Hauppauge TV card (new I2C layer required)" \
129
 
                        g "Hauppauge DVB-s card (ver. 2.1)" \
130
 
                        h "Hercules Smart TV Stereo (card=100)" \
131
 
                        i "I-O Data Co. GV-BCTV5/PCI (card=81)" \
132
 
                        j "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF (card=78)" \
133
 
                        k "KNC ONE TV Station (-/SE/PRO/RDS)" \
134
 
                        l "Lenco MXTV-9578 CP (card=50)" \
135
 
                        m "Miro PCTV serial port receiver" \
136
 
                        n "Phoebe Tv Master + FM (card=22)" \
137
 
                        o "PixelView PlayTV PAK (card=50)" \
138
 
                        p "Pixelview PlayTV pro (card=37)" \
139
 
                        q "Pixelview PlayTV (bt878) (Prolink PV-BT878P+, card=16)" \
140
 
                        r "Prolink Pixelview PV-BT878P+ (Rev.4C,8E, card=70)" \
141
 
                        s "Prolink PV-BT878P+4E (card=50)" \
142
 
                        t "Prolink PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM) (card=72)" \
143
 
                        u "ProVideo PV951 (card=42)" \
144
 
                        v "Technisat MediaFocus I" \
145
 
                        w "Tekram M230 Mach64 (and others bt829 based)" \
146
 
                        x "TriTan Technology TView95 CPH03x (card=1)" \
147
 
                        y "TView99 CPH063 (card=38)" \
148
 
                        z "Typhoon TView RDS / FM Stereo (card=53)" \
149
 
                        A "Winfast PVR2000 (Linux kernel >=2.6.11 required)" \
150
 
                        B "Winfast TV2000/XP (card=34)" \
151
 
                        C "WinView 601 (card=17)" 2> $TEMP
152
 
            if test "$?" = "0"; then
153
 
                {
154
 
                set `cat $TEMP`
155
 
                if false; then :
156
 
                elif test "$1" = "1"; then LIRC_DRIVER=cph03x;          DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
157
 
                elif test "$1" = "2"; then LIRC_DRIVER=cph06x;          DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
158
 
                elif test "$1" = "3"; then LIRC_DRIVER=tvbox;           DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
159
 
                elif test "$1" = "4"; then LIRC_DRIVER=avermedia;       DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
160
 
                elif test "$1" = "5"; then LIRC_DRIVER=avermedia98;     DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
161
 
                elif test "$1" = "6"; then LIRC_DRIVER=avermedia_vdomate;       DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
162
 
                elif test "$1" = "7"; then LIRC_DRIVER=bestbuy;         DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
163
 
                elif test "$1" = "8"; then LIRC_DRIVER=bestbuy2;        DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
164
 
                elif test "$1" = "9"; then LIRC_DRIVER=chronos;         DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
165
 
                elif test "$1" = "0"; then LIRC_DRIVER=breakoutbox;     DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
166
 
                elif test "$1" = "a"; then LIRC_DRIVER=cph03x;          DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
167
 
                elif test "$1" = "b"; then LIRC_DRIVER=flyvideo;        DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
168
 
                elif test "$1" = "c"; then LIRC_DRIVER=flyvideo;        DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
169
 
                elif test "$1" = "d"; then LIRC_DRIVER=flyvideo;        DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
170
 
                elif test "$1" = "e"; then LIRC_DRIVER=flyvideo;        DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
171
 
                elif test "$1" = "f"; then LIRC_DRIVER=hauppauge;       DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
172
 
                elif test "$1" = "g"; then LIRC_DRIVER=hauppauge_dvb;   DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
173
 
                elif test "$1" = "h"; then LIRC_DRIVER=hercules_smarttv_stereo; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
174
 
                elif test "$1" = "i"; then LIRC_DRIVER=gvbctv5pci;      DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
175
 
                elif test "$1" = "j"; then LIRC_DRIVER=kworld;          DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
176
 
                elif test "$1" = "k"; then LIRC_DRIVER=knc_one;         DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
177
 
                elif test "$1" = "l"; then LIRC_DRIVER=pixelview_pak;   DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
178
 
                elif test "$1" = "m"; then LIRC_DRIVER=pctv;            DRIVER_PARAMETER=tty1; DRIVER_PARAM_TYPE=tty;
179
 
                elif test "$1" = "n"; then LIRC_DRIVER=cph06x;          DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
180
 
                elif test "$1" = "o"; then LIRC_DRIVER=pixelview_pak;   DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
181
 
                elif test "$1" = "p"; then LIRC_DRIVER=pixelview_pro;   DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
182
 
                elif test "$1" = "q"; then LIRC_DRIVER=pixelview_bt878; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
183
 
                elif test "$1" = "r"; then LIRC_DRIVER=pixelview_pro;   DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
184
 
                elif test "$1" = "s"; then LIRC_DRIVER=pixelview_pak;   DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
185
 
                elif test "$1" = "t"; then LIRC_DRIVER=pixelview_pro;   DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
186
 
                elif test "$1" = "u"; then LIRC_DRIVER=provideo;        DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
187
 
                elif test "$1" = "v"; then LIRC_DRIVER=mediafocusI;     DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
188
 
                elif test "$1" = "w"; then LIRC_DRIVER=tekram_bt829;    DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
189
 
                elif test "$1" = "x"; then LIRC_DRIVER=cph03x;          DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
190
 
                elif test "$1" = "y"; then LIRC_DRIVER=cph06x;          DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
191
 
                elif test "$1" = "z"; then LIRC_DRIVER=knc_one;         DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
192
 
                elif test "$1" = "A"; then LIRC_DRIVER=leadtek_pvr2000; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
193
 
                elif test "$1" = "B"; then LIRC_DRIVER=leadtek_0010;    DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
194
 
                elif test "$1" = "C"; then LIRC_DRIVER=leadtek_0007;    DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
195
 
                fi
196
 
                }
197
 
                else
198
 
                    return;
199
 
                fi;
200
 
        elif test "$1" = "6"; then 
201
 
            dialog  --clear --backtitle "$BACKTITLE" \
202
 
                    --title "Select your driver" \
203
 
                    --menu "$CONFIG_DRIVER_TEXT" 11 74 4 \
204
 
                       \
205
 
                        1 "SIR IrDA (built-in IR ports)" \
206
 
                        2 "Tekram Irmate 210 (16x50 UART compatible serial port)" \
207
 
                        3 "ITE IT8712/IT8705 CIR port (experimental, 2.4.x required)" \
208
 
                        4 "Actisys Act200L SIR driver support" 2> $TEMP
209
 
            if test "$?" = "0"; then
210
 
                {
211
 
                set `cat $TEMP`
212
 
                if false; then :
213
 
                elif test "$1" = "1"; then LIRC_DRIVER=sir;             DRIVER_PARAMETER=com3; DRIVER_PARAM_TYPE=com;
214
 
                elif test "$1" = "2"; then LIRC_DRIVER=tekram;          DRIVER_PARAMETER=com1; DRIVER_PARAM_TYPE=com;
215
 
                elif test "$1" = "3"; then LIRC_DRIVER=it87;            DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
216
 
                elif test "$1" = "4"; then LIRC_DRIVER=act200l;         DRIVER_PARAMETER=com1; DRIVER_PARAM_TYPE=com;
217
 
                fi
218
 
                }
219
 
                else
220
 
                    return;
221
 
                fi;
222
 
        elif test "$1" = "7"; then 
223
 
            dialog  --clear --backtitle "$BACKTITLE" \
224
 
                    --title "Select your driver" \
225
 
                    --menu "$CONFIG_DRIVER_TEXT" 9 74 2 \
226
 
                       \
227
 
                        1 "HP iPAQ" \
228
 
                        2 "Sharp Zaurus" 2> $TEMP
229
 
            if test "$?" = "0"; then
230
 
                {
231
 
                set `cat $TEMP`
232
 
                if false; then :
233
 
                elif test "$1" = "1"; then LIRC_DRIVER=sa1100;          DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
234
 
                elif test "$1" = "2"; then LIRC_DRIVER=sa1100;          DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
235
 
                fi
236
 
                }
237
 
                else
238
 
                    return;
239
 
                fi;
240
 
        elif test "$1" = "8"; then 
241
 
            dialog  --clear --backtitle "$BACKTITLE" \
242
 
                    --title "Select your driver" \
243
 
                    --menu "$CONFIG_DRIVER_TEXT" 18 74 11 \
244
 
                       \
245
 
                        1 "ATI/NVidia/X10 I & II RF Remote" \
246
 
                        2 "ATI/NVidia/X10 RF Remote (userspace)" \
247
 
                        3 "Dign HV5 HTPC IR/VFD Module" \
248
 
                        4 "Home Electronics Tira USB device" \
249
 
                        5 "Igor Cesko's USB IR Receiver" \
250
 
                        6 "PCMAK USB receiver" \
251
 
                        7 "Sasem OnAir Remocon-V" \
252
 
                        8 "Sound Blaster Extigy USB sound card" \
253
 
                        9 "Soundgraph iMON MultiMedian IR/VFD" \
254
 
                        0 "Streamzap PC Remote" \
255
 
                        a "Windows Media Center Remotes" 2> $TEMP
256
 
            if test "$?" = "0"; then
257
 
                {
258
 
                set `cat $TEMP`
259
 
                if false; then :
260
 
                elif test "$1" = "1"; then LIRC_DRIVER=atiusb;          DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
261
 
                elif test "$1" = "2"; then LIRC_DRIVER=atilibusb;       DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
262
 
                elif test "$1" = "3"; then LIRC_DRIVER=sasem;           DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
263
 
                elif test "$1" = "4"; then LIRC_DRIVER=tira;            DRIVER_PARAMETER=ttyUSB1; DRIVER_PARAM_TYPE=ttyUSB;
264
 
                elif test "$1" = "5"; then LIRC_DRIVER=igorplugusb;     DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
265
 
                elif test "$1" = "6"; then LIRC_DRIVER=pcmak_usb;       DRIVER_PARAMETER=ttyUSB1; DRIVER_PARAM_TYPE=ttyUSB;
266
 
                elif test "$1" = "7"; then LIRC_DRIVER=sasem;           DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
267
 
                elif test "$1" = "8"; then LIRC_DRIVER=exaudio;         DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
268
 
                elif test "$1" = "9"; then LIRC_DRIVER=imon;            DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
269
 
                elif test "$1" = "0"; then LIRC_DRIVER=streamzap;       DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
270
 
                elif test "$1" = "a"; then LIRC_DRIVER=mceusb;          DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
271
 
                fi
272
 
                }
273
 
                else
274
 
                    return;
275
 
                fi;
276
 
        elif test "$1" = "9"; then LIRC_DRIVER=udp;             DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
277
 
        elif test "$1" = "0"; then 
278
 
            dialog  --clear --backtitle "$BACKTITLE" \
279
 
                    --title "Select your driver" \
280
 
                    --menu "$CONFIG_DRIVER_TEXT" 13 74 6 \
281
 
                       \
282
 
                        1 "AOpen XC Cube EA65, EA65-II" \
283
 
                        2 "Creative LiveDrive midi" \
284
 
                        3 "Creative LiveDrive sequencer" \
285
 
                        4 "Creative iNFRA CDROM" \
286
 
                        5 "Ericsson mobile phone via Bluetooth" \
287
 
                        6 "Linux input layer (/dev/input/eventX)" 2> $TEMP
288
 
            if test "$?" = "0"; then
289
 
                {
290
 
                set `cat $TEMP`
291
 
                if false; then :
292
 
                elif test "$1" = "1"; then LIRC_DRIVER=ea65;            DRIVER_PARAMETER=tty2; DRIVER_PARAM_TYPE=tty;
293
 
                elif test "$1" = "2"; then LIRC_DRIVER=livedrive_midi;  DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
294
 
                elif test "$1" = "3"; then LIRC_DRIVER=livedrive_seq;   DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
295
 
                elif test "$1" = "4"; then LIRC_DRIVER=creative_infracd;        DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
296
 
                elif test "$1" = "5"; then LIRC_DRIVER=bte;             DRIVER_PARAMETER=btty; DRIVER_PARAM_TYPE=none;
297
 
                elif test "$1" = "6"; then LIRC_DRIVER=devinput;        DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
298
 
                fi
299
 
                }
300
 
                else
301
 
                    return;
302
 
                fi;
303
 
        elif test "$1" = "a"; then LIRC_DRIVER=none;            DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none;
304
 
        fi
305
 
        }
306
 
        else
307
 
            return;
308
 
        fi;
309
 
 
310
 
}
311
 
 
312
 
ponder ()
313
 
{
314
 
        driver=$1
315
 
 
316
 
        #UPSTREAM HEURISTICS#
317
 
        
318
 
        lircd_driver=`expr $HW_DEFAULT : 'hw_\(.*\)'`
319
 
        if [ "$IRTTY" != "none" ];then
320
 
                DEVICE=$IRTTY
321
 
        else
322
 
                DEVICE="/dev/lirc"
323
 
        fi
324
 
        MODULES=`echo -n $lirc_driver | sed -n -e '/lirc_/p'`;
325
 
 
326
 
        [ "$SOFT_CARRIER" = "on" ] && AC_DEFINE LIRC_SERIAL_SOFTCARRIER
327
 
        [ "$TRANSMITTER" = "on" ] && AC_DEFINE LIRC_SERIAL_TRANSMITTER
328
 
 
329
 
}
330
 
 
331
 
DebconfSave ()
332
 
{
333
 
        db_set lirc/driver "$lircd_driver"
334
 
        db_set lirc/modules "$MODULES"
335
 
        db_set lirc/device "$DEVICE"
336
 
        db_set lirc/lircd_conf "$lircd_conf"
337
 
        db_set lirc/lircmd_conf "$lircmd_conf"
338
 
        db_set lirc/port "$LIRC_PORT"
339
 
        db_set lirc/irq "$LIRC_IRQ"
340
 
        db_set lirc/timer "$TIMER"
341
 
        db_set lirc/cflags "$CFLAGS"
342
 
}
343
 
 
344
 
# Source debconf library.
345
 
. /usr/share/debconf/confmodule
346
 
 
347
 
# Tell users to use IntelliMouse instead of IMPS/2
348
 
if \
349
 
        [ -f /etc/lirc/lircmd.conf ] && \
350
 
        grep -q -i "^[^#]*PROTOCOL[\t ]*IMPS/2" /etc/lirc/lircmd.conf
351
 
then
352
 
        db_input medium lirc/should-use-IntelliMouse || true
353
 
fi
354
 
 
355
 
# Should I install device nodes?
356
 
db_input medium lirc/install_devices || true
357
 
db_go
358
 
 
359
 
db_fget lirc/reconfigure configured
360
 
CONFIGURED=$RET
361
 
 
362
 
if $CONFIGURED; then
363
 
        db_input medium lirc/reconfigure || true
364
 
        db_go
365
 
fi
366
 
db_get lirc/reconfigure
367
 
 
368
 
if ! $CONFIGURED || $RET; then
369
 
        TEMP=`mktemp /tmp/lirc.XXXXXX`
370
 
        CONFIG=`mktemp /tmp/lirc.XXXXXX`
371
 
        START=`mktemp /tmp/lirc.XXXXXX`
372
 
 
373
 
        db_set lirc/reconfigure false
374
 
        db_fset lirc/reconfigure seen true
375
 
 
376
 
        ConfigDriver || true
377
 
 
378
 
        #TEMP is the output of the last invocation of dialog, which dumps the
379
 
        #selected choice or nothing if cancelled
380
 
 
381
 
        if [ -n "`cat $TEMP`" ];then
382
 
                ponder $LIRC_DRIVER || true
383
 
                DebconfSave 
384
 
                db_fset lirc/reconfigure configured true
385
 
                db_fset lirc/reconfigure config_changed true
386
 
        else
387
 
                #Canceled
388
 
                echo CANCELED;
389
 
        fi
390
 
 
391
 
        rm -f $TEMP $CONFIG $START
392
 
fi
393
 
 
394
 
# Tell the user to take care of old configuration files if they are
395
 
# still there
396
 
if [ -f /etc/lircmd.conf ] || [ -f /etc/lircd.conf ];then
397
 
        db_reset lirc/take_care_of_old_config
398
 
        db_input high lirc/take_care_of_old_config || true
399
 
        db_go
400
 
fi
401
 
 
402
 
# Tell the user about the old /var/log/lirc log file
403
 
if [ -f /var/log/lircd ]
404
 
then
405
 
        db_fset lirc/remove_var-log-lircd seen false
406
 
        db_input medium lirc/remove_var-log-lircd || true
407
 
        db_go
408
 
fi
409