mirror of
https://github.com/archlinux/aur.git
synced 2026-02-28 14:13:23 +01:00
commit pkgbuild
This commit is contained in:
commit
2af7c187c1
2 changed files with 70 additions and 0 deletions
17
.SRCINFO
Normal file
17
.SRCINFO
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
pkgbase = zoekt-git
|
||||
pkgdesc = Zoekt is a text search engine intended for use with source code.
|
||||
pkgver = 91259775
|
||||
pkgrel = 1
|
||||
url = https://github.com/sourcegraph/zoekt
|
||||
arch = i686
|
||||
arch = x86_64
|
||||
arch = armv6h
|
||||
arch = armv7h
|
||||
license = Apache-2.0
|
||||
makedepends = go
|
||||
makedepends = git
|
||||
provides = zoekt
|
||||
source = zoekt::git+https://github.com/sourcegraph/zoekt
|
||||
sha256sums = SKIP
|
||||
|
||||
pkgname = zoekt-git
|
||||
53
PKGBUILD
Normal file
53
PKGBUILD
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# Maintainer: H3mul <phil.d324@gmail.com>
|
||||
_pkgname=zoekt
|
||||
pkgname=zoekt-git
|
||||
pkgbase=zoekt-git
|
||||
pkgver=91259775
|
||||
pkgrel=1
|
||||
pkgdesc='Zoekt is a text search engine intended for use with source code.'
|
||||
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
|
||||
url='https://github.com/sourcegraph/zoekt'
|
||||
license=('Apache-2.0')
|
||||
makedepends=('go' 'git')
|
||||
source=("$_pkgname::git+$url")
|
||||
sha256sums=('SKIP')
|
||||
provides=(zoekt)
|
||||
OPTIONS=(strip docs !libtool !staticlibs !lto)
|
||||
|
||||
pkgver() {
|
||||
cd "$_pkgname"
|
||||
git describe --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'
|
||||
}
|
||||
|
||||
prepare(){
|
||||
cd "$_pkgname"
|
||||
mkdir -p build/
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$_pkgname"
|
||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||
export CGO_LDFLAGS="${LDFLAGS}"
|
||||
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
||||
go build -o build ./cmd/...
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$_pkgname"
|
||||
# go test ./...
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$_pkgname"
|
||||
|
||||
# binary
|
||||
install -vDm755 -t "$pkgdir/usr/bin" build/*
|
||||
|
||||
# license
|
||||
install -vDm644 -t "$pkgdir/usr/share/licenses/$_pkgname" LICENSE
|
||||
|
||||
# documentation
|
||||
install -vDm644 -t "$pkgdir/usr/share/doc/$_pkgname" README.md
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue