blob: c67e831eb7db24896b7ac2a5afc7578581036de0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# Maintainer: bgme <i@bgme.me>
# Contributor: ml <>
_pkgname=probe-cli
pkgname=ooniprobe-cli
pkgver=3.24.0
_pkgver=3.24.0
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=('4c2dad0367cfe3924ca45c9f484660a132e843d6c55259ff375efadeb6d518c3')
sha512sums=('41c90ba93c66d585a6a2c77c45c42ad22c99527f8d0c31c1f28cd804d194bdfb9a43ef70287d5a324e7c79cc4315794d12c173112987afdd7c495693cc4f47b7')
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"
}
|