PKGBUILD for Arch-Linux
This commit is contained in:
52
packaging/linux/pkgbuild/PKGBUILD
Normal file
52
packaging/linux/pkgbuild/PKGBUILD
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# Contributor: Matthew Bowra-Dean <matthew@ijw.co.nz>
|
||||||
|
pkgname=openra-git
|
||||||
|
pkgver=20100505
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Open Source rebuild of the Red Alert game engine using Mono/OpenGL."
|
||||||
|
arch=(any)
|
||||||
|
url="http://open-ra.org"
|
||||||
|
license=('GPL3')
|
||||||
|
groups=()
|
||||||
|
depends=('mono' 'mono-addins' 'openal' 'mesa' 'nvidia-cg-toolkit' 'freetype2')
|
||||||
|
makedepends=('git' 'unzip' 'wget')
|
||||||
|
optdepends=()
|
||||||
|
provides=()
|
||||||
|
conflicts=()
|
||||||
|
replaces=()
|
||||||
|
backup=()
|
||||||
|
options=()
|
||||||
|
install=openra.install
|
||||||
|
source=()
|
||||||
|
noextract=()
|
||||||
|
md5sums=()
|
||||||
|
|
||||||
|
_gitroot="git://github.com/beedee/OpenRA.git"
|
||||||
|
_gitname="OpenRA"
|
||||||
|
_gittag="pkgtest-$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"
|
||||||
|
git checkout $_gittag
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUILD HERE
|
||||||
|
#
|
||||||
|
|
||||||
|
make prefix="/usr" || return 1
|
||||||
|
make prefix="/usr" DESTDIR="$pkgdir" install
|
||||||
|
}
|
||||||
50
packaging/linux/pkgbuild/openra.install
Normal file
50
packaging/linux/pkgbuild/openra.install
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
|
||||||
|
install_ra_packages() {
|
||||||
|
wget http://open-ra.org/packages/ra-packages.zip
|
||||||
|
mkdir -p $pkgdir/usr/share/openra/mods/ra/packages
|
||||||
|
unzip ra-packages.zip -d $pkgdir/usr/share/openra/mods/ra/packages
|
||||||
|
}
|
||||||
|
|
||||||
|
install_cnc_packages() {
|
||||||
|
wget http://open-ra.org/packages/cnc-packages.zip
|
||||||
|
mkdir -p $pkgdir/usr/share/openra/mods/cnc/packages
|
||||||
|
unzip ra-packages.zip -d $pkgdir/usr/share/openra/mods/cnc/packages
|
||||||
|
}
|
||||||
|
|
||||||
|
# arg 1: the new package version
|
||||||
|
post_install() {
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
read -s -n1 -p "Download and install RA packages? [Y/n]"
|
||||||
|
case $REPLY in
|
||||||
|
y|Y|"")
|
||||||
|
install_ra_packages
|
||||||
|
break;;
|
||||||
|
n|N) break;;
|
||||||
|
*) echo "Please enter y or n.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
read -s -n1 -p "Download and install C&C packages? [Y/n]"
|
||||||
|
case $REPLY in
|
||||||
|
y|Y|"")
|
||||||
|
install_cnc_packages
|
||||||
|
break;;
|
||||||
|
n|N) break;;
|
||||||
|
*) echo "Please enter y or n.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
gacutil -i $pkgdir/usr/share/openra/thirdparty/Tao/Tao.Cg.dll
|
||||||
|
gacutil -i $pkgdir/usr/share/openra/thirdparty/Tao/Tao.FreeType.dll
|
||||||
|
gacutil -i $pkgdir/usr/share/openra/thirdparty/Tao/Tao.OpenAl.dll
|
||||||
|
gacutil -i $pkgdir/usr/share/openra/thirdparty/Tao/Tao.OpenGl.dll
|
||||||
|
gacutil -i $pkgdir/usr/share/openra/thirdparty/Tao/Tao.Sdl.dll
|
||||||
|
|
||||||
|
echo "#!/bin/sh" > openra
|
||||||
|
echo "cd /usr/share/openra" >> openra
|
||||||
|
echo "mono /usr/share/openra/OpenRA.Game.exe" >> openra
|
||||||
|
install -m +rx openra /usr/bin/
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user