summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3e031524ea36f9109cb903d6b26d7e81d09d4772 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# $Id$
# Maintainer: Eden Rose(endlesseden) <eenov1988 "at"  gmail.com >
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Matthew Bowra-Dean <matthew@ijw.co.nz>
#
pkgname=openra-git
pkgver=BLEED.20190327.3b926d71b5
pkgrel=1
pkgdesc="An open-source implementation of the Red Alert engine using .NET/Mono and OpenGL. Red Alert 2, mods Included. -GIT VERSION"
arch=('any')
url="http://www.openra.net"
license=('GPL3')
install=openra.install
depends=('mono' 'ttf-dejavu' 'openal' 'libgl' 'freetype2' 'sdl2' 'lua51' 'hicolor-icon-theme' 'gtk-update-icon-cache'
         'desktop-file-utils' 'xdg-utils' 'zenity')
makedepends=('git' 'unzip')
provides=('openra')
conflicts=('openra')
options=(!strip)

source=('OpenRA::git://github.com/OpenRA/OpenRA.git#branch=bleed'
        'RA2::git://github.com/OpenRA/ra2.git')
        #'D2::git://github.com/OpenRA/d2.git')
md5sums=('SKIP'
         'SKIP')
         #'SKIP')


pkgver() {
  cd "$srcdir/OpenRA"
  
  DATE="$(date +%Y%m%d)"
  PV=$(git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`) ### get GIT version
  echo "BLEED."$DATE""$PV | sed -e 's/git-/./g' 
}



#prepare() {    ### No Longer Required
#  cd OpenRA    ###
#               ###
#  make version ###
#}              ###

build() {
  cd OpenRA
    make dependencies      ### Verify Dependencies.
    make all DEBUG=false   ### Build application and tools...
    #make test DEBUG=false  ### Checking the build, for erroneous yaml files...
    #make check DEBUG=false ### Checking the build, for StyleCop violations...
    #make docs DEBUG=false ### This exists in the Makefile, but is unused? (Make Documentation, mainly aimed at modders)
  cd ../

  cd RA2
  if [ -e engine ]; then
  	rm -r engine
  fi
  ln -s ../OpenRA engine
  #patch -p1 mod.config < $srcdir/RA2-mod.config.patch
  SPEC_VER="$(cat mod.config | grep ENGINE_VERSION | sed -e 's/=/\n/g' | head -2 | tail -1)"
  cat mod.config | sed -e s/"$SPEC_VER"/'"{DEV_VERSION}"'/g > mod.config.1
  mv mod.config.1 mod.config
  echo '"AUTOMATIC_ENGINE_MANAGEMENT"="False"' > "user.config"
  make 
  
}

package() {
  cd OpenRA

  make prefix=/usr DESTDIR="$pkgdir" install DEBUG=false                    ### game data...
  make prefix=/usr DESTDIR="$pkgdir" install-linux-shortcuts DEBUG=false    ### all the beautiful shortcuts...
  #make prefix=/usr DESTDIR="$pkgdir" install-linux-mime DEBUG=false        ### apparently removed...
  #make prefix=/usr DESTDIR="$pkgdir" install-linux-appdata DEBUG=false     ### apparently removed...
  
  
  if [ -e $srcdir/RA2 ]; then
  ### adding RA2 to OpenRA
  #if [ ! -d $pkgdir/usr/lib/openra/mods/ra2 ]; then
  #mkdir -p $pkgdir/usr/lib/openra/mods/
  #fi
  cp -rf $srcdir/RA2/mods/ra2 $pkgdir/usr/lib/openra/mods/ra2
  cp -rf $srcdir/RA2/OpenRA.Mods*  $pkgdir/usr/lib/openra/mods/ra2 
  #cp -rf $srcdir/RA2/mods/ra2/*.png  $pkgdir/usr/lib/openra/mods/ra2
   
  #cp -rf $srcdir/RA2/mods/ra2/audio $pkgdir/usr/lib/openra/mods/ra2 
  #cp -rf $srcdir/RA2/mods/ra2/chrome $pkgdir/usr/lib/openra/mods/ra2 
  #cp -rf $srcdir/RA2/mods/ra2/bits $pkgdir/usr/lib/openra/mods/ra2 
  #cp -rf $srcdir/RA2/mods/ra2/installer $pkgdir/usr/lib/openra/mods/ra2 
  #cp -rf $srcdir/RA2/mods/ra2/languages $pkgdir/usr/lib/openra/mods/ra2 
  #cp -rf $srcdir/RA2/mods/ra2/maps $pkgdir/usr/lib/openra/mods/ra2 
  #cp -rf $srcdir/RA2/mods/ra2/rules $pkgdir/usr/lib/openra/mods/ra2 
  #cp -rf $srcdir/RA2/mods/ra2/sequences $pkgdir/usr/lib/openra/mods/ra2 
  #cp -rf $srcdir/RA2/mods/ra2/tilesets $pkgdir/usr/lib/openra/mods/ra2 
  #cp -rf $srcdir/RA2/mods/ra2/uibits $pkgdir/usr/lib/openra/mods/ra2 
  #cp -rf $srcdir/RA2/mods/ra2/weapons $pkgdir/usr/lib/openra/mods/ra2 
  #########################################################
  fi

  if [ -e $srcdir/D2 ]; then
  ### adding DuneII to OpenRA
  if [ ! -d $pkgdir/usr/lib/openra/mods/d2 ]; then
  mkdir $pkgdir/usr/lib/openra/mods/d2
  fi
  cp -rf $srcdir/D2/OpenRA.Mods*  $pkgdir/usr/lib/openra/mods/d2 
  cp -rf $srcdir/D2/*.yaml  $pkgdir/usr/lib/openra/mods/d2 
  cp -rf $srcdir/D2/*.png   $pkgdir/usr/lib/openra/mods/d2 
  cp -rf $srcdir/D2/audio  $pkgdir/usr/lib/openra/mods/d2 
  cp -rf $srcdir/D2/chrome  $pkgdir/usr/lib/openra/mods/d2 
  cp -rf $srcdir/D2/bits  $pkgdir/usr/lib/openra/mods/d2 
  ##cp -rf $srcdir/D2/installer  $pkgdir/usr/lib/openra/mods/d2  ### installer hasnt been made yet.
  cp -rf $srcdir/D2/languages  $pkgdir/usr/lib/openra/mods/d2 
  cp -rf $srcdir/D2/maps  $pkgdir/usr/lib/openra/mods/d2 
  cp -rf $srcdir/D2/rules  $pkgdir/usr/lib/openra/mods/d2 
  cp -rf $srcdir/D2/sequences  $pkgdir/usr/lib/openra/mods/d2 
  cp -rf $srcdir/D2/tilesets  $pkgdir/usr/lib/openra/mods/d2 
  ##cp -rf $srcdir/D2/uibits  $pkgdir/usr/lib/openra/mods/d2    ### Missing atm.
  cp -rf $srcdir/D2/weapons  $pkgdir/usr/lib/openra/mods/d2 
  #########################################################
  fi

}