make-release 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. NOCONFIGURE=1 \
  29. ./autogen.sh
  30. cd ..
  31. zip -r "$IDIR/${sw}.zip" "$sw"
  32. tar cjvpf "$IDIR/${sw}.tbz2" "$sw"
  33. SRCDIR="$TMPDIR/$sw"
  34. for txt in AUTHORS COPYING NEWS README API-README FPGA-README SCRYPT-README; do
  35. cp -v "$txt" "$OUTDIR/${txt}.txt"
  36. done
  37. cp -av "bitstreams" "$OUTDIR/"
  38. NOCONFIGURE=1 \
  39. ./autogen.sh
  40. ./configure \
  41. --prefix='C:\\Program Files\\BFGMiner\' \
  42. CFLAGS='-march=i686 -Wall' \
  43. --disable-cpumining \
  44. --enable-opencl \
  45. --enable-adl \
  46. --enable-bitforce \
  47. --enable-icarus \
  48. --enable-modminer \
  49. --enable-ztex \
  50. --enable-scrypt \
  51. --build=i686-pc-linux-gnu \
  52. --host=i686-pc-mingw32
  53. make -j4
  54. cp -v \
  55. bfgminer.exe \
  56. *.cl \
  57. example.conf \
  58. windows-build.txt \
  59. API.class \
  60. miner.php \
  61. "$OUTDIR/" -v
  62. cd "$OUTDIR"
  63. cd ..
  64. zip -r "$IDIR/${ZIPNAME}.zip" "${ZIPNAME}"
  65. cd "$IDIR"