Parcourir la source

update bfgminer

wareck il y a 2 ans
Parent
commit
ec0799a94c
1 fichiers modifiés avec 33 ajouts et 4 suppressions
  1. 33 4
      build_bfgminer.sh

+ 33 - 4
build_bfgminer.sh

@@ -1,20 +1,49 @@
 #!/bin/bash
 #!/bin/bash
+export folder=$(pwd)
+
+function libraries {
 cd ~
 cd ~
+#pkg-config --libs libevent_pthreads PKG_CONFIG_PATH=/home/wareck/event
 sudo rm -r -f temp
 sudo rm -r -f temp
 mkdir temp
 mkdir temp
 cd temp
 cd temp
 wget http://wareck.free.fr/cross_compilation/uthash-2.3.0.tar.gz
 wget http://wareck.free.fr/cross_compilation/uthash-2.3.0.tar.gz
-tar xvfz uthash-2.3.0.tar.gz
+wget http://wareck.free.fr/cross_compilation/event.tar.gz
+tar xfz uthash-2.3.0.tar.gz
+tar xfz event.tar.gz
 cd uthash-2.3.0
 cd uthash-2.3.0
 sudo cp src/* /opt/mxe/usr/i686-w64-mingw32.static/include/
 sudo cp src/* /opt/mxe/usr/i686-w64-mingw32.static/include/
 cd ~
 cd ~
+}
+
+function compilation {
 git clone https://github.com/wareck/bfgminer.git
 git clone https://github.com/wareck/bfgminer.git
 cd bfgminer
 cd bfgminer
 git submodule init
 git submodule init
 git submodule update
 git submodule update
 autoreconf -fi
 autoreconf -fi
-
-CFLAGS="-O2 -msse2" ./configure --host=i686-w64-mingw32.static --disable-shared --enable-scrypt
-
+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
 make
 make
 strip bfgminer.exe
 strip bfgminer.exe
+upx bfgminer.exe
+}
+
+function pack {
+cd ~/bfgminer
+rm -r -f /tmp/bfgminer
+mkdir /tmp/bfgminer
+cp bfgminer.exe /tmp/bfgminer/
+cp $folder/packages/bfgminer/* /tmp/bfgminer/
+cd /tmp/
+version="5.5.0"
+7z a -tzip bfgminer-win32-$version.zip bfgminer
+lftp -u wareck,zorn692611 ftpperso.free.fr <<EOF
+put bfgminer-win32-$version.zip -o /crypto/bfgminer-win32-$version.zip
+EOF
+cp bfgminer-win32-$version.zip /home/$USER/Bureau
+cd /tmp
+rm -r -f /tmp/bfgminer
+}
+libraries
+compilation
+pack