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

View File

@@ -1,6 +1,6 @@
# Contributor: Matthew Bowra-Dean <matthew@ijw.co.nz>
pkgname=openra-git
pkgver=20100801.2
pkgver=20100806.2
pkgrel=1
pkgdesc="Open Source rebuild of the Red Alert game engine using Mono/OpenGL."
arch=(any)
@@ -20,34 +20,6 @@ source=()
noextract=()
md5sums=()
_gitroot="git://github.com/chrisforbes/OpenRA.git"
_gitname="OpenRA"
_gittag="playtest-$pkgver"
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [ -d $_gitname ] ; then
cd $_gitname && git pull origin
msg "The local files are updated."
else
git clone $_gitroot $_gitname
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
rm -rf "$srcdir/$_gitname-build"
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cd "$srcdir/$_gitname-build"
_fixedgittag=`echo $_gittag | sed "s/\\./-/g"`
git checkout $_fixedgittag
#
# BUILD HERE
#
make prefix="/usr" || return 1
make prefix="/usr" DESTDIR="$pkgdir" install
cp -r ~/openra-package/built/usr/ $pkgdir/
}

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"