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.

69 lines
2.5 KiB

8 years ago
  1. # Maintainer: Fincer <fincer89 at hotmail dot com>
  2. pkgname=openra-bleed-tibsunra2
  3. pkgver=r22244.c12cfbc
  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. optdepends=('zenity')
  11. makedepends=("git")
  12. provides=("openra")
  13. conflicts=("openra-git" "openra")
  14. install=openra-bleed-tibsunra2.install
  15. source=("$pkgname-src::git+https://github.com/OpenRA/OpenRA.git#branch=bleed"
  16. "git://github.com/OpenRA/ra2.git"
  17. sha1sums=('SKIP'
  18. 'SKIP'
  19. 'SKIP'
  20. '5d73aedf0b3f6736981c727646c122d3c75ea27b'
  21. 'af97ff3908959e60f44949ee874d9035999c9fc3'
  22. '7e87cb67e8ade6397129e45203e67504d572abf6'
  23. '07930220fbd876492085d82ec33001316b6862f9'
  24. '9846854381f099e734d41dafe8eaa9457e27250b')
  25. pkgver() {
  26. cd "$srcdir/$pkgname-src"
  27. printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  28. }
  29. build() {
  30. # Move Red Alert 2 Github files to the right place:
  31. cd "$srcdir/ra2"
  32. mv ./OpenRA.Mods.RA2 "$srcdir/$pkgname-src/"
  33. mkdir -p "$srcdir/$pkgname-src/mods/ra2/"
  34. mv ./* "$srcdir/$pkgname-src/mods/ra2/"
  35. # Patch OpenRA core files for Tiberian Sun & Red Alert 2
  36. cd "$srcdir/$pkgname-src"
  37. for i in $srcdir/*.patch; do patch -Np1 < $i; done
  38. mkdir $srcdir/$pkgname-src/mods/ra2/bits/{vehicles,themes}
  39. # Get Red Alert 2 GIT version number for files
  40. ra2_version=git-$(git ls-remote https://github.com/OpenRA/ra2.git | head -1 | sed "s/HEAD//" | sed 's/^\(.\{7\}\).*/\1/')
  41. sed -i "s/Version: {DEV_VERSION}/Version: $ra2_version/g" $srcdir/$pkgname-src/mods/ra2/mod.yaml
  42. sed -i "s/maps\/ra2\/{DEV_VERSION}/maps\/ra2\/$ra2_version/g" $srcdir/$pkgname-src/mods/ra2/mod.yaml
  43. cd "$srcdir/$pkgname-src"
  44. make version
  45. make dependencies
  46. make all [DEBUG=false]
  47. }
  48. package() {
  49. cd "$srcdir/$pkgname-src"
  50. make prefix=/usr DESTDIR="$pkgdir" install-all
  51. make prefix=/usr DESTDIR="$pkgdir" install-linux-shortcuts
  52. rm $pkgdir/usr/lib/openra/mods/cnc/OpenRA.Mods.Cnc.dll.mdb
  53. rm $pkgdir/usr/lib/openra/mods/common/OpenRA.Mods.Common.dll.mdb
  54. rm $pkgdir/usr/lib/openra/mods/d2k/OpenRA.Mods.D2k.dll.mdb
  55. rm $pkgdir/usr/lib/openra/mods/ra/OpenRA.Mods.RA.dll.mdb
  56. rm $pkgdir/usr/lib/openra/mods/ra2/{build.cake,OpenRA.Mods.RA2.dll.mdb,make.cmd,make.ps1,makefile}
  57. rm $pkgdir/usr/lib/openra/mods/ts/OpenRA.Mods.TS.dll.mdb
  58. }