OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

229 lines
7.2 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../vdr/vdr.conf
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; version 2 of the License. A copy of the
  12. # GNU General Public License can be found in the file COPYING.
  13. # --- T2-COPYRIGHT-NOTE-END ---
  14. PLUGIN_LIST=""
  15. SKIN_LIST=""
  16. [ $SDECFG_PKG_VDR_REMOTE -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST remote"
  17. [ $SDECFG_PKG_VDR_FEMON -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST femon"
  18. [ $SDECFG_PKG_VDR_MP3 -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST mp3"
  19. [ $SDECFG_PKG_VDR_OSDTELETEXT -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST osdteletext"
  20. [ $SDECFG_PKG_VDR_GRAPHLCD -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST graphlcd"
  21. [ $SDECFG_PKG_VDR_IMAGE -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST image"
  22. [ $SDECFG_PKG_VDR_DVD -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST dvd"
  23. [ $SDECFG_PKG_VDR_VCD -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST vcd"
  24. [ $SDECFG_PKG_VDR_PCD -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST pcd"
  25. [ $SDECFG_PKG_VDR_AUDIOCD -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST audiocd"
  26. [ $SDECFG_PKG_VDR_SOFTDEVICE -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST softdevice"
  27. [ $SDECFG_PKG_VDR_XINE -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST xine"
  28. [ $SDECFG_PKG_VDR_DXR3 -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST dxr3"
  29. [ $SDECFG_PKG_VDR_BURN -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST burn"
  30. [ $SDECFG_PKG_VDR_CDDA -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST cdda"
  31. [ $SDECFG_PKG_VDR_EPGSEARCH -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST epgsearch"
  32. [ $SDECFG_PKG_VDR_BITSTREAMOUT -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST bitstreamout"
  33. [ $SDECFG_PKG_VDR_DIGICAM -gt 0 ] && PLUGIN_LIST="$PLUGIN_LIST digicam"
  34. [ $SDECFG_PKG_VDR_TEXT2SKIN -gt 0 ] && {
  35. PLUGIN_LIST="$PLUGIN_LIST text2skin"
  36. SKIN_LIST="DeepBlue lightblue16 vdrskin-enigma"
  37. }
  38. # Enable compatibility mode for weird streaming clients
  39. [ $SDECFG_PKG_VDR_VFAT -gt 0 ] && var_append GCC_WRAPPER_APPEND ' ' '-DVFAT=1'
  40. extract_patches() {
  41. echo "Extracting patches ..."
  42. for fpatch in `match_source_file -p vdr-$ver.*.diff` ; do
  43. echo "$fpatch"
  44. cat $fpatch | patch -p 1
  45. done
  46. }
  47. extract_plugins() {
  48. echo "Extracting plugins ..."
  49. cd PLUGINS/src
  50. for vplugin in $PLUGIN_LIST ; do
  51. for fplugin in `match_source_file -p vdr-$vplugin` ; do
  52. # Extract plugin source
  53. echo "$vplugin: $fplugin"
  54. tar $taropt $fplugin
  55. find . -type d -name "$vplugin-*" -exec ln -sf {} $vplugin \;
  56. # Apply plugin patches
  57. for fpatch in `ls $confdir/$vplugin-*.diff` ; do
  58. echo "$fpatch"
  59. cat $fpatch | patch -p 0
  60. done
  61. # Fix plugins: VDRVERSION -> APIVERSION
  62. sed -i -e 's/VDRVERSION/APIVERSION/g' $vplugin/Makefile
  63. # Copy plugin documentation to vdr root directory
  64. for docu in README README.DE INSTALL MANUAL FAQ ; do
  65. [ -e $vplugin/$docu ] && cp -av $vplugin/$docu ../../$docu.$vplugin
  66. done
  67. done
  68. done
  69. cd ../..
  70. tar $taropt `match_source_file -p mplayer.sh`
  71. }
  72. gen_runvdr ()
  73. {
  74. cat << EOC > $root/etc/vdr/runvdr.sh
  75. #!/bin/sh
  76. VDRPRG="$bindir/vdr"
  77. VDRUSR=""
  78. KILL="$bindir/killall -q -TERM \$VDRPRG"
  79. VDIR="/video"
  80. PLUGINS=""
  81. [ $SDECFG_PKG_VDR_REMOTE -ne 0 ] && PLUGINS="\$PLUGINS@-Premote"
  82. [ $SDECFG_PKG_VDR_FEMON -ne 0 ] && PLUGINS="\$PLUGINS@-Pfemon"
  83. [ $SDECFG_PKG_VDR_GRAPHLCD -ne 0 ] && PLUGINS="\$PLUGINS@-P@graphlcd -c ks108"
  84. [ $SDECFG_PKG_VDR_MP3 -ne 0 ] && PLUGINS="\$PLUGINS@-P@mp3 -m /etc/vdr/mount.sh@-P@mplayer -m /etc/vdr/mount.sh -M /etc/vdr/mplayer.sh@"
  85. [ $SDECFG_PKG_VDR_DVD -ne 0 ] && PLUGINS="\$PLUGINS@-Pdvd"
  86. [ $SDECFG_PKG_VDR_VCD -ne 0 ] && PLUGINS="\$PLUGINS@-Pvcd"
  87. [ $SDECFG_PKG_VDR_PCD -ne 0 ] && PLUGINS="\$PLUGINS@-Ppcd"
  88. [ $SDECFG_PKG_VDR_IMAGE -ne 0 ] && PLUGINS="\$PLUGINS@-P@image -m /etc/vdr/mount.sh -C /etc/vdr/plugins/image/imageplugin.sh@"
  89. [ $SDECFG_PKG_VDR_OSDTELETEXT -ne 0 ] && PLUGINS="\$PLUGINS@-Posdteletext"
  90. [ $SDECFG_PKG_VDR_TEXT2SKIN -ne 0 ] && PLUGINS="\$PLUGINS@-Ptext2skin"
  91. [ $SDECFG_PKG_VDR_SOFTDEVICE -ne 0 ] && PLUGINS="\$PLUGINS@-Psoftdevice -L /usr/lib/vdr -vo xv:@"
  92. [ $SDECFG_PKG_VDR_XINE -ne 0 ] && PLUGINS="\$PLUGINS@-Pxine -r"
  93. [ $SDECFG_PKG_VDR_DXR3 -ne 0 ] && PLUGINS="\$PLUGINS@-Pdxr3"
  94. [ $SDECFG_PKG_VDR_BURN -ne 0 ] && PLUGINS="\$PLUGINS@-Pburn"
  95. [ $SDECFG_PKG_VDR_CDDA -ne 0 ] && PLUGINS="\$PLUGINS@-Pcdda"
  96. [ $SDECFG_PKG_VDR_EPGSEARCH -ne 0 ] && PLUGINS="\$PLUGINS@-Pepgsearch"
  97. [ $SDECFG_PKG_VDR_AUDIOCD -ne 0 ] && PLUGINS="\$PLUGINS@-Paudiocd"
  98. [ $SDECFG_PKG_VDR_BITSTREAMOUT -ne 0 ] && PLUGINS="\$PLUGINS@-Pbitstreamout"
  99. [ $SDECFG_PKG_VDR_DIGICAM -ne 0 ] && PLUGINS="\$PLUGINS@-Pdigicam"
  100. VDRCMD="\$VDRPRG@-c@/etc/vdr@-s@/usr/bin/vdrshutdown@-L@/usr/lib/vdr@-w@300@-u@root@-v@\$VDIR@\$PLUGINS@\$*"
  101. export HOME=/var/lib/vdr
  102. #export DVDCSS_METHOD=key
  103. #export LD_ASSUME_KERNEL=2.4.1
  104. OIFS="\$IFS"
  105. IFS=@
  106. echo "VDRCMD=\$VDRCMD"
  107. echo "\$\$" > /var/run/runvdr
  108. while test /bin/true ; do
  109. date
  110. echo "Starting VDR"
  111. (cd \$VDIR; \$VDRCMD \$VDRUSR)
  112. if test \$? -eq 0; then exit; fi
  113. date
  114. echo "Stopping VDR"
  115. \$KILL
  116. sleep 3
  117. done
  118. EOC
  119. }
  120. vdr_install() {
  121. echo "Installing vdr, plugins and scripts ..."
  122. mkdir -p $root/usr/lib/vdr
  123. mkdir -p $root/usr/lib/vdr/plugins
  124. mkdir -p $root/etc/vdr
  125. ln -sf $root/usr/lib/vdr/plugins $root/etc/vdr
  126. cp -a vdr $root/usr/bin
  127. cp -a ./PLUGINS/lib/* $root/usr/lib/vdr
  128. # Copy vdr default .conf
  129. cp -a *.conf $root/etc/vdr
  130. # cp -a $confdir/remote.conf $root/etc/vdr
  131. cp -a $confdir/{commands,reccmds}.conf $root/etc/vdr
  132. cp -a $confdir/mount.sh $root/etc/vdr
  133. gen_runvdr
  134. if [ "$SDECFG_PKG_VDR_MP3" = "1" ] ; then
  135. cp -a mplayer.sh* $root/etc/vdr
  136. cp -a $confdir/mp3sources.conf $root/etc/vdr/plugins
  137. cp -a $confdir/mplayersources.conf $root/etc/vdr/plugins
  138. fi
  139. if [ "$SDECFG_PKG_VDR_IMAGE" = "1" ] ; then
  140. cp -a $confdir/imagecmds.conf $root/etc/vdr
  141. cp -a $confdir/imagesources.conf $root/etc/vdr/plugins
  142. mkdir -p $root/etc/vdr/plugins/image
  143. cp -a ./PLUGINS/src/image/scripts/* $root/etc/vdr/plugins/image
  144. fi
  145. if [ "$SDECFG_PKG_VDR_DIGICAM" = "1" ] ; then
  146. cp -pv ./PLUGINS/src/digicam/examples/digicam{sources,destinations}.conf $root/etc/vdr/plugins
  147. fi
  148. if [ "$SDECFG_PKG_VDR_DVD" = "1" ] ; then
  149. touch $root/etc/vdr/plugins/VCD
  150. touch $root/etc/vdr/plugins/DVD
  151. fi
  152. if [ "$SDECFG_PKG_VDR_GRAPHLCD" = "1" ] ; then
  153. mkdir -p $root/etc/vdr/plugins/graphlcd
  154. cp -a ./PLUGINS/src/graphlcd/graphlcd $root/etc/vdr/plugins
  155. for tgt in convpic crtfont showpic drawtest ; do
  156. echo "graphlcd: $tgt"
  157. cp -pv ./PLUGINS/src/graphlcd/tools/$tgt/$tgt $root/$bindir
  158. done
  159. fi
  160. if [ "$SDECFG_PKG_VDR_TEXT2SKIN" = "1" ] ; then
  161. mkdir -p $root/etc/vdr/plugins/text2skin
  162. pushd $root/etc/vdr/plugins/text2skin
  163. for skin in $SKIN_LIST ; do
  164. echo "Extracting skin: $skin"
  165. tar $taropt `match_source_file -p $skin`
  166. done
  167. popd
  168. fi
  169. if [ "$SDECFG_PKG_VDR_XINE" = "1" ] ; then
  170. mkdir -p $root/etc/vdr/plugins/xine
  171. cp -a ./PLUGINS/src/xine/data/*.pes $root/etc/vdr/plugins/xine
  172. fi
  173. chmod u+x $root/etc/vdr/*.sh
  174. }
  175. vdr_extract () {
  176. extract_patches
  177. extract_plugins
  178. }
  179. vdr_plugins () {
  180. echo "Compiling vdr plugins"
  181. eval $MAKE plugins
  182. }
  183. makeinstopt=''
  184. var_append makeopt ' ' 'all'
  185. hook_add preconf 5 vdr_extract
  186. hook_add postmake 5 vdr_plugins
  187. hook_add postmake 8 vdr_install