# Maintainer: Bruno Pagani <archange@archlinux.org>

pkgname=frescobaldi
pkgver=3.1.3
pkgrel=3
pkgdesc="A LilyPond sheet music text editor"
arch=(any)
url="http://www.frescobaldi.org/"
license=(GPL)
depends=(
  python python-pyqt5 python-pyqt5-webengine python-ly poppler
  python-poppler-qt5 qt5-base qt5-svg qt5-webkit
)
makedepends=(python-setuptools)
optdepends=(
  'lilypond: music engraving'
  'python-pygame: MIDI input and playback'
  'python-pycups: printing to a CUPS server'
  'hyphen-lang: hyphenation patterns for desired languages'
)
source=(https://github.com/frescobaldi/frescobaldi/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('9c7f5036f367691454753f1db06ea02c33501c1e4f24bfb47485103911f3e9c1')

prepare() {
  cd ${pkgname}-${pkgver}
  # Provided by hyphen-*
  rm -f frescobaldi_app/hyphdicts/hyph_*.dic
  rm -f frescobaldi_app/hyphdicts/README*
}

build() {
  cd ${pkgname}-${pkgver}
  python setup.py build
}

package() {
  cd ${pkgname}-${pkgver}
  python setup.py install --root="${pkgdir}/" --skip-build --optimize=1
}
