build_gekko.sh 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. if ! [[ -f cgminer.exe ]]
  18. then
  19. echo -e "\nerreur de compilation !!!!\n"
  20. exit 0
  21. fi
  22. strip cgminer.exe
  23. upx cgminer.exe
  24. mkdir /tmp/cgminer-gekko
  25. cp cgminer.exe /tmp/cgminer-gekko
  26. cp $folder/packages/gekko/manual.pdf /tmp/cgminer-gekko/
  27. cp $folder/packages/gekko/start.bat /tmp/cgminer-gekko/
  28. cp $folder/packages/gekko/zadig-2.7.exe /tmp/cgminer-gekko/
  29. cp $folder/packages/gekko/cgminer.conf /tmp/cgminer-gekko/
  30. cd /tmp/
  31. version=`git ls-remote -h https://github.com/wareck/cgminer-gekko.git | awk '{print $1}' |cut -c1-7`
  32. 7z a cgminer-gekko-$version.7z cgminer-gekko
  33. lftp -u wareck,zorn692611 ftpperso.free.fr <<EOF
  34. put cgminer-gekko-$version.7z -o /crypto/cgminer/cgminer-gekko-$version.7z
  35. EOF
  36. cp cgminer-gekko-$version.7z /home/$USER/Bureau
  37. cd ~
  38. cd cgminer-gekko
  39. 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
  40. make -j4
  41. if ! [[ -f cgminer.exe ]]
  42. then
  43. echo -e "\nerreur de compilation !!!! (all usb)\n"
  44. exit 0
  45. fi
  46. strip cgminer.exe
  47. upx cgminer.exe
  48. rm -r /tmp/cgminer-gekko
  49. mkdir /tmp/cgminer-gekko
  50. cp cgminer.exe /tmp/cgminer-gekko
  51. cp $folder/packages/gekko/manual.pdf /tmp/cgminer-gekko/
  52. cp $folder/packages/gekko/start.bat /tmp/cgminer-gekko/
  53. cp $folder/packages/gekko/zadig-2.7.exe /tmp/cgminer-gekko/
  54. cp $folder/packages/gekko/cgminer.conf /tmp/cgminer-gekko/
  55. cd /tmp/
  56. version=`git ls-remote -h https://github.com/wareck/cgminer-gekko.git | awk '{print $1}' |cut -c1-7`
  57. 7z a cgminer-all-usb-drivers-$version.7z cgminer-gekko
  58. lftp -u wareck,zorn692611 ftpperso.free.fr <<EOF
  59. put cgminer-all-usb-drivers-$version.7z -o /crypto/cgminer/cgminer-all-usb-drivers-$version.7z
  60. EOF
  61. cp cgminer-all-usb-drivers-$version.7z /home/$USER/Bureau