archrelease: copy trunk to community-any
[ArchLinux/community.git] / podman-dnsname / trunk / PKGBUILD
blob5e597b6e70fd0f14336e12cd93660802443b8167
1 # Maintainer: Morten Linderud <foxboron@archlinux.org>
3 pkgname=podman-dnsname
4 _pkgname=dnsname
5 pkgver=1.3.1
6 pkgrel=2
7 pkgdesc="name resolution for containers"
8 arch=("x86_64")
9 url="https://github.com/containers/dnsname"
10 license=("APACHE")
11 makedepends=("git" "go")
12 depends=("dnsmasq")
13 options=(!lto)
14 _commit=18822f9a4fb35d1349eb256f4cd2bfd372474d84        #refs/tags/v1.3.1^{}
15 source=("git+${url}.git#commit=${_commit}")
16 validpgpkeys=("B7DBDCA456F7335E91F1C25CD3624C551D0515C4")
17 sha256sums=('SKIP')
19 pkgver() {
20     cd ${_pkgname}
21     git describe --tags | sed 's/^v//;s/-/+/g'
24 build() {
25   cd "${_pkgname}"
26   export CGO_LDFLAGS="${LDFLAGS}"
27   export CGO_CFLAGS="${CFLAGS}"
28   export CGO_CPPFLAGS="${CPPFLAGS}"
29   export CGO_CXXFLAGS="${CXXFLAGS}"
30   export GOFLAGS="-buildmode=pie -ldflags=-linkmode=external -trimpath -mod=readonly -modcacherw"
31   make
34 # check() {
35 #   cd "${_pkgname}"
36 #   go test ./...
37 # }
39 package() {
40   cd "${_pkgname}"
41   make PREFIX="/usr" LIBEXECDIR="/usr/lib/cni" DESTDIR="${pkgdir}" install
42   install -vDm 755 "$pkgdir/usr/lib/cni/dnsname" -t "$pkgdir/opt/cni/bin/"