diff --git a/go-bin/alr.sh b/go-bin/alr.sh index a946e3c..be07295 100644 --- a/go-bin/alr.sh +++ b/go-bin/alr.sh @@ -1,6 +1,6 @@ name="go-bin" version='1.22.4' -release='2' +release='3' desc="Compiler and tools for the Go programming language" desc_ru="Компилятор и инструменты для языка программирования Go" homepage="https://go.dev/" @@ -26,8 +26,12 @@ checksums_386=('SKIP') sources_riscv64=("https://dl.google.com/go/go${version}.linux-riscv64.tar.gz") checksums_riscv64=('SKIP') +scripts=( + ['postinstall']='postinstall.sh' + ['postremove']='postremove.sh' +) + package() { mkdir -p "$pkgdir/usr/lib/" "$pkgdir/usr/bin" cp -r "$srcdir/go" "$pkgdir/usr/lib/go" - ln -s "$pkgdir/usr/lib/go/bin/go" "$pkgdir/usr/bin/go" } \ No newline at end of file diff --git a/go-bin/postinstall.sh b/go-bin/postinstall.sh new file mode 100644 index 0000000..2e4c1a2 --- /dev/null +++ b/go-bin/postinstall.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +ln -s /usr/lib/go/bin/go /usr/bin/go \ No newline at end of file diff --git a/go-bin/postremove.sh b/go-bin/postremove.sh new file mode 100644 index 0000000..7811f8e --- /dev/null +++ b/go-bin/postremove.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +rm -f /usr/lib/go/bin/go /usr/bin/go \ No newline at end of file