~midori/midori/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash

# Copyright (C) 2013 Paweł Forysiuk <tuxator@o2.pl>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# See the file COPYING for the full license text.


SRCDIR=$PWD
CONFIGURE_OPTIONS="-DUSE_ZEITGEIST=0 -DUSE_GTK3=1 -DCMAKE_VERBOSE_MAKEFILE=0 -DEXTRA_WARNINGS=1"

# 32-bit build
#mingw32-env
export MINGW_PREFIX="/usr/i686-w64-mingw32/sys-root/mingw"
eval `rpm --eval %{mingw32_env}`

rm -fr _mingw32
mkdir _mingw32 && cd _mingw32
mingw32-cmake -DCMAKE_INSTALL_PREFIX=$MINGW_PREFIX ${CONFIGURE_OPTIONS} $SRCDIR
make
sudo make install || exit


version=$(grep set\(VERSION $SRCDIR/CMakeLists.txt|head -n1|sed -e 's/^.*set(VERSION \([0-9.]*\)).*$/\1/')

rpmquery -qa mingw32* > $SRCDIR/midori-${version}-deps-i686.txt
rm -f $SRCDIR/midori-$version.sha1

MINGW_PREFIX=${MINGW_PREFIX} RELEASE=1 NSIS=1 $SRCDIR/win32/makedist/makedist.midori
mv -v midori-${version}.7z midori_${version}_32_.7z
mv -v Midori-${version}_setup.exe midori_${version}_32_.exe

if [ "$DO_64BIT" != "" ]; then
    cd $SRCDIR
    # 64-bit build
    #mingw64-env
    export MINGW_PREFIX="/usr/x86_64-w64-mingw32/sys-root/mingw"
    eval `rpm --eval %{mingw64_env}`

    rm -fr _mingw64
    mkdir _mingw64 && cd _mingw64
    mingw64-cmake -DCMAKE_INSTALL_PREFIX=$MINGW_PREFIX ${CONFIGURE_OPTIONS} $SRCDIR
    make
    sudo make install || exit

    rpmquery -qa mingw64* > $SRCDIR/midori-${version}-deps-x86_64.txt
    MINGW_PREFIX=${MINGW_PREFIX} RELEASE=1 sh $SRCDIR/win32/makedist/makedist.midori x86_64-portable
fi

cd $SRCDIR

echo
echo "============================="
echo "Midori win32 release details:"
echo "Download links:"
cat release_links.txt
echo "Checksums:"
cat midori-$version.sha1
echo "============================="
echo