void-packages/srcpkgs/NoiseTorch/template

43 lines
1.5 KiB
Bash

# Template file for 'NoiseTorch'
pkgname=NoiseTorch
version=0.12.2
revision=2
build_wrksrc="NoiseTorch-${version}"
build_style=go
go_ldflags="-X main.version=${version} -X main.distribution=VoidLinux"
go_import_path="noisetorch"
depends="libcap-progs"
short_desc="Real-time microphone noise suppression on Linux"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/NoiseTorch/NoiseTorch"
_c_ringbuf_commit=2037560fb90dea5d2538611d983964d790bdbac2
_rnnoise_commit=1cbdbcf1283499bbb2230a6b0f126eb9b236defd
distfiles="https://github.com/NoiseTorch/NoiseTorch/archive/v${version}.tar.gz
https://github.com/NoiseTorch/c-ringbuf/archive/${_c_ringbuf_commit}.tar.gz
https://github.com/NoiseTorch/rnnoise/archive/${_rnnoise_commit}.tar.gz"
checksum="4a30650314a6f83d979f3303d49618847ba58e39e3e26482dfe58b5e261c5611
877b08413c59baac56b4cc7720fa56cf0eb399192a0ec652ce7b590c9cd9ad8a
68c7ab4e408426088603e19955e746bb2a412d84bb121b6f39834c60fc8068b7"
post_extract() {
rmdir "${build_wrksrc}/c/c-ringbuf" "${build_wrksrc}/c/rnnoise"
ln -rsf "c-ringbuf-${_c_ringbuf_commit}" "${build_wrksrc}/c/c-ringbuf"
ln -rsf "rnnoise-${_rnnoise_commit}" "${build_wrksrc}/c/rnnoise"
}
post_patch() {
vsed -e '/git submodule/d' -i Makefile
}
pre_build() {
make rnnoise
GOARCH= go build scripts/embedlicenses.go
./embedlicenses
}
post_install() {
vinstall assets/noisetorch.desktop 644 usr/share/applications
vinstall assets/icon/noisetorch.png 644 usr/share/icons/hicolor/256x256/apps
}