summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: af21abb3ca99edb2437d0f9359b1822820600af9 (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
# Maintainer: Frederik Schwan <freswa at archlinux dot org>

pkgname=nameinator
_pkgname=NAMEinator
pkgver=0.0.5
pkgrel=1
pkgdesc='Open-source DNS benchmark utility - successor of namebench'
arch=('x86_64')
url='https://github.com/mwiora/NAMEinator'
license=('Apache')
depends=('bind-tools')
makedepends=('go' 'git')
source=("https://github.com/mwiora/NAMEinator/archive/v${pkgver}/NAMEinator-${pkgver}.tar.gz")
b2sums=('78e6172f08a2be4dec3df0e3cc369b603d00340a6657403fd854f908d8f60e059b3775ce6802731527680e3e2c5817bbb7bb189307ddae34bea8dc092ed7ef6c')

build() {
  cd ${_pkgname}-${pkgver}
  export CGO_LDFLAGS="${LDFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
  go build .
}

package() {
  cd ${_pkgname}-${pkgver}
  install -Dm755 ${_pkgname} "${pkgdir}"/usr/bin/${pkgname}
}