make-release 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #!/bin/bash
  2. set -e
  3. set -x
  4. tag="$1"; shift
  5. [ -n "$tag" ] || exit 1
  6. sw="$1"; shift || true
  7. [ -n "$sw" ] || sw="$tag"
  8. IDIR="$PWD"
  9. ZIPNAME="${sw}-win32"
  10. OUTDIR="$PWD/w32zip/$ZIPNAME"
  11. TMPDIR="${OUTDIR}-tmp"
  12. set -e
  13. mkdir -v "$OUTDIR"
  14. cp -v \
  15. -L \
  16. pdcurses.dll \
  17. libcurl-4.dll \
  18. pthreadGC2.dll \
  19. libusb-1.0.dll \
  20. zlib1.dll \
  21. "$OUTDIR/"
  22. git branch TMP "$tag"
  23. git clone . "$TMPDIR" -b TMP --depth 1
  24. git branch -D TMP
  25. cd "$TMPDIR"
  26. git archive --prefix "$sw"/ --format tar "$tag" | tar xvp
  27. cd "$sw"
  28. ./autogen.sh
  29. cd ..
  30. zip -r "$IDIR/${sw}.zip" "$sw"
  31. tar cjvpf "$IDIR/${sw}.tbz2" "$sw"
  32. SRCDIR="$TMPDIR/$sw"
  33. for txt in AUTHORS COPYING NEWS README API-README FPGA-README SCRYPT-README; do
  34. cp -v "$txt" "$OUTDIR/${txt}.txt"
  35. done
  36. cp -av "bitstreams" "$OUTDIR/"
  37. ./autogen.sh
  38. ./configure \
  39. --prefix='C:\\Program Files\\BFGMiner\' \
  40. CFLAGS='-march=i686 -Wall' \
  41. --disable-cpumining \
  42. --enable-opencl \
  43. --enable-adl \
  44. --enable-bitforce \
  45. --enable-icarus \
  46. --enable-modminer \
  47. --enable-ztex \
  48. --enable-scrypt \
  49. --build=i686-pc-linux-gnu \
  50. --host=i686-pc-mingw32
  51. make -j4
  52. cp -v \
  53. bfgminer.exe \
  54. *.cl \
  55. example.conf \
  56. windows-build.txt \
  57. API.class \
  58. miner.php \
  59. "$OUTDIR/" -v
  60. cd "$OUTDIR"
  61. cd ..
  62. zip -r "$IDIR/${ZIPNAME}.zip" "${ZIPNAME}"
  63. cd "$IDIR"