36 lines
1.1 KiB
Bash
36 lines
1.1 KiB
Bash
# Maintainer: bgme <i@bgme.me>
|
|
# Contributor: ml <>
|
|
|
|
_pkgname=probe-cli
|
|
pkgname=ooniprobe-cli
|
|
pkgver=3.18.0
|
|
_pkgver=3.18.0
|
|
pkgrel=1
|
|
pkgdesc='Next generation OONI Probe CLI'
|
|
arch=('x86_64')
|
|
url='https://ooni.org/'
|
|
license=('GPL3')
|
|
depends=('glibc')
|
|
makedepends=('go')
|
|
source=("${_pkgname}-${_pkgver}.tar.gz::https://github.com/ooni/${_pkgname}/archive/refs/tags/v${_pkgver}.tar.gz")
|
|
sha256sums=('d28c050226c9282d7155da6cabf5547ddd43dc11eecacc485b6c05161c2d1d88')
|
|
sha512sums=('25023b3392f78a49732a1ee9186021f238e38f7e9b32940e3e28cef0da790b57459d65e340874a0d7220ddeec19518fcd7a8296115fabc38f68c4e502146d407')
|
|
|
|
build() {
|
|
cd "${_pkgname}-${_pkgver}"
|
|
export CGO_ENABLED=1
|
|
export CGO_LDFLAGS="$LDFLAGS"
|
|
export CGO_CFLAGS="$CFLAGS"
|
|
export CGO_CPPFLAGS="$CPPFLAGS"
|
|
export CGO_CXXFLAGS="$CXXFLAGS"
|
|
export GOFLAGS='-ldflags=-linkmode=external -buildmode=pie -trimpath -modcacherw'
|
|
go build ./cmd/ooniprobe
|
|
}
|
|
|
|
package() {
|
|
cd "${_pkgname}-${pkgver}"
|
|
install -Dm755 ooniprobe -t "$pkgdir/usr/bin"
|
|
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
|
|
install -Dm644 Readme.md -t "$pkgdir/usr/share/doc/$pkgname"
|
|
}
|