# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Federico Cinelli <cinelli@aur.archlinux.org>

pkgname=texmaker
pkgver=5.0.3
pkgrel=1
pkgdesc='Free cross-platform LaTeX editor'
arch=(x86_64)
url="http://www.xm1math.net/texmaker/index.html"
license=(GPL)
depends=(qt5-script)
optdepends=('ghostscript: LaTeX to HTML conversion command')
source=("http://www.xm1math.net/$pkgname/$pkgname-$pkgver.tar.bz2")
sha256sums=('6074dffa82c431f8727c39e046f62cb70f5fe1457f158b46306e8f490b4f326f')

build() {
  cd $pkgname-$pkgver
  qmake-qt5 PREFIX=/usr texmaker.pro
  make
}
package() {
  cd $pkgname-$pkgver

  install -dm755 "$pkgdir"/usr/share
  make INSTALL_PATH="$pkgdir" INSTALL_ROOT="$pkgdir" PREFIX="/usr" install
}
