summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d72c425a9d959a4c273fa8fa12aca7ea3d961bf4 (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
# Maintainer: Oscar Morante <spacepluk at gmail dot com>

_version=2017.3.0
_build=f1
_buildtag=20171206
_randomstring=3c89f8d277f5
_prefix=/opt/UnityBeta
_unitydownloads="http://beta.unity3d.com/download/${_randomstring}"
#_keepdownloads=yes

pkgname=unity-editor-beta-windows
pkgver=${_version}${_build}+${_buildtag}
pkgrel=1
pkgdesc="Allows building your Unity projects for the Windows platform"
arch=('x86_64')
url='https://unity3d.com/'
license=('custom')
depends=('unity-editor-beta')
makedepends=('gtk2' 'libsoup' 'libarchive')
source=("${_unitydownloads}/UnitySetup-${_version}${_build}")
sha1sums=('864eec744e5ca360c41e6121ddbd4cbb48659fe4')
options=(!strip)
PKGEXT='.pkg.tar' # Prevent compressing of the final package

unity-setup() {
  ./UnitySetup-${_version}${_build} -d "${startdir}" -l "${pkgdir}${_prefix}" -u $@
}

extract-component() {
  msg2 "Extracting $1..."
  yes | unity-setup -c $1 > "/tmp/$1.log"
}

prepare() {
  chmod +x "${srcdir}/UnitySetup-${_version}${_build}"
}

package_unity-editor-beta-windows() {
  mkdir -p "${pkgdir}${_prefix}"
  extract-component Windows

  if [ -z "${_keepdownloads}" ]; then
    rm "${startdir}/UnitySetup-Windows-Support-for-Editor-${_version}${_build}.pkg"
  fi
}