Provides automatic installation scripts for OpenRA with Tiberian Sun & Red Alert 2 + Dune 2 (Windows, Linux)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.0 KiB

8 years ago
  1. # Maintainer: Fincer <fincer89 at hotmail dot com>
  2. pkgname=openra-bleed-tibsunra2
  3. pkgver=r22238.0479b7f
  4. pkgrel=1
  5. pkgdesc="An open-source implementation of the Red Alert engine using .NET/mono and OpenGL (git version)"
  6. arch=("any")
  7. url="http://openra.net"
  8. license=("GPL3")
  9. depends=("mono" "ttf-dejavu" "openal" "libgl" "freetype2" "sdl2" "lua51" "hicolor-icon-theme" "desktop-file-utils" "xdg-utils")
  10. makedepends=("git")
  11. provides=("openra")
  12. conflicts=("openra-git" "openra")
  13. install=openra-bleed-tibsunra2.install
  14. source=("$pkgname-src::git+https://github.com/OpenRA/OpenRA.git#branch=bleed"
  15. "git://github.com/OpenRA/ra2.git"
  16. sha1sums=('SKIP'
  17. 'SKIP'
  18. '2e67a7f84d78d7b9ce8981ebb578c7b744406406'
  19. '412fb02c061918c1a997359713427fa357340a91'
  20. '5d73aedf0b3f6736981c727646c122d3c75ea27b')
  21. pkgver() {
  22. cd "$srcdir/$pkgname-src"
  23. printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  24. }
  25. build() {
  26. # Move Red Alert 2 Github files to the right place:
  27. cd "$srcdir/ra2"
  28. mv ./OpenRA.Mods.RA2 "$srcdir/$pkgname-src/"
  29. mkdir -p "$srcdir/$pkgname-src/mods/ra2/"
  30. mv ./* "$srcdir/$pkgname-src/mods/ra2/"
  31. # Patch OpenRA core files for Tiberian Sun & Red Alert 2
  32. cd "$srcdir/$pkgname-src"
  33. for i in $srcdir/*.patch; do patch -Np1 < $i; done
  34. mkdir $srcdir/$pkgname-src/mods/ra2/bits/{vehicles,themes}
  35. # Get Red Alert 2 GIT version number
  36. ra2_version=git-$(git ls-remote https://github.com/OpenRA/ra2.git | head -1 | sed "s/HEAD//" | sed 's/^\(.\{7\}\).*/\1/')
  37. sed -i "s/Version: {DEV_VERSION}/Version: $ra2_version/g" $srcdir/$pkgname-src/mods/ra2/mod.yaml
  38. sed -i "s/maps\/ra2\/{DEV_VERSION}/maps\/ra2\/$ra2_version/g" $srcdir/$pkgname-src/mods/ra2/mod.yaml
  39. cd "$srcdir/$pkgname-src"
  40. make version
  41. make dependencies
  42. make all [DEBUG=false]
  43. }
  44. package() {
  45. cd "$srcdir/$pkgname-src"
  46. make prefix=/usr DESTDIR="$pkgdir" install-all
  47. make prefix=/usr DESTDIR="$pkgdir" install-linux-shortcuts
  48. }