BurntSushi / wingo

A fully-featured window manager written in Go.
Do What The F*ck You Want To Public License
1k stars 86 forks source link

Wingo cant install from aur #144

Closed error-ident closed 2 years ago

error-ident commented 2 years ago

wingo cant install from aur error: go: go.mod file not found in current directory or any parent directory. 'go get' is no longer supported outside a module. To build and install a command, use 'go install' with a version, like 'go install example.com/cmd@latest' For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'. ==> ОШИБКА: Произошел сбой в pkgver(). Прерывание... go version go1.18.3 linux/amd64

BurntSushi commented 2 years ago

How did you fix it? And can you put the error message? So that it's helpful for others who stumble across it.

error-ident commented 2 years ago

I installed the package incorrectly manually, I had to rewrite pkgbuild and install from AUR This worked for me, but I'm not sure if it's right.

# Contributor: Andrew Gallant <andrew@burntsushi.net>
# Maintainer: aksr <aksr at t-com dot me>
pkgname=wingo-git
pkgver=r3.4acfcda
pkgrel=1
pkgdesc="A fully-featured window manager written in Go."
arch=('i686' 'x86_64')
url="https://github.com/BurntSushi/wingo"
license=('WTFPL')
makedepends=('git' 'go')
install=${pkgname}.install
_gourl=github.com/BurntSushi/wingo@latest #fixed the url for go install
_gourl2=github.com/BurntSushi/wingo/wingo-cmd@latest #fixed the url for go install

pkgver() {
  GOPATH="$srcdir" go install ${_gourl}
  cd "$srcdir/pkg/mod/github.com/!burnt!sushi/wingo@v0.0.0-20201011141536-30b336cbb88d" #fixed directory
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir"
  GOPATH="$srcdir" go install ${_gourl}
  GOPATH="$srcdir" go install ${_gourl2}
}

package() {
  cd "$srcdir"
  install -Dm755 bin/wingo "$pkgdir/usr/bin/wingo"
  install -Dm755 bin/wingo-cmd "$pkgdir/usr/bin/wingo-cmd"
  cd "$srcdir/pkg/mod/github.com/!burnt!sushi/wingo@v0.0.0-20201011141536-30b336cbb88d" #fixed directory
  install -Dm644 README.md "$pkgdir/usr/share/doc/${pkgname%-*}/README.md"
  install -Dm644 COMPLIANCE "$pkgdir/usr/share/doc/${pkgname%-*}/COMPLIANCE"
  install -Dm644 HOWTO-COMMANDS "$pkgdir/usr/share/doc/${pkgname%-*}/HOWTO-COMMANDS"
  install -Dm644 HOWTO-CONFIGURE "$pkgdir/usr/share/doc/${pkgname%-*}/HOWTO-CONFIGURE"
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/${pkgname%-*}/COPYING"

  mkdir -p $pkgdir/{/usr/share/${pkgname%-*},etc/xdg/${pkgname%-*}}
  cp config/*.wini "$pkgdir/etc/xdg/${pkgname%-*}"
  cd data
  cp *.png "$pkgdir/usr/share/${pkgname%-*}"
  install -Dm644 wingo.wav "$pkgdir/usr/share/${pkgname%-*}/wingo.wav"
  install -Dm644 DejaVuSans.ttf "$pkgdir/usr/share/${pkgname%-*}/DejaVuSans.ttf"
  install -Dm644 archlinux/wingo-git/wingo.desktop "$pkgdir/usr/share/xsessions/wingo.desktop"
}
BurntSushi commented 2 years ago

Thanks!