07d31c717e5532e529ea685c97a8ca2520d01e25
[novacoin.git] / contrib / gitian-win32.yml
1 ---
2 name: "bitcoin"
3 suites:
4 - "lucid"
5 architectures:
6 - "i386"
7 packages: 
8 - "mingw32"
9 - "git-core"
10 - "unzip"
11 - "nsis"
12 reference_datetime: "2011-01-30 00:00:00"
13 remotes:
14 - "url": "https://github.com/bitcoin/bitcoin.git"
15   "dir": "bitcoin"
16 files:
17 - "wxWidgets-2.9.1.tar.bz2"
18 - "boost_1_43_0.tar.bz2"
19 - "openssl-1.0.0d.tar.gz"
20 - "db-4.7.25.NC.tar.gz"
21 - "upnpc-exe-win32-20110215.zip"
22 - "miniupnpc-1.5.20110215.tar.gz"
23 - "WSPiApi.h"
24 script: |
25   #
26   tar xjf wxWidgets-2.9.1.tar.bz2
27   cd wxWidgets-2.9.1
28   ./configure --host=i586-mingw32msvc --build=i686-linux --disable-shared --enable-monolithic --without-libpng --disable-svg
29   perl -i -p -e "s/__TIME__/\"$REFERENCE_TIME\"/;s/__DATE__/\"$REFERENCE_DATE\"/" include/wx/chartype.h
30   make $MAKEOPTS
31   cd ..
32   #
33   tar xzf openssl-1.0.0d.tar.gz
34   cd openssl-1.0.0d
35   ./Configure --cross-compile-prefix=i586-mingw32msvc- mingw
36   make
37   cd ..
38   #
39   tar xzf db-4.7.25.NC.tar.gz
40   cd db-4.7.25.NC/build_unix
41   ../dist/configure --enable-mingw --enable-cxx --host=i586-mingw32msvc CFLAGS="-I/usr/i586-mingw32msvc/include"
42   make $MAKEOPTS
43   cd ../..
44   #
45   tar xjf boost_1_43_0.tar.bz2
46   cd boost_1_43_0
47   echo "using gcc : 4.4 : i586-mingw32msvc-g++
48         :
49         <rc>i586-mingw32msvc-windres
50         <archiver>i586-mingw32msvc-ar
51   ;" > user-config.jam
52   ./bootstrap.sh --without-icu
53   ./bjam toolset=gcc target-os=windows threadapi=win32 threading=multi --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete $MAKEOPTS stage
54   cd ..
55   #
56   mkdir upnpc-exe-win32-20110215
57   cd upnpc-exe-win32-20110215
58   unzip ../upnpc-exe-win32-20110215.zip
59   mkdir miniupnpc
60   cd miniupnpc
61   tar xzf ../../miniupnpc-1.5.20110215.tar.gz
62   mv ./miniupnpc-1.5.20110215/* ./
63   cd ../..
64   #
65   cp WSPiApi.h $HOME/build
66   #
67   cd bitcoin
68   mkdir -p $OUTDIR/src
69   cp -a . $OUTDIR/src
70   rm -rf $OUTDIR/src/.git
71   cp -a $OUTDIR/src/locale $OUTDIR
72   cp $OUTDIR/src/doc/README_windows.txt $OUTDIR/readme.txt
73   cp $OUTDIR/src/COPYING $OUTDIR/license.txt
74   cd src
75   sed 's/$(DEBUGFLAGS)//' < makefile.linux-mingw > makefile.linux-mingw.2 && mv makefile.linux-mingw.2 makefile.linux-mingw
76   sed 's|//#include <WSPiApi.h>|#include <WSPiApi.h>|' < net.cpp > net.cpp.2 && mv net.cpp.2 net.cpp
77   make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoin.exe USE_UPNP=1
78   make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoind.exe USE_UPNP=0
79   i586-mingw32msvc-strip bitcoin.exe
80   i586-mingw32msvc-strip bitcoind.exe
81   makensis ../share/setup.nsi
82   cp bitcoin.exe ../share/bitcoin-*-win32-setup.exe $OUTDIR/
83   mkdir $OUTDIR/daemon
84   cp bitcoind.exe $OUTDIR/daemon