From 0e2b4bb7215ed24ec6519cd5bad36cb6262ffa2f Mon Sep 17 00:00:00 2001 From: Matthew Date: Sat, 14 Aug 2010 21:43:01 +1200 Subject: [PATCH] General package script works for Arch-Linux packages. --- packaging/linux/pkgbuild/PKGBUILD | 32 ++----------------------- packaging/package-all.sh | 40 +++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 30 deletions(-) create mode 100755 packaging/package-all.sh diff --git a/packaging/linux/pkgbuild/PKGBUILD b/packaging/linux/pkgbuild/PKGBUILD index 0df1f4086c..8f6369d7a8 100644 --- a/packaging/linux/pkgbuild/PKGBUILD +++ b/packaging/linux/pkgbuild/PKGBUILD @@ -1,6 +1,6 @@ # Contributor: Matthew Bowra-Dean 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/ } diff --git a/packaging/package-all.sh b/packaging/package-all.sh new file mode 100755 index 0000000000..6a76a7b7dc --- /dev/null +++ b/packaging/package-all.sh @@ -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"