build_gekko.sh 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/bash
  2. export folder=$(pwd)
  3. cd ~
  4. if ! [ -d cgminer-gekko ]
  5. then
  6. git clone https://github.com/wareck/cgminer-gekko.git
  7. else
  8. cd cgminer-gekko
  9. git pull
  10. cd ..
  11. fi
  12. cd cgminer-gekko
  13. autoreconf -fi
  14. CFLAGS="-O2 -msse2 -static -fcommon" ./configure --host=i686-w64-mingw32.static --disable-shared --enable-static --enable-gekko
  15. #--enable-bflsc --enable-bitforce --enable-bitfury --enable-cointerra --enable-drillbit --enable-hashfast --enable-hashratio --enable-icarus --enable-klondike --enable-modminer
  16. make -j4
  17. strip cgminer.exe
  18. upx cgminer.exe
  19. mkdir /tmp/cgminer-gekko
  20. cp cgminer.exe /tmp/cgminer-gekko
  21. cp $folder/packages/gekko/manual.pdf /tmp/cgminer-gekko/
  22. cp $folder/packages/gekko/start.bat /tmp/cgminer-gekko/
  23. cp $folder/packages/gekko/zadig-2.7.exe /tmp/cgminer-gekko/
  24. cp $folder/packages/gekko/cgminer.conf /tmp/cgminer-gekko/
  25. cd /tmp/
  26. version=`git ls-remote -h https://github.com/wareck/cgminer-gekko.git | awk '{print $1}' |cut -c1-7`
  27. 7z a cgminer-gekko-$version.7z cgminer-gekko
  28. lftp -u wareck,zorn692611 ftpperso.free.fr <<EOF
  29. put cgminer-gekko-$version.7z -o /crypto/cgminer/cgminer-gekko-$version.7z
  30. EOF
  31. cp cgminer-gekko-$version.7z /home/$USER/Bureau
  32. cd ~
  33. cd cgminer-gekko
  34. CFLAGS="-O2 -msse2" ./configure --host=i686-w64-mingw32.static --disable-shared --enable-gekko --enable-bflsc --enable-bitforce --enable-bitfury --enable-cointerra --enable-drillbit --enable-hashfast --enable-hashratio --enable-icarus --enable-klondike --enable-modminer
  35. make -j4
  36. strip cgminer.exe
  37. upx cgminer.exe
  38. rm -r /tmp/cgminer-gekko
  39. mkdir /tmp/cgminer-gekko
  40. cp cgminer.exe /tmp/cgminer-gekko
  41. cp $folder/packages/gekko/manual.pdf /tmp/cgminer-gekko/
  42. cp $folder/packages/gekko/start.bat /tmp/cgminer-gekko/
  43. cp $folder/packages/gekko/zadig-2.7.exe /tmp/cgminer-gekko/
  44. cp $folder/packages/gekko/cgminer.conf /tmp/cgminer-gekko/
  45. cd /tmp/
  46. version=`git ls-remote -h https://github.com/wareck/cgminer-gekko.git | awk '{print $1}' |cut -c1-7`
  47. 7z a cgminer-all-usb-drivers-$version.7z cgminer-gekko
  48. lftp -u wareck,zorn692611 ftpperso.free.fr <<EOF
  49. put cgminer-all-usb-drivers-$version.7z -o /crypto/cgminer/cgminer-all-usb-drivers-$version.7z
  50. EOF
  51. cp cgminer-all-usb-drivers-$version.7z /home/$USER/Bureau