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.

68 lines
2.5 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. 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. '2e67a7f84d78d7b9ce8981ebb578c7b744406406'
  20. '412fb02c061918c1a997359713427fa357340a91'
  21. '5d73aedf0b3f6736981c727646c122d3c75ea27b')
  22. pkgver() {
  23. cd "$srcdir/$pkgname-src"
  24. printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  25. }
  26. build() {
  27. # Move Red Alert 2 Github files to the right place:
  28. cd "$srcdir/ra2"
  29. mv ./OpenRA.Mods.RA2 "$srcdir/$pkgname-src/"
  30. mkdir -p "$srcdir/$pkgname-src/mods/ra2/"
  31. mv ./* "$srcdir/$pkgname-src/mods/ra2/"
  32. # Patch OpenRA core files for Tiberian Sun & Red Alert 2
  33. cd "$srcdir/$pkgname-src"
  34. for i in $srcdir/*.patch; do patch -Np1 < $i; done
  35. mkdir $srcdir/$pkgname-src/mods/ra2/bits/{vehicles,themes}
  36. # Get Red Alert 2 GIT version number for files
  37. ra2_version=git-$(git ls-remote https://github.com/OpenRA/ra2.git | head -1 | sed "s/HEAD//" | sed 's/^\(.\{7\}\).*/\1/')
  38. sed -i "s/Version: {DEV_VERSION}/Version: $ra2_version/g" $srcdir/$pkgname-src/mods/ra2/mod.yaml
  39. sed -i "s/maps\/ra2\/{DEV_VERSION}/maps\/ra2\/$ra2_version/g" $srcdir/$pkgname-src/mods/ra2/mod.yaml
  40. cd "$srcdir/$pkgname-src"
  41. make version
  42. make dependencies
  43. make all [DEBUG=false]
  44. }
  45. package() {
  46. cd "$srcdir/$pkgname-src"
  47. make prefix=/usr DESTDIR="$pkgdir" install-all
  48. make prefix=/usr DESTDIR="$pkgdir" install-linux-shortcuts
  49. rm $pkgdir/usr/lib/openra/mods/cnc/OpenRA.Mods.Cnc.dll.mdb
  50. rm $pkgdir/usr/lib/openra/mods/common/OpenRA.Mods.Common.dll.mdb
  51. rm $pkgdir/usr/lib/openra/mods/d2k/OpenRA.Mods.D2k.dll.mdb
  52. rm $pkgdir/usr/lib/openra/mods/ra/OpenRA.Mods.RA.dll.mdb
  53. rm $pkgdir/usr/lib/openra/mods/ra2/{build.cake,OpenRA.Mods.RA2.dll.mdb,make.cmd,make.ps1,makefile}
  54. rm $pkgdir/usr/lib/openra/mods/ts/OpenRA.Mods.TS.dll.mdb
  55. rm $pkgdir/usr/lib/openra/{SharpFont.dll.config,SDL2-CS.dll.config,OpenAL-CS.dll.config,Eluant.dll.config}
  56. }