build_gekko.sh 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. #!/bin/bash
  2. echo "Cgminer Gekko Win32 builder:"
  3. echo ""
  4. echo "Cgminer-gekko:"
  5. export folder=$(pwd)
  6. cd ~
  7. if ! [ -d cgminer-gekko ]
  8. then
  9. git clone https://github.com/wareck/cgminer-gekko.git
  10. else
  11. cd cgminer-gekko
  12. git pull
  13. cd ..
  14. fi
  15. cd /home/wareck/cgminer-gekko
  16. autoreconf -fi
  17. CFLAGS="-O2 -msse2" ./configure --host=x86_64-w64-mingw32.static --disable-shared --enable-static --enable-gekko --disable-extranonce --with-system-libusb
  18. make
  19. strip cgminer.exe
  20. upx cgminer.exe
  21. if [ -d /tmp/cgminer-gekko/ ]; then rm -r /tmp/cgminer-gekko/ ;fi
  22. mkdir /tmp/cgminer-gekko
  23. cp cgminer.exe /tmp/cgminer-gekko/
  24. cp $folder/packages/gekko/manual.pdf /tmp/cgminer-gekko/
  25. cp $folder/packages/gekko/start.bat /tmp/cgminer-gekko/
  26. cp $folder/packages/gekko/zadig-2.8.exe /tmp/cgminer-gekko/
  27. cp $folder/packages/gekko/cgminer.conf /tmp/cgminer-gekko/
  28. cd /tmp/
  29. version=`git ls-remote -h https://github.com/wareck/cgminer-gekko.git | awk '{print $1}' |cut -c1-7`
  30. 7z a -tzip cgminer-gekko-$version.zip cgminer-gekko
  31. lftp -u wareck,zorn692611 ftpperso.free.fr <<EOF
  32. put cgminer-gekko-$version.zip -o /crypto/cgminer/cgminer-gekko-$version.zip
  33. EOF
  34. if ! [ -d /home/$USER/Bureau/win32_build/ ]; then mkdir /home/$USER/Bureau/win32_build ;fi
  35. cp cgminer-gekko-$version.zip /home/$USER/Bureau/win32_build/
  36. cd /home/wareck/cgminer-gekko
  37. CFLAGS="-O2 -msse2" ./configure --host=x86_64-w64-mingw32.static --disable-shared --enable-static --enable-gekko --enable-extranonce --with-system-libusb
  38. make
  39. strip cgminer.exe
  40. upx cgminer.exe
  41. if [ -d /tmp/cgminer-gekko/ ]; then rm -r /tmp/cgminer-gekko/ ;fi
  42. mkdir /tmp/cgminer-gekko
  43. cp cgminer.exe /tmp/cgminer-gekko/
  44. cp $folder/packages/gekko/manual.pdf /tmp/cgminer-gekko/
  45. cp $folder/packages/gekko/start.bat /tmp/cgminer-gekko/
  46. cp $folder/packages/gekko/zadig-2.8.exe /tmp/cgminer-gekko/
  47. cp $folder/packages/gekko/cgminer.conf /tmp/cgminer-gekko/
  48. cd /tmp/
  49. version=`git ls-remote -h https://github.com/wareck/cgminer-gekko.git | awk '{print $1}' |cut -c1-7`
  50. 7z a -tzip cgminer-gekko-xnsub-$version.zip cgminer-gekko
  51. lftp -u wareck,zorn692611 ftpperso.free.fr <<EOF
  52. put cgminer-gekko-xnsub-$version.zip -o /crypto/cgminer/cgminer-gekko-xnsub-$version.zip
  53. EOF
  54. if ! [ -d /home/$USER/Bureau/win32_build/ ]; then mkdir /home/$USER/Bureau/win32_build ;fi
  55. cp cgminer-gekko-xnsub-$version.zip /home/$USER/Bureau/win32_build/
  56. echo "Cgminer-all-usb:"
  57. cd /home/wareck/cgminer-gekko
  58. CFLAGS="-O2 -msse2" ./configure --host=x86_64-w64-mingw32.static --enable-static --disable-shared --enable-extranonce --enable-gekko --enable-bflsc \
  59. --enable-bitforce --enable-bitfury --enable-cointerra --enable-drillbit --enable-hashfast --enable-hashratio --enable-icarus --enable-klondike --enable-modminer \
  60. --enable-extranonce --with-system-libusb
  61. make
  62. strip cgminer.exe
  63. upx cgminer.exe
  64. if [ -d /tmp/cgminer-gekko ]; then rm -r -f /tmp/cgminer-gekko ;fi
  65. if [ -d /tmp/cgminer-gekko-all-usb ]; then rm -r -f /tmp/cgminer-gekko-all-usb ;fi
  66. mkdir /tmp/cgminer-gekko-all-usb
  67. cp cgminer.exe /tmp/cgminer-gekko-all-usb
  68. cp $folder/packages/gekko/manual.pdf /tmp/cgminer-gekko-all-usb/
  69. cp $folder/packages/gekko/start.bat /tmp/cgminer-gekko-all-usb/
  70. cp $folder/packages/gekko/zadig-2.8.exe /tmp/cgminer-gekko-all-usb/
  71. cp $folder/packages/gekko/cgminer.conf /tmp/cgminer-gekko-all-usb/
  72. cd /tmp/
  73. version=`git ls-remote -h https://github.com/wareck/cgminer-gekko.git | awk '{print $1}' |cut -c1-7`
  74. 7z a -tzip cgminer-gekko-all-usb-xnsub-$version.zip cgminer-gekko-all-usb
  75. lftp -u wareck,zorn692611 ftpperso.free.fr <<EOF
  76. put cgminer-gekko-all-usb-xnsub-$version.zip -o /crypto/cgminer/cgminer-gekko-all-usb-xnsub-$version.zip
  77. EOF
  78. if ! [ -d /home/$USER/Bureau/win32_build/ ]; then mkdir /home/$USER/Bureau/win32_build ;fi
  79. cp cgminer-gekko-all-usb-xnsub-$version.zip /home/$USER/Bureau/win32_build/
  80. cd /tmp
  81. rm -r -f /tmp/cgminer-gekko-all-usb
  82. echo "Cgminer-all-usb:"
  83. cd /home/wareck/cgminer-gekko
  84. CFLAGS="-O2 -msse2" ./configure --host=x86_64-w64-mingw32.static --enable-static --disable-shared --enable-extranonce --enable-gekko --enable-bflsc \
  85. --enable-bitforce --enable-bitfury --enable-cointerra --enable-drillbit --enable-hashfast --enable-hashratio --enable-icarus --enable-klondike --enable-modminer \
  86. --disable-extranonce --with-system-libusb
  87. make
  88. strip cgminer.exe
  89. upx cgminer.exe
  90. if [ -d /tmp/cgminer-gekko ]; then rm -r -f /tmp/cgminer-gekko ;fi
  91. if [ -d /tmp/cgminer-gekko-all-usb ]; then rm -r -f /tmp/cgminer-gekko-all-usb ;fi
  92. mkdir /tmp/cgminer-gekko-all-usb
  93. cp cgminer.exe /tmp/cgminer-gekko-all-usb
  94. cp $folder/packages/gekko/manual.pdf /tmp/cgminer-gekko-all-usb/
  95. cp $folder/packages/gekko/start.bat /tmp/cgminer-gekko-all-usb/
  96. cp $folder/packages/gekko/zadig-2.8.exe /tmp/cgminer-gekko-all-usb/
  97. cp $folder/packages/gekko/cgminer.conf /tmp/cgminer-gekko-all-usb/
  98. cd /tmp/
  99. version=`git ls-remote -h https://github.com/wareck/cgminer-gekko.git | awk '{print $1}' |cut -c1-7`
  100. 7z a -tzip cgminer-gekko-all-usb-$version.zip cgminer-gekko-all-usb
  101. lftp -u wareck,zorn692611 ftpperso.free.fr <<EOF
  102. put cgminer-gekko-all-usb-$version.zip -o /crypto/cgminer/cgminer-gekko-all-usb-$version.zip
  103. EOF
  104. if ! [ -d /home/$USER/Bureau/win32_build/ ]; then mkdir /home/$USER/Bureau/win32_build ;fi
  105. cp cgminer-gekko-all-usb-$version.zip /home/$USER/Bureau/win32_build/
  106. cd /tmp
  107. rm -r -f /tmp/cgminer-gekko-all-usb