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

imake.bat 4.2KB

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