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

imake.bat 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. @echo off
  2. :=== Parameters ===
  3. set ver=0.4
  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 AR=\MinGW\bin\ar.exe
  13. set TAR=\MinGW\msys\1.0\bin\tar.exe
  14. :=== data files
  15. if exist %ipk_dir% rm -r -f %ipk_dir%
  16. mkdir %ipk_dir%
  17. for %%f in (readme.txt,__init__.py,plugin.py,get_picons.py) do xcopy /q /y %%f %ipk_dir%data\%ext_dir%%prog%\
  18. for %%f in (get_picons.sh ) do xcopy /q /y %%f %ipk_dir%data\%script_dir%
  19. :=== control file ===
  20. mkdir %ipk_dir%CONTROL\
  21. rem xcopy /v /d /y control %ipk_dir%CONTROL\
  22. echo 2.0 >%ipk_dir%debian-binary
  23. (
  24. echo Version: %ver%
  25. echo Package: %pack_name%
  26. echo Description: %desc%
  27. echo Architecture: all
  28. echo Section:
  29. echo Priority: optional
  30. echo Maintainer: ivars777@gmail.com
  31. echo Homepage:
  32. echo Depends: python-xml python-imaging requests
  33. echo Source:
  34. ) >%ipk_dir%CONTROL\control
  35. dos2unix %ipk_dir%CONTROL\control
  36. :=== preinst file ===
  37. (
  38. echo #!/bin/sh
  39. echo if [ -d %ext_dir%%prog% ]; then
  40. echo rm -rf %ext_dir%%prog% ^> /dev/null 2^>^&1
  41. echo fi
  42. echo if [ -e %script_dir%get_picons.sh ]; then
  43. echo rm %script_dir%get_picons.sh ^> /dev/null 2^>^&1
  44. echo fi
  45. echo exit 0
  46. ) >%ipk_dir%CONTROL\preinst
  47. dos2unix %ipk_dir%CONTROL\preinst
  48. :=== postrm file ===
  49. (
  50. echo #!/bin/sh
  51. echo if [ -d %ext_dir%%prog% ]; then
  52. echo rm -rf %ext_dir%%prog% ^> /dev/null 2^>^&1
  53. echo fi
  54. echo if [ -e %script_dir%get_picons.sh ]; then
  55. echo rm %script_dir%get_picons.sh ^> /dev/null 2^>^&1
  56. echo fi
  57. echo exit 0
  58. ) >%ipk_dir%CONTROL\postrm
  59. dos2unix %ipk_dir%CONTROL\postrm
  60. :=== create ipk file ===
  61. if not exist %release_dir% mkdir %release_dir%
  62. %TAR% -C ipkg\data --mode=777 -czf ipkg\data.tar.gz .
  63. %TAR% -C ipkg\CONTROL --mode=777 -czf ipkg\control.tar.gz .
  64. if exist %release_dir%%pack_name%_%ver%.ipk del %release_dir%%pack_name%_%ver%.ipk
  65. %AR% -r %release_dir%%pack_name%_%ver% ipkg\debian-binary ipkg\data.tar.gz ipkg\control.tar.gz
  66. @echo on
  67. mv %release_dir%%pack_name%_%ver% %release_dir%%pack_name%_%ver%.ipk