summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d10689b3689709b9f1b3310807a549605afac6dc (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
# Maintainer: Cristian Porras <porrascristian@gmail.com>
# Contributor: Matthew Bentley <matthew@mtbentley.us>

_pkgname=godot
pkgname=${_pkgname}-git
pkgver=2.0.r2549.1bc9184
pkgrel=1
pkgdesc="Godot Game Engine."
url="http://www.godotengine.org"
license=('MIT')
arch=('i686' 'x86_64')
makedepends=('git' 'scons' 'pkg-config')
depends=('glu' 'libxcursor' 'alsa-lib' 'freetype2' 'mesa')
optdepends=()
conflicts=("godot")
provides=("godot")
_arch=''
if test "$CARCH" == x86_64; then
  _arch=('64')
else
  _arch=('32')
fi

source=(
	"git://github.com/godotengine/${_pkgname}.git#branch=master"
	godot.desktop
	icon.png
)
sha256sums=(
	'SKIP'
	'd2f5ae30b8c0c3fd8a20a451d34e9e9d0ba1b60a39b1f68484a9a74227c83822'
	'b6bb8e42625414303cf7608f08fe63bd3267486bf7a96586ebab05ade5189785'
)


pkgver() {
    cd "${srcdir}/${_pkgname}"
    _major=$(cat version.py|grep "major" | sed 's/major=//')
    _minor=$(cat version.py|grep "minor" | sed 's/minor=//')
    _revision=$(printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)")
    echo "${_major}.${_minor}.${_revision}"
    
}

build() {
    cd "${srcdir}"/${_pkgname}

    sed -n '/\/* Copyright/,/IN THE SOFTWARE./p' main/main.cpp | sed 's/\/\*//' | sed 's/\*\///' > LICENSE

    scons platform=x11 target=release_debug
}

package() {

    cd "${srcdir}"    

    install -Dm644 godot.desktop "${pkgdir}"/usr/share/applications/godot.desktop
    install -Dm644 icon.png "${pkgdir}"/usr/share/pixmaps/godot.png
    
    cd "${srcdir}"/${_pkgname}

    install -D -m755 bin/godot.x11.opt.tools.${_arch} "${pkgdir}"/usr/bin/godot
    install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/godot-git/LICENSE
}