# Maintainer: Sven-Hendrik Haase <sh@lutzhaase>
# Collaborator: Jonathan Fine (were.Vire AT gmail DOT com)
pkgname=tiled
pkgver=1.2.4
pkgrel=1
pkgdesc='A general purpose tile map editor, built to be flexible and easy to use'
arch=('x86_64')
url='http://www.mapeditor.org'
license=('GPL')
replaces=('tiled-qt')
depends=('qt5-base' 'libgl' 'gtk-update-icon-cache' 'shared-mime-info' 'desktop-file-utils' 'libxkbcommon-x11')
makedepends=('mesa' 'qt5-tools' 'python3')
optdepends=('python3: Python plugin')
source=($pkgname-$pkgver.tar.gz::https://github.com/bjorn/tiled/archive/v${pkgver}.tar.gz)
sha512sums=('a16fcb3fcceb11397cc981f10a558215264cf2c340639fbc001d384cfd9bc138c05ed40894a03d103af8a7d629c0be9fa6d5a4058fd9c563806920efef8e2cb7')

build() {
  cd $srcdir/$pkgname-$pkgver
  qmake -r INSTALL_HEADERS=yes RPATH=no PREFIX=/usr
  make
}

package() {
  cd $pkgname-$pkgver

  make install INSTALL_ROOT=$pkgdir
}
