1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
|
#!/bin/sh
# x-vdr (Installations-Skript fuer einen VDR mit Debian als Basis)
# von Marc Wernecke - www.zulu-entertainment.de
# 24.03.2009
# defaults
HAVE_64bit=$(uname -m | grep x86_64)
install_usefull_stuff="off"
ffmpeg="off" # on=source und off=deb
libdvd="off" # on=source und off=deb
sources_list="/etc/apt/sources.list"
[ -f ./x-vdr.conf ] || exit 1
source ./x-vdr.conf
[ -f ./setup.conf ] && source ./setup.conf
source ./functions
[ "$1" = "--upgrade" ] && APT_UPGRADE="on"
KERNEL=`uname -r`
DIR=`pwd`
EXITCODE=0
# create error file
error_file="$SOURCEDIR/x-vdr/.error"
echo "apt.sh" > $error_file
# verify_input
COPYLIST=`verify_input "$COPYLIST"`
burn=`verify_input "$burn"`
coverviewer=`verify_input "$coverviewer"`
ffmpeg=`verify_input "$ffmpeg"`
mplayer=`verify_input "$mplayer"`
projectx=`verify_input "$projectx"`
xine_lib=`verify_input "$xine_lib"`
# parsix only
if [ "$LINUXVERSION" = "parsix" ] || [ -f /etc/parsix-version ]; then
COPYLIST="off"
fi
# start
cd $SOURCEDIR
if [ ! -d $SOURCEDIR/x-vdr ]; then ln -vnfs $DIR x-vdr ; fi
if [ "$COPYLIST" = "on" ]; then
[ -f "$sources_list" ] || echo "# $sources_list" > $sources_list
if [ `grep -cw 'ubuntu' $sources_list` -gt 0 ] || [ "$LINUXVERSION" = "ubuntu" ]; then # ubuntu only
LINUXVERSION="ubuntu"
ubuntu_version="hardy"
[ `grep -cw 'hardy' $sources_list` -gt 0 ] && ubuntu_version="hardy" && log "found ubuntu-${ubuntu_version}"
[ `grep -cw 'intrepid' $sources_list` -gt 0 ] && ubuntu_version="intrepid" && log "found ubuntu-${ubuntu_version}"
[ `grep -cw 'jaunty' $sources_list` -gt 0 ] && ubuntu_version="jaunty" && log "found ubuntu-${ubuntu_version}"
medibuntu="deb http://de.packages.medibuntu.org/ $ubuntu_version free non-free"
if [ `grep -cw "^deb http://.*.packages.medibuntu.org/ $ubuntu_version free non-free" $sources_list` -eq 0 ]; then
log "adding '$medibuntu' to $sources_list"
var=`grep -m 1 "deb http://.*.packages.medibuntu.org/ $ubuntu_version free non-free" $sources_list`
if [ -n "$var" ]; then
sed -i $sources_list -e s?"$var"?"$medibuntu"?g
else
echo "$medibuntu" >> $sources_list
echo "" >> $sources_list
fi
wget -q http://de.packages.medibuntu.org/medibuntu-key.gpg -O- | apt-key add -
fi
else # debian, kanotix and sidux
if [ "$LINUXVERSION" = "sidux" ]; then # && [ `grep -cw 'sidux' $sources_list` -gt 0 ]
sources_list="/etc/apt/sources.list.d/debian.list"
[ -f "$sources_list" ] || echo "# debian" > $sources_list
debian_sid="deb http://ftp.de.debian.org/debian/ sid main contrib non-free"
if [ `grep -cw "^deb http://ftp.*debian.org/debian/ sid main contrib non-free" $sources_list` -eq 0 ]; then
var=`grep -m 1 "deb http://ftp.*debian.org/debian/ sid" $sources_list`
if [ -n "$var" ]; then
sed -i $sources_list -e s?"$var"?"$debian_sid"?g
else
echo "$debian_sid" >> $sources_list
echo "" >> $sources_list
fi
fi
sources_list="/etc/apt/sources.list.d/sidux.list"
[ -f "$sources_list" ] || echo "# sidux" > $sources_list
sidux_deb="deb http://sidux.com/debian/ sid main contrib non-free firmware fix.main fix.contrib fix.non-free"
sidux_deb_src="deb-src http://sidux.com/debian/ sid main contrib non-free firmware fix.main fix.contrib fix.non-free"
if [ `grep -cw "^$sidux_sid" $sources_list` -eq 0 ]; then
# var=`grep -m 1 "deb.*http://sidux.com/debian/ sid" $sources_list`
# if [ -n "$var" ]; then
# sed -i $sources_list -e s?"$var"?"$sidux_sid"?g
# else
# echo "$sidux_sid" >> $sources_list
# fi
echo "$sidux_sid" >> $sources_list
echo "#${sidux_deb_src}" >> $sources_list
echo "" >> $sources_list
fi
sources_list="/etc/apt/sources.list.d/multimedia.list"
[ -f "$sources_list" ] || echo "# debian-multimedia" > $sources_list
fi
# debian-multimedia > sources.list
if [ `grep -cw 'debian-multimedia' $sources_list` -eq 0 ]; then
echo "" >> $sources_list
echo "# debian-multimedia" >> $sources_list
fi
# multi_etch="deb http://www.debian-multimedia.org etch main"
# if [ `grep -cw "^$multi_etch" $sources_list` -eq 0 ]; then
# var=`grep -m 1 "$multi_etch" $sources_list`
# if [ -n "$var" ]; then
# sed -i $sources_list -e s?"$var"?"$multi_etch"?g
# else
# echo "$multi_etch" >> $sources_list
# echo "" >> $sources_list
# fi
# fi
multi_sid="deb http://www.debian-multimedia.org sid main"
if [ `grep -cw "^$multi_sid" $sources_list` -eq 0 ]; then
var=`grep -m 1 "$multi_sid" $sources_list`
if [ -n "$var" ]; then
sed -i $sources_list -e s?"$var"?"$multi_sid"?g
else
echo "$multi_sid" >> $sources_list
echo "" >> $sources_list
fi
fi
# gpg keyserver
key_list=`apt-key list`
# debian
if [ `grep -cw '^deb.*http://ftp.de.debian.org/debian' $sources_list` -gt 0 ]; then
if [ `echo $key_list | grep -cw 6070D3A1` -eq 0 ]; then
gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 6070D3A1
apt-key add /root/.gnupg/pubring.gpg
fi
fi
# debian-multimedia
if [ `grep -cw '^deb http://www.debian-multimedia.org' $sources_list` -gt 0 ]; then
if [ `echo $key_list | grep -cw 1F41B907` -eq 0 ]; then
gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 1F41B907
apt-key add /root/.gnupg/pubring.gpg
fi
fi
# gpg-end
fi
fi
cd $DIR
### update cache
apt-get update
### kick-list ->
if [ "$INSTALL_MODE" = "force" ]; then
apt_remove "$(apt-cache search vdr | cut -d" " -f1 | grep ^vdr)"
apt_remove "$(apt-cache search vdr | cut -d" " -f1 | grep [x\-]vdr)"
fi
apt_remove "$(apt-cache search vdr | cut -d" " -f1 | grep sidux)"
### get-list ->
apt_install "dialog xdialog rxvt" # -> x-vdr
# debian
if [ "$LINUXVERSION" = "debian" ]; then
apt_install "localepurge"
apt_install "rcconf"
apt_install "modconf"
apt_install "alsa-base" # -> bitstreamout
apt_install "ssh ethtool etherwake wireless-tools pump" # network-tools
apt_install "ttf-bitstream-vera"
apt_install "lynx unzip tofrodos"
apt_install "shared-mime-info" # -> xine-ui
fi
# sidux
#if [ "$LINUXVERSION" = "sidux" ]; then
#fi
# ubuntu
if [ "$LINUXVERSION" = "ubuntu" ]; then
libdvd="on" # on=source und off=deb
fi
apt_install "linux-headers-`uname -r`" # -> module - dvb, dxr3, lirc ...
[ -L /usr/src/linux ] && rm -f /usr/src/linux
if [ ! -d /usr/src/linux ]; then
cd /usr/src
ln -vfs /usr/src/linux-headers-`uname -r` linux
cd $DIR
fi
unfreeze_rc
apt_install "at" # -> system, vdr
freeze_rc
if [ "$projectx" = "on" ] || [ "$coverviewer" = "on" ] ; then # -> projectx (java libs)
apt_install "sun-java6-plugin"
apt_install "libcommons-net-java"
apt_remove "sun-j2re1.4"
# apt_install "libxp6"
# apt_install "libxtst6"
fi
if [ -n "$HAVE_64bit" ]; then
apt_install "w64codecs" # -> mplayer, xine
else
apt_install "w32codecs" # -> mplayer, xine
fi
apt_install "mc" # -> x-vdr
apt_install "setserial" # -> lirc
apt_install "dvb-utils"
apt_install "nvram-wakeup" # -> system, vdr (optional)
apt_install "wakeonlan" # -> system (optional)
apt_install "gcc g++"
apt_install "autoconf" # -> system
apt_install "automake1.9" # -> system
apt_install "fontconfig" # -> system
apt_install "libtool" # -> system
apt_install "libjpeg62-dev" # -> system
apt_install "libcap-dev" # -> system
apt_install "libc6 libc6-dev" # -> system
apt_install "cvs" # -> x-vdr
apt_install "mercurial" # -> x-vdr
apt_install "subversion" # -> x-vdr
apt_install "git-core" # -> x-vdr
apt_install "build-essential" # -> x-vdr
apt_install "checkinstall" # -> x-vdr
apt_install "yasm texi2html"
apt_install "equivs" # -> x-vdr
apt_install "imagemagick"
apt_install "libmagick++9-dev"
apt_install "libmp3lame-dev" # -> ffmpeg, mplayer
apt_install "libasound2-dev" # -> lirc
apt_install "libflac-dev libflac++-dev libogg-dev" # -> mplayer, xine !!! zur Zeit nicht verfuegbar: liboggflac-dev
apt_install "libmad0-dev libtag1-dev libvorbis-dev libwrap0-dev" # -> mp3, muggle, podcatcher
apt_install "libfaac-dev" # -> ffmpeg-svn und ???
apt_install "libfaad-dev" # -> ffmpeg-svn, xine ?
apt_install "libxvidcore4-dev" # -> ffmpeg-svn
#apt_install "libdts-dev" # -> now we use internal dts with xine-lib-hg
apt_install "libaa1 libaa1-dev libaa-bin libgtk2.0-dev libgtk2-perl"
apt_install "libogg-vorbis-header-pureperl-perl libvorbis-dev libvorbis0a libvorbisenc2"
apt_install "libtheora-dev"
apt_install "libfftw3-dev" # -> span
# ffmpeg spezial
if [ "$ffmpeg" = "on" ]; then
if [ "`apt_installed ffmpeg`" != "xvdr" ]; then
cd $SOURCEDIR/x-vdr/utilities/ffmpeg
chmod 744 ./utilitie.sh
log "Starte ffmpeg..."
./utilitie.sh || EXITCODE=1
fi
else
apt_install "ffmpeg"
apt_install "libavcodec-dev libavutil-dev libpostproc-dev libavformat-dev libswscale-dev"
fi
# libdvd spezial
if [ "$libdvd" = "on" ]; then
if [ "`apt_installed libdvdread4`" != "xvdr" ]; then
log "Starte dvdread..."
cd $SOURCEDIR/x-vdr/utilities/libdvd
chmod 744 ./utilitie-libdvdread.sh
./utilitie-libdvdread.sh
fi
if [ "`apt_installed libdvdnav4`" != "xvdr" ]; then
log "Starte dvdnav..."
cd $SOURCEDIR/x-vdr/utilities/libdvd
chmod 744 ./utilitie-libdvdnav.sh
./utilitie-libdvdnav.sh
fi
else
apt_install "libdvdread-dev libdvdnav-dev"
fi
#apt_install "transcode"
apt_install "liba52-0.7.4-dev vobcopy"
apt_install "mpeg2dec libmpeg2-4-dev"
apt_install "libfreetype6-dev" # freetype2
apt_install "libcompress-zlib-perl"
apt_install "dvd+rw-tools mkisofs"
apt_install "lame sox toolame"
apt_install "libfame-dev libmpeg3-dev"
apt_install "dvdauthor"
apt_install "imlib-base imlib11-dev libimlib2-dev" # imlib-progs
apt_install "libid3tag0-dev" # -> mp3
apt_install "libsndfile1-dev nasm" # -> mp3
apt_install "mp3cd" # -> music
apt_install "ripit id3 id3v2" # -> ripit
apt_install "libevent-dev"
apt_install "netpbm"
apt_install "cddb"
apt_install "libcdio-dev"
apt_install "libcdio-paranoia-dev" # -> xine
apt_install "libdirectfb-dev libdfb++-dev" # -> softdevice
apt_install "libxv-dev libxvmc-dev" # -> softdevice
apt_install "libxt-dev" # -> softdevice
apt_install "libxxf86vm-dev" # -> softdevice
apt_install "libquicktime-dev"
apt_install "libmjpegtools-dev"
apt_install "mjpegtools"
apt_install "y4mscaler"
apt_install "sqlite3" # -> muggle
apt_install "libsqlite3-dev" # -> muggle
apt_install "ogmtools" # -> vdrrip
apt_install "libgphoto2-2-dev" # -> digicam
apt_install "libboost-dev libgd2-xpm-dev" # -> burn
#apt_install "libiax-dev" # -> asterisk
[ "$mailbox" = "on" ] && apt_install "libc-client-dev" # -> mailbox
apt_install "libcurl4-openssl-dev" # -> tvtv, rssreader, podcatcher
apt_install "libxml2-dev" # -> vdrtvtime, podcatcher
apt_install "libxml++2.6-dev libsigc++-2.0-dev libglibmm-2.4-dev" # -> menuorg, podcatcher
apt_install "libxtst-dev" # -> vdrtvtime
apt_install "libtntnet-dev" # -> live
apt_install "libgtop2-dev" # -> graphtft
apt_install "sharutils" # -> burn-bc (snapshot)
apt_install "netcat" # -> osdserver
apt_install "libhildonmime0" # -> xine-lib / xine-ui (update-mime-database)
apt_install "libvcdinfo-dev" # -> xine-lib (hg)
apt_install "libextractor-dev" # -> xineliboutput
apt_install "libdbus-glib-1-dev" # -> xineliboutput (cvs)
apt_install "libxslt1-dev" # -> tvm2vdr
apt_install "input-utils" # -> fuer Bert ;)
apt_install "libsox-fmt-all" # -> SoX is the swiss army knife of sound processing.
apt_install "mp3gain" # -> dvdconvert
#apt_install "mysql-server-5.0" # -> xxv
#apt_install "libmysqlclient15-dev" # -> xxvautotimer
#apt_install "libpopt-dev libsdl-sound1.2-dev"
# usefull stuff
if [ "$install_usefull_stuff" = "on" ]; then
if [ "`apt_installed kde`" != "not installed" ]; then
apt_install "k9copy"
apt_install "konq-plugins"
apt_install "k3b libk3b3-extracodecs"
apt_install "libgnome2-perl synaptic"
fi
if [ "`apt_installed nautilus`" != "not installed" ]; then
apt_install "nautilus-gksu nautilus-image-converter nautilus-open-terminal"
apt_install "nautilus-script-audio-convert nautilus-script-manager"
fi
apt_install "iceweasel iceweasel-l10n-de iceweasel-itsalltext"
apt_install "flashplugin-nonfree"
apt_install "fontforge fontforge-doc"
apt_install "easytag"
apt_install "vlc"
fi
# cdfs spezial
if [ ! -d "/usr/src/modules/cdfs" ]; then
apt_install "cdfs-src"
cd /usr/src
tar xjf cdfs.tar.bz2
cd /usr/src/modules/cdfs/2.6
make
make install
mkdir /media/cdfs
fi
# vdr-burn / dvdconvert spezial
if [ "$burn" = "on" ] || [ "$dvdconvert" = "on" ]; then
# vdrsync
TEST=`which vdrsync.pl`
if [ "$TEST" ]; then
log "found $TEST"
else
cd $SOURCEDIR/x-vdr/utilities/vdrsync
chmod 0744 ./utilitie-test.sh
./utilitie-test.sh
fi
# genindex
TEST=`which genindex`
if [ "$TEST" ]; then
log "found $TEST"
else
cd $SOURCEDIR/x-vdr/utilities/genindex
chmod 0744 ./utilitie-test.sh
./utilitie-test.sh
fi
# m2vrequantizer
TEST=`which requant`
if [ "$TEST" ]; then
log "found $TEST"
else
cd $SOURCEDIR/x-vdr/utilities/m2vrequantizer
chmod 0744 ./utilitie-test.sh
./utilitie-test.sh
fi
# tcmplex-panteltje
TEST=`which tcmplex-panteltje`
if [ "$TEST" ]; then
log "found $TEST"
else
cd $SOURCEDIR/x-vdr/utilities/tcmplex_panteltje
chmod 0744 ./utilitie-test.sh
./utilitie-test.sh
fi
fi
echo ""
apt-get moo
echo ""
# timezone
dpkg-reconfigure tzdata
# final check
case $EXITCODE in
0 ) log "SUCCESS - apt.sh" ;;
* ) log "ERROR - apt.sh"; exit ;;
esac
# delete error file
[ -f $error_file ] && rm -f $error_file
exit 0
|