diff options
author | demostanis | 2021-02-08 12:19:43 +0100 |
---|---|---|
committer | demostanis | 2021-02-08 12:19:43 +0100 |
commit | 254a559e3cec92e2fda142e176114d3cf46570f6 (patch) | |
tree | 31dce445f6dd123647ac8e6fc6cef7772c7e425a /PKGBUILD | |
download | aur-254a559e3cec92e2fda142e176114d3cf46570f6.tar.gz |
Welcome to the AUR, gimmeasearx!
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a851540a06b8 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: demostanis worlds <demostanis at protonmail dot com> + +_pkgname="gimmeasearx" +pkgname="$_pkgname-git" +pkgver="2.0.0" +pkgrel=1 +pkgdesc="Find a random searx instance" +arch=("x86_64") +url="https://github.com/demostanis/gimmeasearx" +license=("GPL3") +makedepends=("git" "go") +optdepends=("tor: required to show .onion instances") +conflicts=("gimmeasearx") +provides=("gimmeasearx") +source=("git+$url.git") +sha512sums=("SKIP") + +build() { + cd $_pkgname + + export CGO_CPPFLAGS="$CPPFLAGS" + export CGO_CFLAGS="$CFLAGS" + export CGO_CXXFLAGS="$CXXFLAGS" + export CGO_LDFLAGS="$LDFLAGS" + export GOFLAGS='-buildmode=pie -trimpath -mod=readonly -modcacherw' + + go build . +} + +package() { + install -Dm 755 /dev/stdin "$pkgdir"/usr/bin/$_pkgname <<EOF +#!/bin/sh +cd /var/lib/gimmeasearx +exec /var/lib/gimmeasearx/gimmeasearx +EOF + install -Dm 755 $_pkgname/$_pkgname "$pkgdir"/var/lib/$_pkgname/$_pkgname + install -t "$pkgdir"/var/lib/$_pkgname/templates -Dm 644 $_pkgname/templates/* +} + +# vim:set ft=sh: + |