Enigma2 plugin to dowload and create channels picons files form lyngsat.com

imake.bat 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. @echo off
  2. :=== Parameters ===
  3. set ver=0.4e
  4. set prog=GetPicons
  5. set pack_name=enigma2-plugin-extensions-getpicons
  6. set pack_prefix=enigma2-plugin-extensions-
  7. set desc=Download/create channels picons from lyngsat.com
  8. set ext_dir=usr\lib\enigma2\python\Plugins\Extensions\
  9. set script_dir=usr\script\
  10. set ipk_dir=ipkg\
  11. set release_dir=release\
  12. set feed_dir=q:\web\feed\
  13. set AR=\MinGW\bin\ar.exe
  14. set TAR=\MinGW\msys\1.0\bin\tar.exe
  15. :=== data files
  16. if exist %ipk_dir% rm -r -f %ipk_dir%
  17. mkdir %ipk_dir%
  18. for %%f in (readme.md,changelog.md,__init__.py,plugin.py,get_picons.py) do xcopy /q /y %%f %ipk_dir%data\%ext_dir%%prog%\
  19. for %%f in (get_picons.sh ) do xcopy /q /y %%f %ipk_dir%data\%script_dir%
  20. :=== control file ===
  21. mkdir %ipk_dir%CONTROL\
  22. rem xcopy /v /d /y control %ipk_dir%CONTROL\
  23. echo 2.0 >%ipk_dir%debian-binary
  24. (
  25. echo Version: %ver%
  26. echo Package: %pack_name%
  27. echo Description: %desc%
  28. echo Architecture: all
  29. echo Section:
  30. echo Priority: optional
  31. echo Maintainer: ivars777@gmail.com
  32. echo Homepage:
  33. echo Depends: python-xml python-imaging requests
  34. echo Source:
  35. ) >%ipk_dir%CONTROL\control
  36. dos2unix %ipk_dir%CONTROL\control
  37. :=== preinst file ===
  38. (
  39. echo #!/bin/sh
  40. echo if [ -d %ext_dir%%prog% ]; then
  41. echo rm -rf %ext_dir%%prog% ^> /dev/null 2^>^&1
  42. echo fi
  43. echo if [ -e %script_dir%get_picons.sh ]; then
  44. echo rm %script_dir%get_picons.sh ^> /dev/null 2^>^&1
  45. echo fi
  46. echo exit 0
  47. ) >%ipk_dir%CONTROL\preinst
  48. dos2unix %ipk_dir%CONTROL\preinst
  49. :=== postrm file ===
  50. (
  51. echo #!/bin/sh
  52. echo if [ -d %ext_dir%%prog% ]; then
  53. echo rm -rf %ext_dir%%prog% ^> /dev/null 2^>^&1
  54. echo fi
  55. echo if [ -e %script_dir%get_picons.sh ]; then
  56. echo rm %script_dir%get_picons.sh ^> /dev/null 2^>^&1
  57. echo fi
  58. echo exit 0
  59. ) >%ipk_dir%CONTROL\postrm
  60. dos2unix %ipk_dir%CONTROL\postrm
  61. :=== create ipk file ===
  62. if not exist %release_dir% mkdir %release_dir%
  63. %TAR% -C ipkg\data --mode=777 -czf ipkg\data.tar.gz .
  64. %TAR% -C ipkg\CONTROL --mode=777 -czf ipkg\control.tar.gz .
  65. if exist %release_dir%%pack_name%_%ver%.ipk del %release_dir%%pack_name%_%ver%.ipk
  66. %AR% -r %release_dir%%pack_name%_%ver% ipkg\debian-binary ipkg\data.tar.gz ipkg\control.tar.gz
  67. @echo on
  68. mv %release_dir%%pack_name%_%ver% %release_dir%%pack_name%_%ver%.ipk
  69. copy %release_dir%%pack_name%_%ver%.ipk %feed_dir%%pack_name%_%ver%.ipk
  70. pushd %feed_dir%
  71. python c:\Python27\Scripts\opkg-make-index . >Packages
  72. dos2unix Packages
  73. gzip -f -k Packages
  74. popd