# Maintainer: Dekedro <dekedro@protonmail.com>
pkgname=noise-suppression-for-voice
pkgver=1.03
pkgrel=1
pkgdesc="Real-time noise suppression plugin for voice"
url="https://github.com/werman/noise-suppression-for-voice"
arch="all"
license="GPL-3.0-or-later"
makedepends="cmake samurai"
options="!check" # Tests don't build
source="$pkgname-$pkgver.tar.gz::https://github.com/werman/noise-suppression-for-voice/archive/refs/tags/v$pkgver.tar.gz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DBUILD_TESTS=OFF \
		-DBUILD_VST_PLUGIN=OFF \
		-DBUILD_VST3_PLUGIN=OFF \
		-DBUILD_LV2_PLUGIN=OFF \
		-DBUILD_AU_PLUGIN=OFF \
		-DBUILD_AUV3_PLUGIN=OFF \
		$CMAKE_CROSSOPTS .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
1cf08c947a1f5415e35d11007acb3bf1cbb6929c81c3d877d2a1714ec30061285077f9850eb08da7784bf2188d849bd630ad605b1b6e03ea75a1afb16076a512  noise-suppression-for-voice-1.03.tar.gz
"
