build_bfgminer.sh 1.5 KB

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