Enigma2 plugin to to play various online streams (mostly Latvian).

imake.bat 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. @echo off
  2. :=== Parameters ===
  3. if ()==(%1%) (
  4. set ver=0.5o
  5. rem echo Please provide version
  6. rem pause
  7. rem GOTO:EOF
  8. ) else (
  9. set ver=%1
  10. )
  11. set prog=PlayStream
  12. set pack_name=enigma2-plugin-extensions-playstream
  13. set desc=Play online streams from various sources, mostly Latvian
  14. set ext_dir=usr\lib\enigma2\python\Plugins\Extensions\
  15. set ext_dir2=/usr/lib/enigma2/python/Plugins/Extensions/
  16. set script_dir=usr\script\
  17. set ipk_dir=ipkg\
  18. set release_dir=release\
  19. set AR=\MinGW\bin\ar.exe
  20. set TAR=\MinGW\msys\1.0\bin\tar.exe
  21. :=== data files ===
  22. if exist %ipk_dir% rm -r -f %ipk_dir%
  23. mkdir %ipk_dir%
  24. for %%f in (
  25. readme.md
  26. changelog.md
  27. __init__.py
  28. plugin.py
  29. plugin.png
  30. %prog%.py
  31. %prog%.png
  32. ContentSources.py
  33. VideoDownload.py
  34. enigma2_api.py
  35. resolver.py
  36. util.py
  37. streamproxy.py
  38. offline.mp4
  39. demjson.py
  40. locale\*.*
  41. sources\__init__.py
  42. sources\SourceBase.py
  43. sources\cinemalive.py
  44. sources\config.py
  45. sources\euronews.py
  46. sources\filmix.py
  47. sources\filmon.py
  48. sources\iplayer.py
  49. sources\kinofilmnet.py
  50. sources\movieplace.py
  51. sources\ltc.py
  52. sources\mtgplay.py
  53. sources\play24.py
  54. sources\replay.py
  55. sources\serialguru.py
  56. sources\tvdom.py
  57. sources\ustvnow.py
  58. sources\viaplay.py
  59. sources\YouTubeVideoUrl.py
  60. sources\jsinterp.py
  61. sources\swfinterp.py
  62. sources\streams.cfg
  63. resolvers\__init__.py
  64. resolvers\aadecode.py
  65. resolvers\hqqresolver.py
  66. resolvers\openload3.py
  67. resolvers\hdgo.py
  68. resolvers\kapnob.py
  69. resolver\kodik.py
  70. resolvers\youtuberesolver.py
  71. picons\*.*
  72. ) do echo f | xcopy /y /q %%f %ipk_dir%data\%ext_dir%%prog%\%%f
  73. xcopy /y /q playstreamproxy %ipk_dir%data\etc\init.d\
  74. :=== control file ===
  75. mkdir %ipk_dir%CONTROL\
  76. rem xcopy /v /d /y control %ipk_dir%CONTROL\
  77. echo 2.0 >%ipk_dir%debian-binary
  78. (
  79. echo Version: %ver%
  80. echo Package: %pack_name%
  81. echo Description: %desc%
  82. echo Architecture: all
  83. echo Section:
  84. echo Priority: optional
  85. echo Maintainer: ivars777@gmail.com
  86. echo Homepage:
  87. echo Depends: python-json,python-twisted-web,python-simplejson,python-html,python-zlib,python-requests
  88. echo Source:
  89. ) >%ipk_dir%CONTROL\control
  90. dos2unix %ipk_dir%CONTROL\control
  91. :=== preinst file ===
  92. (
  93. echo #!/bin/sh
  94. :echo if [ -d %ext_dir2%%prog% ]; then
  95. :echo rm -rf %ext_dir2%%prog%/* ^> /dev/null 2^>^&1
  96. :echo rm -rf %ext_dir2%%prog%/sources/*.py* ^> /dev/null 2^>^&1
  97. :echo rm -rf %ext_dir2%%prog%/resolvers/*.py* ^> /dev/null 2^>^&1
  98. :echo fi
  99. echo if [ -e /etc/init.d/playstreamproxy ]; then
  100. echo rm /etc/init.d/playstreamproxy ^> /dev/null 2^>^&1
  101. echo fi
  102. echo exit 0
  103. ) >%ipk_dir%CONTROL\preinst
  104. dos2unix %ipk_dir%CONTROL\preinst
  105. :=== postinst file ===
  106. (
  107. echo #!/bin/sh
  108. echo chmod +x /etc/init.d/playstreamproxy
  109. echo ln -s /etc/init.d/playstreamproxy /etc/rc4.d/S50playstreamproxy
  110. echo ln -s /etc/init.d/playstreamproxy /etc/rc3.d/S50playstreamproxy
  111. echo ln -s /etc/init.d/playstreamproxy /usr/bin/playstreamproxy
  112. echo exit 0
  113. ) >%ipk_dir%CONTROL\postinst
  114. dos2unix %ipk_dir%CONTROL\postinst
  115. :=== postrm file ===
  116. (
  117. echo #!/bin/sh
  118. :echo if [ -e /etc/rc4.d/S50playstreamproxy ]; then
  119. echo rm /etc/rc4.d/S50playstreamproxy ^> /dev/null 2^>^&1
  120. :echo fi
  121. echo #!/bin/sh
  122. :echo if [ -e /etc/rc3.d/S50playstreamproxy ]; then
  123. echo rm /etc/rc3.d/S50playstreamproxy ^> /dev/null 2^>^&1
  124. :echo fi
  125. :echo if [ -e /usr/bin/playstreamproxyy ]; then
  126. echo rm /usr/bin/playstreamproxy ^> /dev/null 2^>^&1
  127. :echo fi
  128. echo if [ -e /etc/init.d/playstreamproxy ]; then
  129. echo rm /etc/init.d/playstreamproxy ^> /dev/null 2^>^&1
  130. echo fi
  131. echo exit 0
  132. ) >%ipk_dir%CONTROL\postrm
  133. dos2unix %ipk_dir%CONTROL\postrm
  134. :=== conffiles file ===
  135. (
  136. echo %ext_dir2%%prog%/sources/streams.cfg
  137. ) >%ipk_dir%CONTROL\conffiles
  138. dos2unix %ipk_dir%CONTROL\conffiles
  139. :=== create ipk file ===
  140. if not exist %release_dir% mkdir %release_dir%
  141. %TAR% -C ipkg\data --mode=777 -czf ipkg\data.tar.gz .
  142. %TAR% -C ipkg\CONTROL --mode=777 -czf ipkg\control.tar.gz .
  143. if exist %release_dir%%pack_name%_%ver%.ipk del %release_dir%%pack_name%_%ver%.ipk
  144. %AR% -r %release_dir%%pack_name%_%ver% ipkg\debian-binary ipkg\data.tar.gz ipkg\control.tar.gz
  145. @echo on
  146. mv %release_dir%%pack_name%_%ver% %release_dir%%pack_name%_%ver%.ipk
  147. git add %release_dir%%pack_name%_%ver%.ipk