# Maintainer bill-auger <bill-auger@programmer.net>


# NOTE: this code-base was forked from a BSD3 project,
#       then re-licensed AGPL; but the original license
#       was apparently deleted from the code-base.
#       the original license still applies however;
#       so we fetch it from the original upstream


pkgname=sekai
pkgver=0.6rc0
pkgrel=1
pkgdesc="High-quality speech analysis, manipulation, and synthesis system"
arch=(armv7h i686 x86_64)
license=(AGPL3 custom:BSD3)
url=https://www.qtau.de/
depends=(fftw gsl jack2 libsndfile)
makedepends=(boost cmake)
source=(${pkgname}-${pkgver}.tar.gz::https://notabug.org/isengaara/${pkgname}/archive/${pkgver}.tar.gz
        https://raw.githubusercontent.com/mmorise/World/master/LICENSE.txt)
sha256sums=('5ee1a1879f5cb4471315f35aba24cb097752399ea711d9d774cab9f916d5e4aa'
            '6921ef0a65a931509b4055075fd847d7257c4094609075dd0615e8e997215f7e')


prepare()
{
  mv "${srcdir}"/${pkgname}{,-${pkgver}}
}

build()
{
  mkdir "${srcdir}"/${pkgname}-${pkgver}/build
  cd    "${srcdir}"/${pkgname}-${pkgver}/build

  cmake -DCMAKE_BUILD_TYPE=Release  \
        -DBUILD_SHARED_LIBS=ON      \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=lib  ..
  make
}

package()
{
  cd "${srcdir}"/${pkgname}-${pkgver}/build

  make DESTDIR="${pkgdir}" install

  install -Dm644 "${srcdir}"/LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.txt
}
