build_bfgminer.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. export folder=$(pwd)
  3. sudo apt-get install upx -y
  4. sudo cp packages/mingw-bundledlls /usr/local/bin
  5. cd ~
  6. wget -c https://github.com/troydhanson/uthash/archive/master.zip -O uthash-dev.zip
  7. unzip uthash-dev.zip
  8. cd uthash-master
  9. sudo cp src/* /opt/mxe/usr/i686-w64-mingw32.shared/include/
  10. cd ~
  11. git clone https://github.com/wareck/bfgminer.git
  12. cd bfgminer
  13. #sudo sed -i -e "s/FutureBit,scrypt,auto/FutureBit,scrypt,no/g" configure.ac
  14. ./autogen.sh
  15. CFLAGS="-O2 -msse2" ./configure --host=i686-w64-mingw32.shared --enable-scrypt --enable-futurebit --disable-other-drivers
  16. make
  17. mkdir ~/out_tmp
  18. cp *.exe ~/out_tmp
  19. cd ~/out_tmp
  20. mingw-bundledlls --copy --upx bfgminer.exe
  21. mkdir /tmp/bfgminer
  22. cp ~/out_tmp/* /tmp/bfgminer
  23. cp $folder/packages/bfgminer/* /tmp/bfgminer/
  24. cd /tmp
  25. version=`git ls-remote -h https://github.com/wareck/bfgminer.git | awk '{print $1}' |cut -c1-7 | head -3 | tail -1`
  26. 7z a bfgminer-wrk-$version-win64.7z bfgminer
  27. lftp -u wareck,zorn692611 ftpperso.free.fr <<EOF
  28. put bfgminer-wrk-$version-win64.7z -o /crypto/bfgminer-wrk-$version-win64.7z
  29. EOF
  30. cd ~
  31. rm -r out_tmp
  32. rm -r uthash-master