General package script works for Arch-Linux packages.

This commit is contained in:
Matthew
2010-08-14 21:43:01 +12:00
parent ab3c06cd04
commit 0e2b4bb721
2 changed files with 42 additions and 30 deletions

40
packaging/package-all.sh Executable file
View File

@@ -0,0 +1,40 @@
#!/bin/bash
TAG=$1
VERSION=`echo $TAG | grep -o "[0-9]\\+-\\?[0-9]\\?"`
_gitroot="git://github.com/chrisforbes/OpenRA.git"
_gitname="OpenRA"
mkdir ~/openra-package/
pushd ~/openra-package/
echo "Connecting to GIT server...."
if [ -d $_gitname ] ; then
pushd $_gitname && git pull origin
echo "The local files are updated."
popd
else
git clone $_gitroot $_gitname
fi
echo "GIT checkout done or server timeout"
echo "Starting make..."
rm -rf "$_gitname-build"
git clone "$_gitname" "$_gitname-build"
pushd "$_gitname-build"
git checkout $TAG
make prefix=/usr all
make prefix=/usr DESTDIR=../built install
popd
popd
cd linux/pkgbuild/
sh buildpackage.sh "ftp.open-ra.org" "httpdocs/releases/linux" "$2" "$3" "$VERSION"
#cd ../rpm/
#sh buildpackage.sh "ftp.open-ra.org" "httpdocs/releases/linux" "$2" "$3" "$VERSION" "~/rpmbuild"