2007-03-07 14:28:51 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
. ~/.bash_profile
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
PATH=/usr/local/bin:$PATH
|
|
|
|
|
2007-03-08 13:54:56 +00:00
|
|
|
pref=`dirname $0`
|
2007-03-07 14:28:51 +00:00
|
|
|
if test $# -lt 1; then
|
2007-03-08 13:54:56 +00:00
|
|
|
echo 'Usage: $0 <version> [targets]'
|
2007-03-07 14:28:51 +00:00
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
ver="$1"
|
2007-03-08 13:54:56 +00:00
|
|
|
if test "$ver" = "current"; then
|
|
|
|
tag_path=trunk
|
|
|
|
else
|
|
|
|
tag_path=branches/release_`echo $ver | tr . _`
|
|
|
|
fi
|
|
|
|
|
|
|
|
do_rpm=0
|
|
|
|
do_deb=0
|
|
|
|
do_win32=0
|
|
|
|
no_rm=0
|
2007-03-07 14:28:51 +00:00
|
|
|
|
|
|
|
shift
|
|
|
|
if test $# -ne 0; then
|
|
|
|
while test $# -ne 0; do
|
|
|
|
case $1 in
|
|
|
|
rpm)
|
|
|
|
do_rpm=1
|
|
|
|
;;
|
|
|
|
deb)
|
|
|
|
do_deb=1
|
|
|
|
;;
|
|
|
|
win32)
|
|
|
|
do_win32=1
|
|
|
|
;;
|
2007-03-08 13:54:56 +00:00
|
|
|
norm)
|
|
|
|
no_rm=1
|
|
|
|
;;
|
2007-03-07 14:28:51 +00:00
|
|
|
*)
|
|
|
|
echo 'Unknown target'
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
else
|
|
|
|
do_rpm=1
|
|
|
|
do_deb=1
|
|
|
|
do_win32=1
|
|
|
|
fi
|
|
|
|
|
2007-03-08 13:54:56 +00:00
|
|
|
svn_url=http://quake.svn.sourceforge.net/svnroot/quake
|
|
|
|
|
2007-03-07 14:28:51 +00:00
|
|
|
mkdir -p ~/release
|
|
|
|
cd ~/release
|
2007-03-08 13:54:56 +00:00
|
|
|
if test $no_rm -ne 1; then
|
|
|
|
rm -rf NEWS quakeforge-* quakeforge_* qfcc_*
|
|
|
|
fi
|
|
|
|
svn co ${svn_url}/quakeforge/${tag_path} quakeforge-${ver}
|
2007-03-07 14:28:51 +00:00
|
|
|
cd quakeforge-$ver
|
|
|
|
cp NEWS ~/release
|
2007-03-08 13:54:56 +00:00
|
|
|
mkdir -p linux.o qf-win32.o
|
2007-03-07 14:28:51 +00:00
|
|
|
./bootstrap
|
|
|
|
#begin linux
|
|
|
|
cd linux.o
|
|
|
|
../configure -C --without-clients --with-servers=master
|
2007-03-08 13:54:56 +00:00
|
|
|
#make changelog
|
|
|
|
touch ChangeLog
|
2007-03-07 14:28:51 +00:00
|
|
|
make dist-all-local
|
|
|
|
if test $do_rpm -eq 1; then
|
|
|
|
cd RPM
|
|
|
|
make rpm
|
|
|
|
mv *.rpm ~/release
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
if test $do_deb -eq 1; then
|
|
|
|
DIR=`basename quakeforge-*.tar.gz .tar.gz`
|
|
|
|
cd debian
|
|
|
|
rm -rf $DIR
|
|
|
|
tar zxvf ../${DIR}.tar.gz
|
|
|
|
cd $DIR
|
|
|
|
QFSMP=-j3 dpkg-buildpackage -rfakeroot -us -uc
|
|
|
|
rm -rf $DIR
|
|
|
|
cd ..
|
|
|
|
mv q*.[a-z]* ~/release
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
#make dist-all-local
|
|
|
|
mv *.tar.gz *.tar.bz2 *.zip ~/release
|
|
|
|
cd ..
|
|
|
|
# end linux
|
|
|
|
if test $do_win32 -eq 1; then
|
|
|
|
cd qf-win32.o
|
|
|
|
qf_win32="quakeforge-$ver-win32"
|
|
|
|
qf_win32_dir=`pwd`"/$qf_win32"
|
2007-03-08 13:54:56 +00:00
|
|
|
mingw32="/usr/local/cross-tools/i386-mingw32msvc"
|
|
|
|
sed -e 's@\./config@../config@' \
|
|
|
|
../tools/cross/cross-configure.sh > cross-configure.sh
|
|
|
|
chmod +x cross-configure.sh
|
2007-03-07 14:28:51 +00:00
|
|
|
rm -rf $qf_win32_dir *.zip
|
2007-03-08 13:54:56 +00:00
|
|
|
./cross-configure.sh \
|
|
|
|
CFLAGS=-I${mingw32}/include LDLAGS=-L${mingw32}/lib \
|
|
|
|
--with-sdl-prefix=${mingw32} \
|
2007-04-04 11:22:48 +00:00
|
|
|
--disable-debug --disable-shared --disable-jack \
|
2007-03-08 13:54:56 +00:00
|
|
|
--program-prefix=
|
|
|
|
../tools/cross/cross-make.sh -j3 \
|
|
|
|
prefix=${qf_win32_dir} \
|
|
|
|
exec_prefix=${qf_win32_dir} \
|
|
|
|
pkgdatadir=${qf_win32_dir} \
|
|
|
|
PAK=pak QFCC=qfcc install
|
|
|
|
i586-mingw32msvc-strip --strip-unneeded "$qf_win32"/bin/*.exe
|
2007-03-07 14:28:51 +00:00
|
|
|
qf-win32.py "$ver-win32" quakeforge "$qf_win32"
|
|
|
|
mv *.zip ~/release
|
|
|
|
cd ..
|
|
|
|
fi
|