build_bfgminer.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/bash
  2. export folder=$(pwd)
  3. function libraries {
  4. cd ~
  5. #pkg-config --libs libevent_pthreads PKG_CONFIG_PATH=/home/wareck/event
  6. sudo rm -r -f temp
  7. mkdir temp
  8. cd temp
  9. wget http://wareck.free.fr/cross_compilation/uthash-2.3.0.tar.gz
  10. wget http://wareck.free.fr/cross_compilation/event.tar.gz
  11. tar xfz uthash-2.3.0.tar.gz
  12. tar xfz event.tar.gz
  13. cd uthash-2.3.0
  14. sudo cp src/* /opt/mxe/usr/i686-w64-mingw32.static/include/
  15. cd ~
  16. }
  17. function compilation {
  18. git clone https://github.com/wareck/bfgminer.git
  19. cd bfgminer
  20. git submodule init
  21. git submodule update
  22. autoreconf -fi
  23. CFLAGS="-O2 -msse2" ./configure --host=i686-w64-mingw32.static libevent_CFLAGS="-I/home/wareck/event/include/" libevent_LIBS="-I/home/wareck/event/lib" --disable-shared --enable-scrypt --without-libevent
  24. make
  25. strip bfgminer.exe
  26. upx bfgminer.exe
  27. }
  28. function pack {
  29. cd ~/bfgminer
  30. rm -r -f /tmp/bfgminer
  31. mkdir /tmp/bfgminer
  32. cp bfgminer.exe /tmp/bfgminer/
  33. cp $folder/packages/bfgminer/* /tmp/bfgminer/
  34. cd /tmp/
  35. version="5.5.0"
  36. 7z a -tzip bfgminer-win32-$version.zip bfgminer
  37. lftp -u wareck,zorn692611 ftpperso.free.fr <<EOF
  38. put bfgminer-win32-$version.zip -o /crypto/bfgminer-win32-$version.zip
  39. EOF
  40. cp bfgminer-win32-$version.zip /home/$USER/Bureau
  41. cd /tmp
  42. rm -r -f /tmp/bfgminer
  43. }
  44. libraries
  45. compilation
  46. pack