Package Details: sshs 3.4.0-1

Git Clone URL: https://aur.archlinux.org/sshs.git (read-only, click to copy)
Package Base: sshs
Description: Terminal user interface for SSH
Upstream URL: https://github.com/quantumsheep/sshs
Keywords: cli ssh terminal tui
Licenses: MIT
Submitter: quantumsheep
Maintainer: mchal
Last Packager: mchal
Votes: 16
Popularity: 1.39
First Submitted: 2022-02-06 17:17 (UTC)
Last Updated: 2022-11-07 17:17 (UTC)

Latest Comments

quantumsheep commented on 2022-07-21 20:15 (UTC)

Thanks @benjarobin!

benjarobin commented on 2022-07-21 18:14 (UTC) (edited on 2022-07-21 18:16 (UTC) by benjarobin)

Here a fixed version of the PKGBUILD (highly inspired from yay-git package)

# Maintainer: Nathanael Demacon <nathanael.dmc[at]outlook[dot]fr>

pkgname=sshs
pkgver="3.3.0"
pkgrel="1"
pkgdesc="Terminal user interface for SSH"
arch=('any')
url="https://github.com/quantumsheep/sshs"
license=('MIT')
depends=('openssh')
makedepends=('go')
source=("https://github.com/quantumsheep/sshs/archive/refs/tags/$pkgver.tar.gz")
sha256sums=('07992229eab5d97be4fac44a21d3ad3c89ef7c7d15c8814ed579a054334f5e5f')

prepare() {
    cd "$pkgname-$pkgver"
    sed -i "s|go build |go build -trimpath -mod=readonly -modcacherw -buildmode=pie |" Makefile
}

build() {
    export GOPATH="$srcdir"/gopath
    export CGO_CPPFLAGS="${CPPFLAGS}"
    export CGO_CFLAGS="${CFLAGS}"
    export CGO_CXXFLAGS="${CXXFLAGS}"
    export CGO_LDFLAGS="${LDFLAGS}"
    export CGO_ENABLED=1

    cd "$pkgname-$pkgver"
    make VERSION="$pkgver"
}

package() {
    cd "$pkgname-$pkgver"
    make DESTDIR="$pkgdir" PREFIX="/usr"  install
}

This fix a lot of problems :

  • Install in /usr/bin
  • The go cache is put inside src directory and not at the home root of the user
  • The go cache can be deleted easily...
  • Fix reference to $srcdir path inside the generated application

benjarobin commented on 2022-07-21 17:50 (UTC) (edited on 2022-07-21 18:22 (UTC) by benjarobin)

The sha256sum is invalid. The right one is 07992229eab5d97be4fac44a21d3ad3c89ef7c7d15c8814ed579a054334f5e5f

waitnsea commented on 2022-06-14 02:28 (UTC)

==> Starting build()... go build -ldflags "-w -s -X 'github.com/quantumsheep/sshs/cmd.Version=2.1.2'" -o sshs$(if [ "${GOOS:-$(go env GOOS)}" == "windows" ]; then echo '.exe'; else echo ''; fi) go: could not create module cache: stat /usr/bin/go/bin/pkg/mod: not a directory make: *** [Makefile:12: build] Error 1 ==> ERROR: A failure occurred in build(). Aborting...