Skip to content

Commit

Permalink
Added PKGBUILD
Browse files Browse the repository at this point in the history
  • Loading branch information
demostanis committed Feb 8, 2021
1 parent 0152a61 commit 2fcea52
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ go 1.15

require (
github.com/hashicorp/go-version v1.2.1
github.com/labstack/echo/v4 v4.1.17 // indirect
github.com/labstack/echo/v4 v4.1.17
)
38 changes: 38 additions & 0 deletions packages/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# vim:set ft=sh:
_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/*
}

0 comments on commit 2fcea52

Please sign in to comment.