Package Details: morty-git 0.2.0.r62.gf5bff1e-1

Git Clone URL: https://aur.archlinux.org/morty-git.git (read-only, click to copy)
Package Base: morty-git
Description: Privacy aware web content sanitizer proxy as a service
Upstream URL: https://github.com/asciimoo/morty
Keywords: proxy searx
Licenses: AGPL3
Conflicts: morty
Provides: morty
Submitter: roentgen
Maintainer: HLFH
Last Packager: HLFH
Votes: 4
Popularity: 0.000000
First Submitted: 2016-10-31 04:03 (UTC)
Last Updated: 2022-12-20 11:06 (UTC)

Dependencies (2)

Required by (0)

Sources (2)

Latest Comments

HLFH commented on 2022-12-20 11:08 (UTC)

@kleintux Done.

HLFH commented on 2022-12-20 10:20 (UTC) (edited on 2022-12-20 10:21 (UTC) by HLFH)

Ok yeah the packaging is crap, you're right. Let me have a look at it right now, I'll make you happy.

kleintux commented on 2022-12-18 20:44 (UTC)

Don't use SUDO in PKGBUILDS. it's forbidden. Don't install something direct to the System. It's a security risk and the files will not be deleted if the package gets deleted. You need to add the files to the pkgdir folder.

see https://wiki.archlinux.org/title/Creating_packages#package()

thank you for fixing and maintaining

HLFH commented on 2020-06-24 07:57 (UTC) (edited on 2020-06-24 07:57 (UTC) by HLFH)

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
}