]> Git Repo - VerusCoin.git/blob - contrib/gitian-descriptors/protobuf-win.yml
Merge pull request #4450
[VerusCoin.git] / contrib / gitian-descriptors / protobuf-win.yml
1 ---
2 name: "protobuf-win32"
3 suites:
4 - "precise"
5 architectures:
6 - "amd64"
7 packages:
8 - "mingw-w64"
9 - "g++-mingw-w64"
10 - "zip"
11 - "faketime"
12 reference_datetime: "2013-04-15 00:00:00"
13 remotes: []
14 files:
15 - "protobuf-2.5.0.tar.bz2"
16 script: |
17   #
18   export TZ=UTC
19   INDIR=$HOME/build
20   TEMPDIR=$HOME/tmp
21   OPTFLAGS="-O2"
22   # Integrity Check
23   echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677  protobuf-2.5.0.tar.bz2" | sha256sum -c
24
25   for BITS in 32 64; do # for architectures
26     #
27     INSTALLPREFIX=$HOME/staging${BITS}
28     BUILDDIR=$HOME/build${BITS}
29     if [ "$BITS" == "32" ]; then
30       HOST=i686-w64-mingw32
31     else
32       HOST=x86_64-w64-mingw32
33     fi
34     #
35     mkdir -p $INSTALLPREFIX $BUILDDIR
36     cd $BUILDDIR
37     #
38     tar xjf $INDIR/protobuf-2.5.0.tar.bz2
39     cd protobuf-2.5.0
40     # First: build a native (linux) protoc
41     ./configure --enable-shared=no --disable-dependency-tracking --without-zlib CXXFLAGS="-frandom-seed=11 ${OPTFLAGS}"
42     make
43     mkdir -p $INSTALLPREFIX/host/bin
44     cp src/protoc $INSTALLPREFIX/host/bin
45     # Now recompile with the mingw cross-compiler:
46     make distclean
47     ./configure --prefix=$INSTALLPREFIX --enable-shared=no --disable-dependency-tracking --without-zlib --with-protoc=$INSTALLPREFIX/host/bin/protoc --host=$HOST CXXFLAGS="-frandom-seed=11 ${OPTFLAGS}"
48     export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
49     export FAKETIME=$REFERENCE_DATETIME
50     make
51     make install
52     # post-process all generated libraries to be deterministic
53     # extract them to a temporary directory then re-build them deterministically
54     for LIB in $(find $INSTALLPREFIX -name \*.a); do
55         rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
56         $HOST-ar xv $LIB | cut -b5- > /tmp/list.txt
57         rm $LIB
58         $HOST-ar crsD $LIB $(cat /tmp/list.txt)
59     done
60     #
61     cd $INSTALLPREFIX
62     find include lib host | sort | zip -X@ $OUTDIR/protobuf-win$BITS-2.5.0-gitian-r4.zip
63     unset LD_PRELOAD
64     unset FAKETIME
65   done # for BITS in
This page took 0.027215 seconds and 4 git commands to generate.