make-release 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. "$OUTDIR/"
  21. git branch TMP "$tag"
  22. git clone . "$TMPDIR" -b TMP --depth 1
  23. git branch -D TMP
  24. cd "$TMPDIR"
  25. git archive --prefix "$sw"/ --format tar "$tag" | tar xvp
  26. cd "$sw"
  27. ./autogen.sh
  28. cd ..
  29. zip -r "$IDIR/${sw}.zip" "$sw"
  30. tar cjvpf "$IDIR/${sw}.tbz2" "$sw"
  31. SRCDIR="$TMPDIR/$sw"
  32. for txt in AUTHORS COPYING NEWS README; do
  33. cp -v "$txt" "$OUTDIR/${txt}.txt"
  34. done
  35. cp -av "bitstreams" "$OUTDIR/"
  36. cp -av "$IDIR/"ADL_SDK/adl_{defines,sdk,structures}.h "ADL_SDK/"
  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-ztex \
  47. --build=i686-pc-linux-gnu \
  48. --host=i686-pc-mingw32
  49. make -j4
  50. cp -v \
  51. bfgminer.exe \
  52. *.cl \
  53. example.conf \
  54. windows-build.txt \
  55. API.class \
  56. miner.php \
  57. "$OUTDIR/" -v
  58. cd "$OUTDIR"
  59. cd ..
  60. zip -r "$IDIR/${ZIPNAME}.zip" "${ZIPNAME}"
  61. cd "$IDIR"