root/trunk/release.sh

Revision 144 (checked in by dan, 2 years ago)

further adaptions in release scripts.

  • Property svn:executable set to
Line 
1 #!/bin/sh
2
3 # swfmill release script
4 VERSION=$1
5 PACKAGE=swfmill
6 TMP=/tmp/$PACKAGE
7
8 function status() {
9 echo -ne "\033]0;$@\007"
10 echo --------------------------------------------------
11 echo $@
12 echo --------------------------------------------------
13 }
14
15 function mkdostext() {
16         cat $PACKAGE-$VERSION/$1 | unix2dos > $PACKAGE-$VERSION-win32/$1.txt
17 #       cat $1 | unix2dos > $2
18 }
19
20 if [ ! -z $VERSION ]; then
21         # update version in configure.ac
22         sed -e "s/AC_INIT( $PACKAGE, [0-9\.]*,/AC_INIT( $PACKAGE, $VERSION,/" configure.ac > configure.ac2
23         mv configure.ac2 configure.ac
24         svn commit -m "release $VERSION"
25         # save version
26         echo $VERSION > .version
27 else
28         VERSION=$(cat .version)
29 fi
30
31
32
33 status autogen
34 ./autogen.sh
35 # not sure why this is needed
36 automake-1.6
37 ./autogen.sh
38 status configure
39 ./configure
40 status make dist
41 make dist
42
43 if [ ! -e $PACKAGE-$VERSION.tar.gz ]; then
44         echo make dist failed.
45         exit -1
46 fi
47
48
49 status Building the Windoze binary...
50
51 mkdir -p $TMP
52 cp $PACKAGE-$VERSION.tar.gz $TMP
53 cd $TMP
54 tar xvfz $PACKAGE-$VERSION.tar.gz
55 cd $PACKAGE-$VERSION
56
57 export PATH=/opt/xmingw/bin:$PATH
58 export CC=i386-mingw32msvc-gcc
59 export CPP=i386-mingw32msvc-cpp
60 export CXX=i386-mingw32msvc-g++
61 export LD=i386-mingw32msvc-ld
62 export CFLAGS="-I/opt/xmingw/i386-mingw32msvc/include"
63 export CXXFLAGS="-I/opt/xmingw/i386-mingw32msvc/include"
64 export PKG_CONFIG_PATH=/opt/xmingw/i386-mingw32msvc/lib/pkgconfig/
65 ./configure --prefix=/opt/xmingw/i386-mingw32msvc/ --build=i686-pc-linux-gnu --host=i386-mingw32msvc --target=i386-mingw32msvc
66 make
67
68 status bundle win32 dist .zip
69 i386-mingw32msvc-strip src/swfmill.exe
70 cd ..
71 mkdir $PACKAGE-$VERSION-win32
72 cp $PACKAGE-$VERSION/src/swfmill.exe $PACKAGE-$VERSION-win32/
73 mkdostext README
74 mkdostext COPYING
75 mkdostext NEWS
76 zip -r $PACKAGE-$VERSION-win32.zip $PACKAGE-$VERSION-win32
77
78 status Copying release files to swfmill.org/pre/
79 scp $PACKAGE-$VERSION.tar.gz $PACKAGE-$VERSION-win32.zip dan@swfmill.org:/home/swfmill/swfmill.org/pre/
80
81 echo all done.
82 echo now just edit index.php and copy binaries from pre/
Note: See TracBrowser for help on using the browser.