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

imake.bat 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. @echo off
  2. :=== Parameters ===
  3. if ()==(%1%) (
  4. set ver=0.5m
  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\ltc.py
  51. sources\mtgplay.py
  52. sources\play24.py
  53. sources\replay.py
  54. sources\serialguru.py
  55. sources\tvdom.py
  56. sources\ustvnow.py
  57. sources\viaplay.py
  58. sources\YouTubeVideoUrl.py
  59. sources\jsinterp.py
  60. sources\swfinterp.py
  61. sources\streams.cfg
  62. resolvers\__init__.py
  63. resolvers\aadecode.py
  64. resolvers\hqqresolver.py
  65. resolvers\openload3.py
  66. resolvers\youtuberesolver.py
  67. picons\*.*
  68. ) do echo f | xcopy /y /q %%f %ipk_dir%data\%ext_dir%%prog%\%%f
  69. xcopy /y /q playstreamproxy %ipk_dir%data\etc\init.d\
  70. :=== control file ===
  71. mkdir %ipk_dir%CONTROL\
  72. rem xcopy /v /d /y control %ipk_dir%CONTROL\
  73. echo 2.0 >%ipk_dir%debian-binary
  74. (
  75. echo Version: %ver%
  76. echo Package: %pack_name%
  77. echo Description: %desc%
  78. echo Architecture: all
  79. echo Section:
  80. echo Priority: optional
  81. echo Maintainer: ivars777@gmail.com
  82. echo Homepage:
  83. echo Depends: python-json,python-twisted-web,python-simplejson,python-html,python-zlib,python-requests
  84. echo Source:
  85. ) >%ipk_dir%CONTROL\control
  86. dos2unix %ipk_dir%CONTROL\control
  87. :=== preinst file ===
  88. (
  89. echo #!/bin/sh
  90. :echo if [ -d %ext_dir2%%prog% ]; then
  91. :echo rm -rf %ext_dir2%%prog%/* ^> /dev/null 2^>^&1
  92. :echo rm -rf %ext_dir2%%prog%/sources/*.py* ^> /dev/null 2^>^&1
  93. :echo rm -rf %ext_dir2%%prog%/resolvers/*.py* ^> /dev/null 2^>^&1
  94. :echo fi
  95. echo if [ -e /etc/init.d/playstreamproxy ]; then
  96. echo rm /etc/init.d/playstreamproxy ^> /dev/null 2^>^&1
  97. echo fi
  98. echo exit 0
  99. ) >%ipk_dir%CONTROL\preinst
  100. dos2unix %ipk_dir%CONTROL\preinst
  101. :=== postinst file ===
  102. (
  103. echo #!/bin/sh
  104. echo chmod +x /etc/init.d/playstreamproxy
  105. echo ln -s /etc/init.d/playstreamproxy /etc/rc4.d/S50playstreamproxy
  106. echo ln -s /etc/init.d/playstreamproxy /etc/rc3.d/S50playstreamproxy
  107. echo ln -s /etc/init.d/playstreamproxy /usr/bin/playstreamproxy
  108. echo exit 0
  109. ) >%ipk_dir%CONTROL\postinst
  110. dos2unix %ipk_dir%CONTROL\postinst
  111. :=== postrm file ===
  112. (
  113. echo #!/bin/sh
  114. :echo if [ -e /etc/rc4.d/S50playstreamproxy ]; then
  115. echo rm /etc/rc4.d/S50playstreamproxy ^> /dev/null 2^>^&1
  116. :echo fi
  117. echo #!/bin/sh
  118. :echo if [ -e /etc/rc3.d/S50playstreamproxy ]; then
  119. echo rm /etc/rc3.d/S50playstreamproxy ^> /dev/null 2^>^&1
  120. :echo fi
  121. :echo if [ -e /usr/bin/playstreamproxyy ]; then
  122. echo rm /usr/bin/playstreamproxy ^> /dev/null 2^>^&1
  123. :echo fi
  124. echo if [ -e /etc/init.d/playstreamproxy ]; then
  125. echo rm /etc/init.d/playstreamproxy ^> /dev/null 2^>^&1
  126. echo fi
  127. echo exit 0
  128. ) >%ipk_dir%CONTROL\postrm
  129. dos2unix %ipk_dir%CONTROL\postrm
  130. :=== conffiles file ===
  131. (
  132. echo %ext_dir2%%prog%/sources/streams.cfg
  133. ) >%ipk_dir%CONTROL\conffiles
  134. dos2unix %ipk_dir%CONTROL\conffiles
  135. :=== create ipk file ===
  136. if not exist %release_dir% mkdir %release_dir%
  137. %TAR% -C ipkg\data --mode=777 -czf ipkg\data.tar.gz .
  138. %TAR% -C ipkg\CONTROL --mode=777 -czf ipkg\control.tar.gz .
  139. if exist %release_dir%%pack_name%_%ver%.ipk del %release_dir%%pack_name%_%ver%.ipk
  140. %AR% -r %release_dir%%pack_name%_%ver% ipkg\debian-binary ipkg\data.tar.gz ipkg\control.tar.gz
  141. @echo on
  142. mv %release_dir%%pack_name%_%ver% %release_dir%%pack_name%_%ver%.ipk
  143. git add %release_dir%%pack_name%_%ver%.ipk