Package Details: morty-git 0.2.0+r32+g74a0548-2

Git Clone URL: https://aur.archlinux.org/morty-git.git (read-only, click to copy)
Package Base: morty-git
Description: Web content sanitizer/proxy (git)
Upstream URL: https://github.com/asciimoo/morty
Keywords: proxy searx
Licenses: AGPL3
Conflicts: morty
Provides: morty
Submitter: roentgen
Maintainer: HLFH
Last Packager: HLFH
Votes: 3
Popularity: 0.000025
First Submitted: 2016-10-31 04:03
Last Updated: 2020-06-27 10:53

Dependencies (3)

Required by (0)

Sources (2)

Latest Comments

HLFH commented on 2020-06-24 07:57

We have error go.mod exists but should not with go > 1.3. I have go version 1.14.4.

I fixed it with this PKGBUILD.

# Maintainer: Jean Lucas <jean@4ray.co>
# Contributor: Arthur Țițeică / arthur dot titeica with gmail

_pkgname=morty
_gourl=github.com/asciimoo/morty

pkgname=morty-git
pkgver=0.2.0+r32+g74a0548
pkgrel=1
pkgdesc='Web content sanitizer/proxy (git)'
arch=(i686 x86_64)
url="https://$_gourl"
license=(AGPL3)
provides=(morty)
conflicts=(morty)
depends=(glibc)
makedepends=(git go)
source=(git+$url
        morty.service)
sha512sums=('SKIP'
            'b967d4aebbf869d5867c39ef50cc286c01b0c2ec7fdda4d4d92771a99847c85a3218cedd4bd55797d46ffa2f8a23e547a8326fb9a530214b544d1366c0232190')
_goroot='/usr/lib/go'

pkgver() {
  export GOROOT="$srcdir/build/go"
  export GOPATH="$srcdir/build"
  cd "$GOPATH/src/${_gourl}"
  git describe --tags | sed 's#v##;s#-#+#g;s#+#+r#'
}

prepare() {
  export GOROOT="$_goroot"

  msg2 'Prepare GO build enviroment'
  sudo rm -rf build
  mkdir -p build/go
  cd build/go

  for f in "$GOROOT/"*; do
    ln -s "$f"
  done

  rm pkg && mkdir pkg && cd pkg

  for f in "$GOROOT/pkg/"*; do
    ln -s "$f"
  done

  export GOROOT="$srcdir/build/go"
  export GOPATH="$srcdir/build"

  mkdir -p "$GOPATH/src/${_gourl%/$_pkgname}"
  mv "$srcdir/$_pkgname" "$GOPATH/src/${_gourl}"
}

build() {
  export GOROOT="$srcdir/build/go"
  export GOPATH="$srcdir/build"
  cd "$GOPATH/src/${_gourl}"
  go fix
  go build .
}

package() {
  install -Dm 644 morty.service -t "$pkgdir"/usr/lib/systemd/system

  cd "$GOPATH/src/${_gourl}" 

  install -D morty -t "$pkgdir"/usr/bin

  install -Dm 644 README.md -t "$pkgdir"/usr/share/doc/morty
  install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/morty
}