# Maintainer: Lunix (David Hess) <davidhess336@gmx.de>
pkgname='dimethoxy-disflux-bin'
pkgver=1.1.1 # Disflux-Version
pkgrel=1
pkgdesc="Transient Smearing Audio Effect for VST3, LV2 and CLAP compatible hosts"
arch=('x86_64')
url="https://github.com/Dimethoxy/Disflux"
license=('GPL3')
provides=('dimethoxy-disflux')
source=("https://github.com/Dimethoxy/Disflux/releases/download/v$pkgver/disflux-v$pkgver-linux.tar.gz")
sha256sums=('f61cfd287b0d58b9eca419c6c785e66a8bf94caf26b33615aa465c25bd8ee4e1')

package() {
    # Define new directories
    install -d "$pkgdir/usr/lib/vst3/Dimethoxy/Disflux" "$pkgdir/usr/lib/lv2/Dimethoxy/Disflux"
    install -d "$pkgdir/usr/share/licenses/$pkgname"

    # Install plugins (use cp -r for directories)
    cp -r "$srcdir/Disflux.vst3" "$pkgdir/usr/lib/vst3/Dimethoxy/Disflux/"
    cp -r "$srcdir/Disflux.clap" "$pkgdir/usr/lib/clap/Dimethoxy/Disflux/"
    cp -r "$srcdir/Disflux.lv2" "$pkgdir/usr/lib/lv2/Dimethoxy/Disflux/"

    # Download and install the LICENSE from the remote URL
    curl -L "https://raw.githubusercontent.com/Dimethoxy/Disflux/refs/heads/main/LICENSE" -o "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}