From 95df09dfd0f72561d59320eb8677883a4cefdcd7 Mon Sep 17 00:00:00 2001 From: "e.khramov" Date: Wed, 26 Oct 2022 11:29:10 +0300 Subject: [PATCH] 1 --- noisetorch/lure.sh | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/noisetorch/lure.sh b/noisetorch/lure.sh index 59d95ca..9c6330d 100644 --- a/noisetorch/lure.sh +++ b/noisetorch/lure.sh @@ -11,41 +11,40 @@ conflicts=('noisetorch') deps_amd64=('git go') build_deps=('git' 'go') -sources_amd64=("https://github.com/noisetorch/NoiseTorch.git") -checksums_amd64=('SKIP') +sources_amd64=("${name}::git+https://github.com/noisetorch/NoiseTorch.git#tag=v${version}" +"git+https://github.com/noisetorch/c-ringbuf.git" +"git+https://github.com/noisetorch/rnnoise.git") +checksums_amd64=('SKIP' +'SKIP' +'SKIP') prepare() { cd "${srcdir}" -} - -build() { -${name}::git+https://github.com/noisetorch/NoiseTorch.git#tag=v${version} - -"git+https://github.com/noisetorch/c-ringbuf.git" -"git+https://github.com/noisetorch/rnnoise.git" - git submodule init git config submodule. "c/c-ringbuf".url "${srcdir}/c-ringbuf" git config submodule. "c/rnnoise".url "${srcdir}/rnnoise" git submodule--helper update +} +build() { +cd "${srcdir}" export GOPATH="${srcdir}/go" pushd "c/ladspa" make popd +vendor_flags="-X main.version=${version}" export CGO_CPPFLAGS="${CPPFLAGS}" export CGO_CFLAGS="${CFLAGS}" export CGO_CXXFLAGS="${CXXFLAGS}" export CGO_LDFLAGS="${LDFLAGS}" export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" go generate -go build -ldflags "${vendor_flags}" -linkmode=external" -o bin/noisetorch +go build -ldflags "${vendor_flags} -linkmode=external" -o bin/noisetorch go clean -modcache - - } +} package() { -install -Dm755 "./.bin/noisetorch" "${pkgdir}/usr/bin" -install -Dm644 "./assets/noisetorch.desktop" "${pkgdir}/usr/share/applications/" -install -Dm644 "./assets/icon/noisetorch.png" "${pkgdir}/usr/share/icons/hicolor/256x256/apps/" +install -Dm755 bin/noisetorch "${pkgdir}/usr/bin" +install -Dm644 assets/noisetorch.desktop "${pkgdir}/usr/share/applications/" +install -Dm644 assets/icon/noisetorch.png "${pkgdir}/usr/share/icons/hicolor/256x256/apps/" } \ No newline at end of file