Upgrade dependancies and tweak build process.
[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.2.tar.bz2"
18 - "boost_1_47_0.tar.bz2"
19 - "openssl-1.0.0d.tar.gz"
20 - "db-4.8.30.NC.tar.gz"
21 - "miniupnpc-1.6.tar.gz"
22 script: |
23   #
24   tar xjf wxWidgets-2.9.2.tar.bz2
25   cd wxWidgets-2.9.2
26   ./configure --host=i586-mingw32msvc --build=i686-linux --disable-shared --enable-monolithic --without-libpng --disable-svg
27   perl -i -p -e "s/__TIME__/\"$REFERENCE_TIME\"/;s/__DATE__/\"$REFERENCE_DATE\"/" include/wx/chartype.h
28   make $MAKEOPTS
29   cd ..
30   #
31   tar xzf openssl-1.0.0d.tar.gz
32   cd openssl-1.0.0d
33   ./Configure --cross-compile-prefix=i586-mingw32msvc- mingw
34   make
35   cd ..
36   #
37   tar xzf db-4.8.30.NC.tar.gz
38   cd db-4.8.30.NC/build_unix
39   ../dist/configure --enable-mingw --enable-cxx --host=i586-mingw32msvc CFLAGS="-I/usr/i586-mingw32msvc/include"
40   make $MAKEOPTS
41   cd ../..
42   #
43   tar xjf boost_1_47_0.tar.bz2
44   cd boost_1_47_0
45   echo "using gcc : 4.4 : i586-mingw32msvc-g++
46         :
47         <rc>i586-mingw32msvc-windres
48         <archiver>i586-mingw32msvc-ar
49   ;" > user-config.jam
50   ./bootstrap.sh --without-icu
51   ./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
52   cd ..
53   #
54   tar xzf miniupnpc-1.6.tar.gz
55   cd miniupnpc-1.6
56   sed 's/dllwrap -k --driver-name gcc/$(DLLWRAP) -k --driver-name $(CC)/' -i Makefile.mingw
57   sed 's|wingenminiupnpcstrings $< $@|./wingenminiupnpcstrings $< $@|' -i Makefile.mingw
58   make -f Makefile.mingw DLLWRAP=i586-mingw32msvc-dllwrap CC=i586-mingw32msvc-gcc AR=i586-mingw32msvc-ar
59   cd ..
60   mv miniupnpc-1.6 miniupnpc
61   #
62   cd bitcoin
63   mkdir -p $OUTDIR/src
64   cp -a . $OUTDIR/src
65   rm -rf $OUTDIR/src/.git
66   cp -a $OUTDIR/src/locale $OUTDIR
67   cp $OUTDIR/src/doc/README_windows.txt $OUTDIR/readme.txt
68   cp $OUTDIR/src/COPYING $OUTDIR/license.txt
69   cd src
70   sed 's/$(DEBUGFLAGS)//' -i makefile.linux-mingw
71   make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoin.exe USE_UPNP=1
72   make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoind.exe USE_UPNP=0
73   i586-mingw32msvc-strip bitcoin.exe
74   i586-mingw32msvc-strip bitcoind.exe
75   makensis ../share/setup.nsi
76   cp bitcoin.exe ../share/bitcoin-*-win32-setup.exe $OUTDIR/
77   mkdir $OUTDIR/daemon
78   cp bitcoind.exe $OUTDIR/daemon