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.

230 lines
7.2 KiB

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