@echo off :=== Parameters === if ()==(%1%) ( python get_version.py PlayStream.py >version.txt cat version.txt pause set /p ver=%ipk_dir%debian-binary ( echo Version: %ver% echo Package: %pack_name% echo Description: %desc% echo Architecture: all echo Section: echo Priority: optional echo Maintainer: ivars777@gmail.com echo Homepage: echo Depends: python-json,python-twisted-web,python-simplejson,python-html,python-zlib,python-requests echo Source: ) >%ipk_dir%CONTROL\control dos2unix %ipk_dir%CONTROL\control :=== preinst file === ( echo #!/bin/sh :echo if [ -d %ext_dir2%%prog% ]; then :echo rm -rf %ext_dir2%%prog%/* ^> /dev/null 2^>^&1 :echo rm -rf %ext_dir2%%prog%/sources/*.py* ^> /dev/null 2^>^&1 :echo rm -rf %ext_dir2%%prog%/resolvers/*.py* ^> /dev/null 2^>^&1 :echo fi echo if [ -e /etc/init.d/playstreamproxy ]; then echo rm /etc/init.d/playstreamproxy ^> /dev/null 2^>^&1 echo fi echo exit 0 ) >%ipk_dir%CONTROL\preinst dos2unix %ipk_dir%CONTROL\preinst :=== postinst file === ( echo #!/bin/sh echo chmod +x /etc/init.d/playstreamproxy echo ln -s /etc/init.d/playstreamproxy /etc/rc4.d/S50playstreamproxy echo ln -s /etc/init.d/playstreamproxy /etc/rc3.d/S50playstreamproxy echo ln -s /etc/init.d/playstreamproxy /usr/bin/playstreamproxy echo exit 0 ) >%ipk_dir%CONTROL\postinst dos2unix %ipk_dir%CONTROL\postinst :=== postrm file === ( echo #!/bin/sh :echo if [ -e /etc/rc4.d/S50playstreamproxy ]; then echo rm /etc/rc4.d/S50playstreamproxy ^> /dev/null 2^>^&1 :echo fi echo #!/bin/sh :echo if [ -e /etc/rc3.d/S50playstreamproxy ]; then echo rm /etc/rc3.d/S50playstreamproxy ^> /dev/null 2^>^&1 :echo fi :echo if [ -e /usr/bin/playstreamproxyy ]; then echo rm /usr/bin/playstreamproxy ^> /dev/null 2^>^&1 :echo fi echo if [ -e /etc/init.d/playstreamproxy ]; then echo rm /etc/init.d/playstreamproxy ^> /dev/null 2^>^&1 echo fi echo exit 0 ) >%ipk_dir%CONTROL\postrm dos2unix %ipk_dir%CONTROL\postrm :=== conffiles file === ( echo %ext_dir2%%prog%/sources/streams.cfg ) >%ipk_dir%CONTROL\conffiles dos2unix %ipk_dir%CONTROL\conffiles :=== create ipk file === if not exist %release_dir% mkdir %release_dir% %TAR% -C ipkg\data --mode=777 -czf ipkg\data.tar.gz . %TAR% -C ipkg\CONTROL --mode=777 -czf ipkg\control.tar.gz . if exist %release_dir%%pack_name%_%ver%.ipk del %release_dir%%pack_name%_%ver%.ipk %AR% -r %release_dir%%pack_name%_%ver% ipkg\debian-binary ipkg\data.tar.gz ipkg\control.tar.gz @echo on mv %release_dir%%pack_name%_%ver% %release_dir%%pack_name%_%ver%.ipk git add %release_dir%%pack_name%_%ver%.ipk copy %release_dir%%pack_name%_%ver%.ipk %feed_dir%%pack_name%_%ver%.ipk pushd %feed_dir% python c:\Python27\Scripts\opkg-make-index . >Packages dos2unix Packages gzip -f -k Packages popd