Updates to build system.

This commit is contained in:
Steve 2015-12-05 08:42:10 +00:00
parent 5071057e07
commit f4e4473bb6
6 changed files with 95 additions and 61 deletions

13
build/buildAll.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash -e
VERSION=`egrep 'VERSION = ([0-9.+])' ../common.mk | awk '{print $3}'`
REVISION=`date +"%y%m%d"`
mkdir -p ../dist
rm -rf ../dist/*
cd build
linux/build.sh $VERSION $REVISION
win32/build.sh $VERSION $REVISION

View File

@ -1,49 +0,0 @@
#!/bin/bash -e
BUILDROOT="build/tbftss"
VERSION=0.4
REVISION=`date +"%y%m%d"`
SIZE=0
cd ..
rm -rf dist/*
make clean
make
make dist
mkdir -p $BUILDROOT
rm -rf $BUILDROOT/*
mkdir -p $BUILDROOT/DEBIAN
mkdir -p $BUILDROOT/usr/bin
cp tbftss $BUILDROOT/usr/bin
mkdir -p $BUILDROOT/opt/tbftss
cp -r data $BUILDROOT/opt/tbftss
cp -r gfx $BUILDROOT/opt/tbftss
cp -r music $BUILDROOT/opt/tbftss
cp -r sound $BUILDROOT/opt/tbftss
cp -r manual $BUILDROOT/opt/tbftss
SIZE=`du -bs $BUILDROOT | cut -f -1`
SIZE=`expr $SIZE / 1024`
sed \
-e "s/\${version}/$VERSION-$REVISION/" \
-e "s/\${size}/$SIZE/" \
build/control > $BUILDROOT/DEBIAN/control
cd build
dpkg-deb --build tbftss
mv tbftss.deb tbftss-${VERSION}-${REVISION}.i386.deb
alien -r --bump=0 tbftss-${VERSION}-${REVISION}.i386.deb
mv *.deb *.rpm ../dist
rm -rf tbftss

View File

@ -1,11 +0,0 @@
Source: tbftss
Package: tbftss
Version: ${version}
Section: games
Priority: optional
Installed-Size: ${size}
Architecture: i386
Depends: libsdl2-2.0-0, libsdl2-image-2.0-0, libsdl2-mixer-2.0-0, libsdl2-ttf-2.0-0
Maintainer: stephenjsweeney@battleforthesolarsystem.com
Description: 2D mission-based space shooter, based on the Battle for the Solar System space opera novel trilogy.
Homepage: www.battleforthesolarsystem.com/games/pw

48
build/linux/build.sh Executable file
View File

@ -0,0 +1,48 @@
#!/bin/bash -e
BUILDROOT="build/linux"
OUT="$BUILDROOT/tbftss"
cd ../..
VERSION=$1
REVISION=$2
SIZE=0
make clean
make
make dist
mkdir -p $OUT
rm -rf $OUT/*
mkdir -p $OUT/DEBIAN
mkdir -p $OUT/usr/bin
cp tbftss $OUT/usr/bin
mkdir -p $OUT/opt/tbftss
cp -r data $OUT/opt/tbftss
cp -r gfx $OUT/opt/tbftss
cp -r music $OUT/opt/tbftss
cp -r sound $OUT/opt/tbftss
cp -r manual $OUT/opt/tbftss
SIZE=`du -bs $OUT | cut -f -1`
SIZE=`expr $SIZE / 1024`
sed \
-e "s/\${version}/$VERSION-$REVISION/" \
-e "s/\${size}/$SIZE/" \
$BUILDROOT/control > $OUT/DEBIAN/control
cd $BUILDROOT
dpkg-deb --build tbftss
mv tbftss.deb tbftss-${VERSION}-${REVISION}.i386.deb
alien -r --bump=0 tbftss-${VERSION}-${REVISION}.i386.deb
mv *.deb *.rpm ../../dist
rm -rf tbftss

34
build/win32/build.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash -e
BUILDROOT="build/win32"
OUT="$BUILDROOT/tbftss"
cd ../..
VERSION=$1
REVISION=$2
SIZE=0
make -f makefile.win32 clean
make -f makefile.win32
mkdir -p $OUT
rm -rf $OUT/*
cp tbftss.exe $OUT
cp -r data $OUT
cp -r gfx $OUT
cp -r music $OUT
cp -r sound $OUT
cp -r manual $OUT
cp /usr/x86_64-w64-mingw32/bin/*.dll $OUT
cd $BUILDROOT
zip -r tbftss-${VERSION}-${REVISION}.zip tbftss
mv *.zip ../../dist
rm -rf tbftss

View File

@ -41,7 +41,6 @@ dist:
git log --oneline --decorate >$(PROG)-$(VERSION)/CHANGELOG.raw git log --oneline --decorate >$(PROG)-$(VERSION)/CHANGELOG.raw
tar czf $(PROG)-$(VERSION)-$(REVISION).src.tar.gz $(PROG)-$(VERSION) tar czf $(PROG)-$(VERSION)-$(REVISION).src.tar.gz $(PROG)-$(VERSION)
mkdir -p dist mkdir -p dist
$(RM) -rf dist/*
mv $(PROG)-$(VERSION)-$(REVISION).src.tar.gz dist mv $(PROG)-$(VERSION)-$(REVISION).src.tar.gz dist
$(RM) -rf $(PROG)-$(VERSION) $(RM) -rf $(PROG)-$(VERSION)