2005-11-27 15:34:16 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2006-09-05 12:54:25 +00:00
|
|
|
: ${MAKESELF:=/usr/share/loki_setup/makeself}
|
|
|
|
: ${SETUPIMAGE:=/usr/share/loki_setup/image}
|
2005-11-27 15:34:16 +00:00
|
|
|
|
|
|
|
: ${VERSION:=0.0_`date +%Y%m%d%H%M`}
|
|
|
|
: ${RELEASE:=0}
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
|
|
|
arch=`uname -m`
|
2005-12-01 09:54:14 +00:00
|
|
|
|
2005-11-27 15:34:16 +00:00
|
|
|
rm -rf image
|
|
|
|
mkdir image
|
|
|
|
|
|
|
|
### loki-setup files
|
|
|
|
cp -a $SETUPIMAGE/{setup.data,setup.sh} image/
|
|
|
|
|
|
|
|
### splash
|
2005-11-30 21:21:46 +00:00
|
|
|
rm -f image/setup.data/splash.xpm
|
|
|
|
[ -e splash.xpm ] && cp splash.xpm image/setup.data/splash.xpm
|
2006-03-05 19:12:20 +00:00
|
|
|
rm -f image/quake3.png
|
|
|
|
cp ../quake3.png image/quake3.png
|
2005-11-27 15:34:16 +00:00
|
|
|
|
|
|
|
### binaries
|
2006-09-05 12:54:25 +00:00
|
|
|
src="../../../../../build"
|
|
|
|
|
|
|
|
mkdir image/tmp
|
|
|
|
pushd image/tmp
|
|
|
|
mkdir baseq3 demoq3 missionpack
|
|
|
|
# 32 bit binaries
|
|
|
|
install -m 755 $src/release-linux-i386/ioquake3.i386 ioquake3.i386
|
|
|
|
install -m 755 $src/release-linux-i386/ioq3ded.i386 ioq3ded.i386
|
|
|
|
install -m 644 $src/release-linux-i386/baseq3/*.so baseq3
|
|
|
|
install -m 644 $src/release-linux-i386/missionpack/*.so missionpack
|
|
|
|
pushd demoq3
|
|
|
|
ln -s ../baseq3/*.so .
|
|
|
|
popd
|
|
|
|
popd
|
|
|
|
|
|
|
|
tar --owner=root --group=root -C ./image/tmp -cf ./image/ioquake3.i386.tar .
|
|
|
|
rm -rf ./image/tmp
|
|
|
|
|
2005-11-27 15:34:16 +00:00
|
|
|
mkdir image/tmp
|
|
|
|
pushd image/tmp
|
|
|
|
mkdir baseq3 demoq3 missionpack
|
2006-09-05 12:54:25 +00:00
|
|
|
# 64 bit binaries
|
|
|
|
install -m 755 $src/release-linux-x86_64/ioquake3.x86_64 ioquake3.x86_64
|
|
|
|
install -m 755 $src/release-linux-x86_64/ioq3ded.x86_64 ioq3ded.x86_64
|
|
|
|
install -m 644 $src/release-linux-x86_64/baseq3/*.so baseq3
|
|
|
|
install -m 644 $src/release-linux-x86_64/missionpack/*.so missionpack
|
2005-11-27 15:34:16 +00:00
|
|
|
pushd demoq3
|
|
|
|
ln -s ../baseq3/*.so .
|
|
|
|
popd
|
|
|
|
popd
|
|
|
|
|
2006-09-05 12:54:25 +00:00
|
|
|
tar --owner=root --group=root -C ./image/tmp -cf ./image/ioquake3.x86_64.tar .
|
2005-11-27 15:34:16 +00:00
|
|
|
rm -rf image/tmp
|
|
|
|
|
2006-09-05 12:54:25 +00:00
|
|
|
# patch pk3 files
|
|
|
|
install -m 644 ./idpatchpk3s.tar image/idpatchpk3s.tar
|
|
|
|
|
2005-11-27 15:34:16 +00:00
|
|
|
### setup.xml
|
|
|
|
sed 's/@VERSION@/'$VERSION'/g' < setup.xml > image/setup.data/setup.xml
|
|
|
|
|
|
|
|
### start script
|
2006-09-05 12:54:25 +00:00
|
|
|
mkdir -p image/bin/Linux/x86
|
|
|
|
mkdir -p image/bin/Linux/x86_64
|
|
|
|
|
|
|
|
install -m 755 ioquake3.sh image/bin/Linux/x86/ioquake3
|
|
|
|
install -m 755 ioq3demo.sh image/bin/Linux/x86/ioq3demo
|
|
|
|
install -m 755 ioquake3.sh image/bin/Linux/x86_64/ioquake3
|
|
|
|
install -m 755 ioq3demo.sh image/bin/Linux/x86_64/ioq3demo
|
|
|
|
|
|
|
|
### README, COPYING and EULA
|
2005-11-27 15:34:16 +00:00
|
|
|
install -m 644 ../../../README image/README
|
|
|
|
install -m 644 ../../../COPYING.txt image/COPYING
|
2006-09-05 12:54:25 +00:00
|
|
|
install -m 644 ./id_patch_pk3s_Q3A_EULA.txt image/id_patch_pk3s_Q3A_EULA.txt
|
2005-11-27 15:34:16 +00:00
|
|
|
|
|
|
|
### makeself installer
|
2006-09-05 07:02:23 +00:00
|
|
|
$MAKESELF/makeself.sh image ioquake3-$VERSION-$RELEASE.$arch.run "ioquake3 $VERSION" ./setup.sh
|