2005-11-27 15:34:16 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
: ${MAKESELF:=/usr/share/loki-setup/makeself}
|
|
|
|
: ${SETUPIMAGE:=/usr/share/loki-setup/image}
|
|
|
|
|
|
|
|
: ${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
|
|
|
|
|
|
|
# $ยง&%!!
|
|
|
|
setup_arch=$arch
|
|
|
|
links=
|
2005-11-27 15:34:16 +00:00
|
|
|
case "$arch" in
|
2005-12-01 09:54:14 +00:00
|
|
|
i?86) arch=i386; setup_arch=x86; links="amd64 x86_64" ;;
|
|
|
|
x86_64) links=amd64
|
2005-11-27 15:34:16 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
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
|
|
|
|
mkdir image/tmp
|
|
|
|
pushd image/tmp
|
|
|
|
mkdir baseq3 demoq3 missionpack
|
2006-01-17 20:14:43 +00:00
|
|
|
src="../../../../../build/release-linux-$arch/"
|
|
|
|
install -m 755 $src/ioquake3.$arch ioquake3.$arch
|
|
|
|
install -m 755 $src/ioq3ded.$arch ioq3ded.$arch
|
2005-11-27 15:34:16 +00:00
|
|
|
install -m 644 $src/baseq3/*.so baseq3
|
|
|
|
install -m 644 $src/missionpack/*.so missionpack
|
|
|
|
pushd demoq3
|
|
|
|
ln -s ../baseq3/*.so .
|
|
|
|
popd
|
|
|
|
popd
|
|
|
|
|
|
|
|
tar --owner=root --group=root -C image/tmp -cf image/ioquake3.tar .
|
|
|
|
rm -rf image/tmp
|
|
|
|
|
|
|
|
### setup.xml
|
|
|
|
sed 's/@VERSION@/'$VERSION'/g' < setup.xml > image/setup.data/setup.xml
|
|
|
|
|
|
|
|
### start script
|
2005-12-01 09:54:14 +00:00
|
|
|
mkdir -p image/bin/Linux/$setup_arch
|
|
|
|
for i in $links; do
|
|
|
|
ln -s $setup_arch image/bin/Linux/$i
|
|
|
|
done
|
|
|
|
install -m 755 ioquake3.sh image/bin/Linux/$setup_arch/ioquake3
|
|
|
|
install -m 755 ioq3demo.sh image/bin/Linux/$setup_arch/ioq3demo
|
2005-11-27 15:34:16 +00:00
|
|
|
|
|
|
|
### README and COPYING
|
|
|
|
install -m 644 ../../../README image/README
|
|
|
|
install -m 644 ../../../COPYING.txt image/COPYING
|
|
|
|
|
|
|
|
### makeself installer
|
2006-09-05 07:02:23 +00:00
|
|
|
$MAKESELF/makeself.sh image ioquake3-$VERSION-$RELEASE.$arch.run "ioquake3 $VERSION" ./setup.sh
|