make-release 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. cp -av "$IDIR/"ADL_SDK/adl_{defines,sdk,structures}.h "ADL_SDK/"
  38. ./autogen.sh
  39. ./configure \
  40. --prefix='C:\\Program Files\\BFGMiner\' \
  41. CFLAGS='-march=i686 -Wall' \
  42. --disable-cpumining \
  43. --enable-opencl \
  44. --enable-adl \
  45. --enable-bitforce \
  46. --enable-icarus \
  47. --enable-modminer \
  48. --enable-ztex \
  49. --enable-scrypt \
  50. --build=i686-pc-linux-gnu \
  51. --host=i686-pc-mingw32
  52. make -j4
  53. cp -v \
  54. bfgminer.exe \
  55. *.cl \
  56. example.conf \
  57. windows-build.txt \
  58. API.class \
  59. miner.php \
  60. "$OUTDIR/" -v
  61. cd "$OUTDIR"
  62. cd ..
  63. zip -r "$IDIR/${ZIPNAME}.zip" "${ZIPNAME}"
  64. cd "$IDIR"