# Maintainer: Victor Levasseur <victorlevasseur52@gmail.com>

pkgname=gdevelop
pkgver=MACRO_GD_VERSION
pkgrel=MACRO_PACKAGE_REV
pkgdesc="GDevelop is a full featured, open source game development software, allowing to create HTML5 and native games without needing any knowledge in a specific programming language. All the game logic is made thanks to an intuitive and powerful event based system."
arch=('i686' 'x86_64')
url="http://www.compilgames.net"
license=('GPL' 'MIT' 'zlib/png')
groups=()
install='PKGBUILD.install'
makedepends=('rsync' 'cmake' 'git' 'curl')
depends=('gcc' 'wxgtk' 'openal' 'p7zip' 'glew' 'libsndfile' 'systemd' 'libjpeg-turbo' 'desktop-file-utils' 'gtk-update-icon-cache')
changelog='PKGBUILD.changelog'
source=( "gdevelop_$pkgver.orig.tar.gz")
md5sums=(SKIP)

build() {
  cd "$srcdir"/$pkgname-$pkgver
  cd Binaries
  rm -rf .build
  mkdir .build
  cd .build
  cmake -DNO_UPDATE_CHECKER=TRUE ../..

  #Build the whole project
  make -j4
}

package() {
  cd "$srcdir"/$pkgname-$pkgver
  cd Binaries/.build
  make install DESTDIR="$pkgdir"
  #Remove sfml installed libs
  rm -rf "$pkgdir"/usr/local
}