39 lines
1.2 KiB
Bash
39 lines
1.2 KiB
Bash
# Maintainer: bgme <i@bgme.me>
|
|
# Contributor: ml <>
|
|
|
|
_pkgname=probe-cli
|
|
pkgname=ooniprobe-cli
|
|
pkgver=3.20.1
|
|
_pkgver=3.20.1
|
|
pkgrel=1
|
|
pkgdesc='Next generation OONI Probe CLI'
|
|
arch=('x86_64')
|
|
url='https://ooni.org/'
|
|
license=('GPL-3.0-or-later')
|
|
depends=('glibc')
|
|
makedepends=('go')
|
|
source=("${_pkgname}-${_pkgver}.tar.gz::https://github.com/ooni/${_pkgname}/archive/refs/tags/v${_pkgver}.tar.gz")
|
|
sha256sums=('a62242eddd014c347935b3bbface9a0343458a2f8424fa29b1ad927135c732dd')
|
|
sha512sums=('1483876e70f9e64a4eb6d19c872aad4933de324e851d003612af52f42f9c29499e5f68054908987a067a07d828fb8a34ab9ee9b06b26523cc91b932865a29f3a')
|
|
|
|
build() {
|
|
cd "${_pkgname}-${_pkgver}"
|
|
GOVERSION=$(cat GOVERSION)
|
|
export GOTOOLCHAIN=go${GOVERSION}
|
|
|
|
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"
|
|
}
|