# Maintainer: Jeff Hubbard <musikernel@gmail.com>

_realname=ladspa-sdk
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.17
pkgrel=1
pkgdesc="Linux Audio Developer's Simple Plugin API (LADSPA) SDK (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
msys2_references=(
  'archlinux: ladspa'
)
url="https://www.ladspa.org/"
license=("LGPL")
source=("https://ladspa.org/download/ladspa_sdk_${pkgver}.tgz")
sha256sums=('27d24f279e4b81bd17ecbdcc38e4c42991bb388826c0b200067ce0eb59d3da5b')
noextract=(ladspa_sdk_${pkgver}.tgz)

prepare() {
  [[ -d "${srcdir}"/ladspa_sdk_${pkgver} ]] && rm -rf "${srcdir}"/ladspa_sdk_${pkgver}
  tar -xzf "${srcdir}"/ladspa_sdk_${pkgver}.tgz -C "${srcdir}" || true
}

package() {
  cd ladspa_sdk_${pkgver}
  install -Dm0644 src/ladspa.h "${pkgdir}/${MINGW_PREFIX}/include/ladspa.h"
}
